[Dwarf-Discuss] Size cost of debug info [from Dwarf-Discuss Digest, Vol 52, Issue 7]
Bishop, John E
john.e.bishop at intel.com
Mon Oct 24 14:31:43 PDT 2011
Cary Coutant says:
At Google, we've found that the cost of linking applications with
debug info is much too high. A large C++ application that might be,
say, 200MB without debug info, is somewhere around 1GB with debug
info, and the total size of the object files that we send to the
linker is around 5GB (and that's with compressed debug sections).
We've come to the conclusion that the most promising solution is to
eliminate the debug info from the link step. I've had direct
experience with HP's approach to this, and I've looked into Sun's and
Apple's approaches, but none of those three approaches actually
separates the debug info from the non-debug info at the object file
(.o) level. I know we're not alone in having concerns about the size
of debug info, so we've developed the following proposal to extend the
DWARF format and produce separate .o and ".dwo" (DWARF object) files
at the compilation step. Our plan is to develop the gcc and gdb
changes on new upstream branches.
I don't see a problem which cries out to be solved. My experience must be different from Cary's.
As far as I know the size of the debug information has never been a problem for any of the developers on any of the projects I've known over my working lifetime. That lifetime covers a lot of different platforms and different formats of debug information (PDP-11, VAX, Alpha, HPUX, Intel; RSX, VMS, Tru64, HPUX, Linux; stabs, coff, DWARF).
When as a developer on Intel's IDB I had to make IDB handle Apple's attempts to leaving the debug information in the .o files. I thought this was a mistake then. I think it's a mistake now. Memory is cheap. Disks hold gigabytes. Anyone doing debugging is going to have a big disk.
I build my curent project (the Fortran run-time library) with debug information and didn't even know what the impact is until just now because it's never mattered. As a test, I just built with and without debug information on x86 Linux. One library is 318 k-bytes without debug information and 874 k-bypes with debug information. That's not even 3x. Other libraries I just checked were about the same (between 2x and 3x).
The idea of .o/.dDSYM caching of debug information elsewhere brings up all the issues of matching and being out of date which are naturally avoided by having the debug information in the executable.
More information about the Dwarf-Discuss