This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] better dwarf2 debug info for inlined functions


Richard Guenther wrote:
How does this affect the size of the debugging information on say, the
tramp3d-v3 testcase?  I would appreciate a way to turn this extra information
off, if possible.

This extra debug info is extremely useful for C++. You really don't want to turn it off. With this extra info, we can generate the same backtraces at -O2 as you get at -O0. It can make inlining transparent to the end user. If you are trying to debug C++ code using templates and libstdc++, it should be much easier with this patch. See for instance the binutils link in my first message, which shows how useful it can be for a trvial C++ example.


The debug info size increase will be relatively small. For each inlined subroutine DIE, there will be a call file entry which will be one byte (assuming less than 128 files), and a call line entry will be be two bytes (assuming more than 128 lines and less than 16k lines). There will also be a few extra bytes in the abbrev section, 8 bytes per file, assuming four different inlined subroutine DIE formats. There is also space used by the file names, but there is unlikely to be a file size increase here as the file names needed are probably already in the file table.

Looking at libstdc++.a on an x86_64-linux machine, it goes from 11972952 bytes without the patch to 12005752 bytes with the patch. That is an absolute increase of 32800 bytes, and a relative increase of 0.27%. libstdc++ is C++ code with a lot of inline functions.

By contrast, libmudflap.a goes from 730514 bytes to 730586 bytes. That is about 0.01%. libmudflap is C code with few inline functions.
--
Jim Wilson, GNU Tools Support, http://www.specifix.com



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]