1 Feb 2012 14:23
Inter-CU DWARF size optimizations and gcc -flto
Hi,
I am sorry if it is clear to everyone but I admit I played with it only
yesterday.
With
gcc -flto -flto-partition=none
gcc outputs only single CU (Compilation Unit). With default (omitting)
-flto-partition there are multiple CUs but still a few compared to the number
of .o files.
-flto is AFAIK the future for all the compilations. It is well known -flto
debug info is somehow broken now but that needs to be fixed anyway.
As the DWARF size is being discussed for 5+ years I am in Tools this is
a long-term project and waiting for (helping, heh) working -flto is an
acceptable solution.
This has some implications:
(a) DWARF post-processing optimization tool no longer makes sense with -flto.
(a1) Intra-CU optimizations in GCC make sense as it is the final output.
(b) .gdb_index will have limited scope, only to select which objfiles to expand,
no longer to select which CUs to expand.
(c) Partial CU expansion Tom Tromey talks about is a must in such case.
Although the smaller LTO debug info takes only 63% of GDB memory
(Continue reading)
I routinely try - emphasis on
try - to use GDB on programs with between 2500 and 5500 shared
libraries. It's agonizing. I have another project I want to work on
first, and not much time for GDB lately, but this is absolutely on my
list to improve.
RSS Feed