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

Jason Molenda via lldb-commits lldb-commits at lists.llvm.org
Mon Oct 7 18:22:03 PDT 2024


jasonmolenda wrote:

Hmmm, interesting.  I built my optimized builds with
```
cmake ../llvm -G Ninja -DLLDB_ENABLE_SWIFT_SUPPORT=0 -DPython3_EXECUTABLE=/usr/bin/python3 -DCMAKE_BUILD_TYPE=RelWithDebInfo -DLLVM_ENABLE_ASSERTIONS=1 -DLLVM_ENABLE_PROJECTS='llvm;lldb;clang' '-DLLVM_ENABLE_RUNTIMES=libcxx;libcxxabi;libunwind' -DLLDB_ENABLE_PYTHON=1
```

I had the same `main` sources built with RelWithDebInfo, with Debug.  Then I applied this PR (110439)'s current diff and built RelWithDebInfo and Debug ("parallel") and then cleared my checkout, then applied the parallel+preload current diff (110646) and built RelWithDebugInfo and Debug.  Maybe I made a mistake somewhere?  I still have all of the build products on my computer.  The actual timings may be different because I'm not running a released version of macOS on this computer, but the relative difference between my different variations should be reliable.  

You asked earlier what the times were like for one of the patched sources with the setting enabled and disabled, I was going to note that.  Here's exactly what I saw with the RelWithDebInfo build of main plus the diff for this PR ("parallel"):

```
% time build.release.parallel/bin/lldb -x -b -o 'pro att -n Slack' -o 'det'
4.649u 2.614s 0:10.62 68.2%	0+0k 0+0io 3277pf+0w

% time build.release.parallel/bin/lldb -x -b -o 'pro att -n Slack' -o 'det'
4.581u 2.417s 0:10.57 66.1%	0+0k 0+0io 147pf+0w

% time build.release.parallel/bin/lldb -x -b -o 'pro att -n Slack' -o 'det'
4.534u 2.196s 0:09.92 67.7%	0+0k 0+0io 104pf+0w
```

and

```
% time build.release.parallel/bin/lldb -x -b -O 'settings set plugin.experimental.dynamic-loader.darwin.enable-parallel-image-load true' -o 'pro att -n Slack' -o 'det'
6.621u 3.694s 0:06.00 171.8%	0+0k 0+0io 104pf+0w

% time build.release.parallel/bin/lldb -x -b -O 'settings set plugin.experimental.dynamic-loader.darwin.enable-parallel-image-load true' -o 'pro att -n Slack' -o 'det'
6.562u 3.758s 0:06.15 167.6%	0+0k 0+0io 104pf+0w

% time build.release.parallel/bin/lldb -x -b -O 'settings set plugin.experimental.dynamic-loader.darwin.enable-parallel-image-load true' -o 'pro att -n Slack' -o 'det'
6.562u 3.739s 0:06.19 166.2%	0+0k 0+0io 104pf+0w
```

`time` here is the tcsh time which is unlike all others lol, it is showing user seconds, system seconds, elapsed (wallclock) seconds and cpu usage.  I'm not sure why it's consistently slower for me and not for you, that is surprising.  

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


More information about the lldb-commits mailing list