[Lldb-commits] [lldb] [lldb][Darwin] Batch debugserver Mach-O load-command reads (PR #232684)
Jason Molenda via lldb-commits
lldb-commits at lists.llvm.org
Mon Oct 19 13:51:15 PDT 2026
jasonmolenda wrote:
Interesting performance idea. I never thought of the separate reads (which requires mapping a page from the inferior into lldb's address space, copying the bytes, then unmapping it) would be a bottleneck, but we definitely do a lot of them in the process of parsing the load commands. Do you have any numbers on what aggregate difference it makes for a higher level operation? I'm sure it's more efficient, but have we made something that took 0.03 seconds take 0.001 seconds now, that kind of thing?
I think using a 16k window of the load commands probably adds more complexity than it's worth, if I remember correctly the largest mach header + load commands in a typical UI app was 30-40kbytes. I'm not sure if the `std::array` is heap or stack allocated; if it's stack, a `std::vector<uint8_t>` would be another approach -- what do you think about creating an allocation for the entire set of load commands?
https://github.com/llvm/llvm-project/pull/232684
More information about the lldb-commits
mailing list