[Lldb-commits] [lldb] DynamicLoaderDarwin load images in parallel (PR #110439)

Dmitrii Galimzianov via lldb-commits lldb-commits at lists.llvm.org
Mon Oct 7 15:42:28 PDT 2024


DmT021 wrote:

@jasonmolenda I tried to reproduce your results but got drastically different numbers for parallel runs. Here's the setup:
- Using this (the main) repository of llvm-project.
- `cmake -G Ninja -DLLVM_ENABLE_PROJECTS="clang;lldb;lld" -DCMAKE_BUILD_TYPE=RelWithDebInfo -DLLVM_ENABLE_ASSERTIONS=ON -DLLVM_ENABLE_RUNTIMES="libcxx;libcxxabi;libunwind" -DLLDB_BUILD_FRAMEWORK=1 -DLLDB_ENABLE_PYTHON=1 -DLLDB_ENABLE_SWIG=1`
- `csrutil enable --without debug`
- Attaching to Slack
- Using the same cmd line as you did except for the setting name
  `time ~/w/swift-project/build/lldb-main/bin/lldb -x -b -o 'pro att -n Slack' -o 'det'`
  `time ~/w/swift-project/build/lldb-main/bin/lldb -x -b -O 'settings set plugin.dynamic-loader.darwin.enable-parallel-image-load true' -o 'pro att -n Slack' -o 'det'`
- **Important** I always discard the first run in a sequence because the first launch of `lldb` after a rebuild takes about 3-4 seconds longer than the subsequent ones. For example, the first run of `#110439 enable-parallel-image-load=0` took 8.772 sec instead of ~5.4.

|  | unmodified | #110439 enable-parallel-image-load=0 | #110439 enable-parallel-image-load=1 | #110646 enable-parallel-image-load=0 | #110646 enable-parallel-image-load=1 |
|---|---|---|---|---|---|
| run 1 | 5.52 | 5.509 | 2.517 | 5.464 | 2.496 |
| run 2 | 5.475 | 5.451 | 2.492 | 5.372 | 2.506 |
| run 3 | 5.373 | 5.44 | 2.513 | 5.506 | 2.533 |
| run 4 | 5.55 | 5.333 | 2.54 | 5.493 | 2.552 |
| run 5 | 5.534 | 5.535 | 2.511 | 5.427 | 2.552 |
| avg | 5.4904 | 5.4536 | 2.5146 | 5.4524 | 2.5278 |

Did you discard the first runs as well?

https://github.com/llvm/llvm-project/pull/110439


More information about the lldb-commits mailing list