public inbox for dwz@sourceware.org
 help / color / mirror / Atom feed
From: "wcohen at redhat dot com" <sourceware-bugzilla@sourceware.org>
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	[thread overview]
Message-ID: <bug-28568-11298@http.sourceware.org/bugzilla/> (raw)

https://sourceware.org/bugzilla/show_bug.cgi?id=28568

            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 Entry
Address":

If no DW_AT_entry_pc attribute is present, then the entry address is assumed 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 dwgrep
(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 := entry (?TAG_inlined_subroutine) ?DW_AT_low_pc ?DW_AT_entry_pc;
let LOW := ((A ?DW_AT_low_pc @DW_AT_low_pc) || (0xdeadbeef));
let ENTRY := ((A ?DW_AT_entry_pc @DW_AT_entry_pc) || (0xdeadbeef));
(LOW == 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=103134 for the redundant
DW_AT_entry_pc. It was suggested that dwz would be likely be able to eliminate
these unneeded DW_AT_entry_pc tags in the debuginfo.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

             reply	other threads:[~2021-11-09 13:47 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-09 13:47 wcohen at redhat dot com [this message]
2021-11-09 13:47 ` [Bug default/28568] " wcohen at redhat dot com

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-28568-11298@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=dwz@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).