Skip to content

Draft: Compress debug sections

Reiner Hauser requested to merge rhauser/atlasexternals:compressed-debug into main

When separating the debug sections from libraries and executables, compress them if possible. This works with the GNU/system objcopy but not with llvm-objcopy, so it depends on the CMAKE_COMPILER_ID.

The default is zlib compression, but once CentOS 7 is gone this can be changed to --compress-debug-sections=zstd and one gains a bit more.

The gains seen in TDAQ were about a factor 2-3 reduction in size of the debug information. In total the binary part of a full TDAQ build went from 4.3 GByte to 1.6 GByte (plus a few hundred MByte of arch independent stuff).

So far there were no drawbacks seen, gdb etc. works, although it obviously has to decompress the information during the debug session.

Tagging @akraszna , do you think there are any other drawbacks ?

I will put a few numbers for athena libraries here once I figure out how to use my private version without building all externals.

Edited by Reiner Hauser

Merge request reports