From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 57D953858013; Tue, 9 Nov 2021 13:47:03 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 57D953858013 From: "wcohen at redhat dot com" To: dwz@sourceware.org Subject: [Bug default/28568] New: Eliminate redundant DW_AT_entry_pc tags for inlined functions from debuginfo Date: Tue, 09 Nov 2021 13:47:03 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: dwz X-Bugzilla-Component: default X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: wcohen at redhat dot com X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: nobody at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter cc target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: dwz@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Dwz mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Nov 2021 13:47:03 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D28568 Bug ID: 28568 Summary: Eliminate redundant DW_AT_entry_pc tags for inlined functions from debuginfo Product: dwz Version: unspecified Status: NEW Severity: normal Priority: P2 Component: default Assignee: nobody at sourceware dot org Reporter: wcohen at redhat dot com CC: dwz at sourceware dot org Target Milestone: --- According to the DWARF5.pdf standard DW_AT_entry_pc can be optional "2.18 E= ntry Address": If no DW_AT_entry_pc attribute is present, then the entry address is assume= d to be the same as the base address of the containing scope. Eliminating those unneeded DW_AT_entry_pc attributes would save some space = in the generated debuginfo. To determine the possible saving the following dw= grep (https://pmachata.github.io/dwgrep/) script was used to find how often this occurs in the Fedora 34 kernel and showed over 200,000 instances where the DW_AT_low_pc and DW_AT_entry_pc were the same: $ dwgrep /usr/lib/debug/lib/modules/5.14.15-200.fc34.x86_64/vmlinux -e ' let A :=3D entry (?TAG_inlined_subroutine) ?DW_AT_low_pc ?DW_AT_entry_pc; let LOW :=3D ((A ?DW_AT_low_pc @DW_AT_low_pc) || (0xdeadbeef)); let ENTRY :=3D ((A ?DW_AT_entry_pc @DW_AT_entry_pc) || (0xdeadbeef)); (LOW =3D=3D ENTRY) ([A name, ENTRY, LOW ])' | grep \\[ | wc 214604 643812 12804153 Initially filed a gcc bug to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D103134 for the redundant DW_AT_entry_pc. It was suggested that dwz would be likely be able to elimin= ate these unneeded DW_AT_entry_pc tags in the debuginfo. --=20 You are receiving this mail because: You are on the CC list for the bug.=