[PATCH] debug/96383 - emit debug info for used external functions

Jakub Jelinek jakub@redhat.com
Thu Jul 30 10:09:04 GMT 2020


On Thu, Jul 30, 2020 at 11:55:19AM +0200, Richard Biener wrote:
> For cc1 this affects debug information size as follows:
> 
>      VM SIZE                     FILE SIZE
>  ++++++++++++++ GROWING       ++++++++++++++
>   [ = ]       0 .debug_info   +1.63Mi  +1.3%
>   [ = ]       0 .debug_str     +263Ki  +3.4%
>   [ = ]       0 .debug_abbrev  +101Ki  +4.9%
>   [ = ]       0 .debug_line   +5.71Ki  +0.0%
>    +44%     +16 [Unmapped]        +48  +1.2%
> 
>  -------------- SHRINKING     --------------
>   [ = ]       0 .debug_loc       -213  -0.0%
>   -0.0%     -48 .text             -48  -0.0%
>   [ = ]       0 .debug_ranges     -16  -0.0%
> 
>   -0.0%     -32 TOTAL         +1.99Mi  +0.6%
> 
> and DWARF compression via DWZ can only shave off minor bits
> here.

I'm surprised DWZ doesn't shave off more, the prototypes in
the different TUs should be the same and therefore mergeable.

What could help a little if DWZ is able to merge the prototypes with
definition DIE (verify that the type is the same and there is no information
the definition doesn't have appart from DW_AT_external).

> Bootstrap and regtest running on x86_64-unknown-linux-gnu.
> 
> OK for trunk and backports?

I'd go with it for trunk and 10.2.1 now and consider further backports
later.  Maybe even defer the 10.2.1 backport for two weeks.

	Jakub



More information about the Gcc-patches mailing list