[libcxx-commits] [libcxx] [libc++] Encode additional ODR-affecting properties in the ABI tag (PR #69669)
Louis Dionne via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Oct 24 12:12:46 PDT 2023
ldionne wrote:
Here's the results for `libcxx/test/std/algorithms/alg.modifying.operations/alg.transform/ranges.transform.binary.range.pass.cpp` when compiling with `-O0 -g` (that's what you wanted right?):
```
$ bloaty debug-before.o
FILE SIZE VM SIZE
-------------- --------------
30.9% 5.60Mi 44.0% 5.60Mi ,__debug_str
20.5% 3.72Mi 0.0% 0 String Table
14.7% 2.67Mi 21.0% 2.67Mi ,__debug_info
14.1% 2.56Mi 20.1% 2.56Mi ,__text
7.6% 1.38Mi 0.0% 0 [Unmapped]
4.7% 870Ki 6.7% 870Ki ,__debug_line
2.8% 524Ki 4.0% 524Ki ,__apple_names
2.5% 458Ki 3.5% 458Ki ,__compact_unwind
1.6% 288Ki 0.0% 0 Symbol Table
0.2% 40.3Ki 0.3% 40.3Ki ,__const
0.2% 33.7Ki 0.3% 33.7Ki ,__apple_types
0.1% 10.7Ki 0.1% 10.7Ki ,__literal16
0.0% 6.80Ki 0.1% 6.80Ki ,__data
0.0% 2.68Ki 0.0% 2.68Ki ,__literal4
0.0% 1.63Ki 0.0% 0 [Mach-O Headers]
0.0% 1.45Ki 0.0% 1.45Ki ,__debug_abbrev
0.0% 664 0.0% 664 ,__cstring
0.0% 372 0.0% 372 ,__apple_namespac
0.0% 56 0.0% 56 ,__eh_frame
0.0% 52 0.0% 52 [2 Others]
0.0% 48 0.0% 48 ,__debug_ranges
100.0% 18.1Mi 100.0% 12.7Mi TOTAL
$ bloaty debug-after.o
FILE SIZE VM SIZE
-------------- --------------
30.9% 5.61Mi 44.0% 5.61Mi ,__debug_str
20.6% 3.73Mi 0.0% 0 String Table
14.7% 2.67Mi 21.0% 2.67Mi ,__debug_info
14.1% 2.56Mi 20.1% 2.56Mi ,__text
7.6% 1.38Mi 0.0% 0 [Unmapped]
4.7% 870Ki 6.7% 870Ki ,__debug_line
2.8% 524Ki 4.0% 524Ki ,__apple_names
2.5% 458Ki 3.5% 458Ki ,__compact_unwind
1.6% 288Ki 0.0% 0 Symbol Table
0.2% 40.3Ki 0.3% 40.3Ki ,__const
0.2% 33.7Ki 0.3% 33.7Ki ,__apple_types
0.1% 10.7Ki 0.1% 10.7Ki ,__literal16
0.0% 6.80Ki 0.1% 6.80Ki ,__data
0.0% 2.68Ki 0.0% 2.68Ki ,__literal4
0.0% 1.63Ki 0.0% 0 [Mach-O Headers]
0.0% 1.45Ki 0.0% 1.45Ki ,__debug_abbrev
0.0% 664 0.0% 664 ,__cstring
0.0% 372 0.0% 372 ,__apple_namespac
0.0% 56 0.0% 56 ,__eh_frame
0.0% 52 0.0% 52 [2 Others]
0.0% 48 0.0% 48 ,__debug_ranges
100.0% 18.1Mi 100.0% 12.7Mi TOTAL
```
There doesn't seem to be a super significant change here either. Also FWIW I have no idea how symbols are stored inside debug information and whether it's possible to change that without breaking the world, but it would be quite awesome if they were stored in some sort of compressed form. For example we could store symbols in some kind of prefix tree and then this change would have basically no effect on the overall size of symbols.
https://github.com/llvm/llvm-project/pull/69669
More information about the libcxx-commits
mailing list