This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Eliminate duplicate dwarf2 data
- To: gcc-patches at gcc dot gnu dot org
- Subject: Re: [PATCH] Eliminate duplicate dwarf2 data
- From: gary at Intrepid dot Com (Gary Funck)
- Date: Mon, 28 Aug 2000 11:11:59 -0700
- Cc: "Daniel Berlin" <dberlin at redhat dot com>
- References: <Pine.LNX.4.10.10008271953320.2768-100000@fidel.cygnus.com>
On Aug 27, 8:01pm, Daniel Berlin wrote:
> > That said, it would be nice to decrease the size of the debugging
> > info., and the speed of loading that info., and it looks like this
> > include optimization can offer a big win. Do you have any statistics
> > on how much space is saved, in a typical large executable, such as
> > gcc, or the Linux kernel?
>
> Neither are C++ apps, which really tax dwarf2, due to the tendency for
> include files to have debug info.
> However, a simple 6 line bs C++ file pulling in most of the STL, compiled
> 18 times, results in a 9 meg executable without the patch, and under a meg
> with it.
I don't know C++ well, but am wondering - how much of that 1 meg. is
actually needed for debugging? Are there extra definitions
included into the debugging info. that aren't on the transitive closure
of being used/needed by the program that did the include of the STL?
Zack's note, below made me wonder if some sort of pruning process
might not result in a big win? Maybe the pruning that Zack recommends
will also reduce the amount of unneeded debugging info?
> From: Zack Weinberg <zack@wolery.cumb.org>
> Date: Mon, 28 Aug 2000 10:10:08 -0700
> Subject: Patch: Prune unused DECL_STMTs from saved tree structure
> I noticed that the C++ front end's tree representation for a saved
> inline function always contains declarations of __FUNCTION__,
> etc. whether they're used or not. It looks something like this:
> The three DECL_STMTs, and the references to their VAR_DECLs in the
> BLOCK node, can be elided from the tree after we finish building it.
> On the test case being discussed over on gcc-list right now, this
> saves six and a half megabytes.
[...]