Issue |
63290
|
Summary |
llvm-symbolizer uses significantly more memory with zlib compressed DWARF
|
Labels |
performance,
debuginfo,
tools:llvm-symbolizer
|
Assignees |
|
Reporter |
sfc-gh-sgiesecke
|
I built a large binary (which among others links against several LLVM libraries, I randomly picked one LLVM symbol for the test) with and without `-Wl,--compress-debug-sections=zlib` (using `lld` from `llvm-16.0.0`):
```
$ /usr/bin/time llvm-symbolizer -e binary.compressed-dwarf 0x$(nm binary.compressed-dwarf | grep _ZN4llvm3orc8JITDylib5clearEv$ | cut -c 1-16)
llvm::orc::JITDylib::clear()
.../llvm/src/lib/ExecutionEngine/Orc/Core.cpp:618:25
8.55user 0.63system 0:09.20elapsed 99%CPU (0avgtext+0avgdata 3940772maxresident)k
0inputs+0outputs (0major+767100minor)pagefaults 0swaps
$ /usr/bin/time llvm-symbolizer -e binary.uncompressed-dwarf 0x$(nm binary.uncompressed-dwarf | grep _ZN4llvm3orc8JITDylib5clearEv$ | cut -c 1-16)
llvm::orc::JITDylib::clear()
.../llvm/src/lib/ExecutionEngine/Orc/Core.cpp:618:25
0.63user 0.22system 0:01.14elapsed 74%CPU (0avgtext+0avgdata 450928maxresident)k
2129840inputs+0outputs (417major+89119minor)pagefaults 0swaps
```
WIth`--compress-debug-sections`, `llvm-symbolizer`
1. takes significantly longer
2. uses significantly more memory (3940772maxresident vs. 450928maxresident)
1. might be expected/unavoidable due to the decompression overhead, but 2. seems unexpected/avoidable in this extent.
A similar behaviour exists with `llvm-gsymutil --convert`, which isn't surprising as this probably originates in the DebugInfoDWARF library used by both.
Just for completeness: `llvm-symbolizer` shows a number of warnings like
```
warning: address range table at offset 0x9066e0 has a premature terminator entry at offset 0x906970
```
in both cases. I guess that's not relevant here though.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs