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] MIPS: A small optimization for dwarf2 frame data.


David Daney <ddaney@avtrex.com> writes:
> The dwarf frame data produced for most mips targets contains workarounds
> for bugs in SGI's debugger and other tools.  For GNU/Linux based mips
> systems, these are not needed.
>
> This patch undefs the MIPS_DEBUGGING_INFO for linux systems (as is
> already done for sde and vxworks) so that the workarounds are not used. 
> I had opened an enhancement PR target/34409 to track the issue.  The
> main thing the patch does is to enable the generation of
> DW_CFA_def_cfa_register codes in the dwarf2 frame data.  This is 1 - 2
> bytes shorter than the DW_CFA_def_cfa that it replaces.
>
> The end result is that the size of the .debug_frame section in
> libstdc++.so is reduced by 76 bytes out of 66124 (a whopping 0.1%).  In
> theory there can be space savings in the .eh_frame section as well, but
> because the fde records are 4 byte aligned, there is no actual savings
> in libstdc++.so as the savings was padded away.

Ugh, what a mess.  MIPS_DEBUGGING_INFO isn't documented and seems to be
used for two distinct purposes: to control IRIX DWARF workarounds and to
choose between standard COFF and MIPS ECOFF.  I suppose that while the
dwarf2out.c stuff has a negative impact on output quality, the sdbout.c
stuff, on the whole, has a positive effect.  On the other hand, I think
the only MIPS configurations that still use sdbout.c are OpenBSD and
VxWorks, and like you say, the latter explicitly doesn't want
MIPS_DEBUGGING_INFO to be defined.

So it looks like the only ports that actually want MIPS_DEBUGGING_INFO
to be defined are mips*-irix* and mips*-openbsd*, both of which are
probably in "slow bitrot" mode.  If that's right, I think we should
remove all the current config/mips MIPS_DEBUGGING_INFO stuff and
instead define MIPS_DEBUGGING_INFO in config/mips/iris.h and
config/mips/openbsd.h.  Does that sound OK?  If so, do you want
to do it, or should I?

Richard


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