Performance issue with macOS remote-debugging
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 331
- Forks
- 33
- PR merge metrics
- No merged PRs in 30d
Description
I noticed two issues that cause a significant slow down during launch while during macOS debugging.
- The file being debugging is always copied to the remote system despite the file with the same MD5 already exists on the remote system.
- LLDB reads
libobjc.A.dylibfrom memory. This is evident by the warning message during launch:
libobjc.A.dylib is being read from process memory. This indicates that LLDB could not find the on-disk shared cache for this device. This will likely reduce debugging performance.
I suppose this is caused by the shared cache mechanism on macOS, and libobjc.A.dylib does not exist on disk as a single file, so LLDB does not have a way to read it from disk. So it has to read it from memory. This causes a significantly slow down, often times to the scale of 20+ seconds. It appears that reading from the memory is also slower, potentially because once the file gets mapped, it takes more memory bytes (e..g, the .bss section will actually take space now)
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing macOS remote-debugging launch delays and inspect the two reported paths: repeated file copies despite matching MD5 values and LLDB's libobjc.A.dylib shared-cache warning. No files or tests are named; done means avoiding unnecessary transfers and preventing or accounting for the slow memory-based library read.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, macos
- Domain
- devtools, operating-systems, performance
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100