[Lldb-commits] [lldb] DynamicLoaderDarwin load images in parallel (PR #110439)
Dmitrii Galimzianov via lldb-commits
lldb-commits at lists.llvm.org
Thu Oct 10 20:06:36 PDT 2024
DmT021 wrote:
> I was playing with the performance in a couple of different scenarios. For some reason that I haven't looked into, we're getting less parallelism when many of the binaries are in the shared cache in lldb. Maybe there is locking around the code which finds the binary in lldb's own shared cache, so when 9 threads try to do it at the same time, we have additional lock contention.
There is a lock_guard for `shared_module_list.m_modules_mutex` at the beginning of `ModuleList::GetSharedModule`. I instrumented loading Slack and that lock_guard is responsible for about 7% of the total time. Most of the time is spent on constructing ConstString.
Here's a flame graph. It's captured with "Record Waiting Threads" enabled so the locks are visible.
[lldb_parallel.svg.zip](https://github.com/user-attachments/files/17337125/lldb_parallel.svg.zip)
https://github.com/llvm/llvm-project/pull/110439
More information about the lldb-commits
mailing list