public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug debug/103134] New: Redundant DW_AT_entry_pc tags for inlined functions
@ 2021-11-08 16:27 wcohen at redhat dot com
2021-11-09 11:16 ` [Bug debug/103134] " rguenth at gcc dot gnu.org
2021-11-09 13:48 ` wcohen at redhat dot com
0 siblings, 2 replies; 3+ messages in thread
From: wcohen at redhat dot com @ 2021-11-08 16:27 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103134
Bug ID: 103134
Summary: Redundant DW_AT_entry_pc tags for inlined functions
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: debug
Assignee: unassigned at gcc dot gnu.org
Reporter: wcohen at redhat dot com
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
There were less than 3500 cases where the DW_AT_entry_pc was omitted:
$ dwgrep /usr/lib/debug/lib/modules/5.14.15-200.fc34.x86_64/vmlinux -e '
let A := entry (?TAG_inlined_subroutine);
let RANGE := ((A ?DW_AT_ranges @DW_AT_ranges) || (A ?DW_AT_low_pc
@DW_AT_low_pc) || (0xdeadbeef));
let ENTRY := ((A ?DW_AT_entry_pc @DW_AT_entry_pc) || (0xdeadbeef));
(ENTRY == 0xdeadbeef) ([A name, ENTRY, RANGE ])' | grep \\[ | wc
3448 12235 278068
There were even fewer cases of DW_AT_entry_pc != DW_AT_low_pc (some might be
due to Bug 99654):
]$ 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 \\[ | sort > entry_pc_diff.log
$ wc entry_pc_diff.log
445 1335 27515 entry_pc_diff.log
According to koji build of the package
(https://koji.fedoraproject.org/koji/buildinfo?buildID=1849253) the kernel was
built with gcc-11.2.1-1.fc34
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug debug/103134] Redundant DW_AT_entry_pc tags for inlined functions
2021-11-08 16:27 [Bug debug/103134] New: Redundant DW_AT_entry_pc tags for inlined functions wcohen at redhat dot com
@ 2021-11-09 11:16 ` rguenth at gcc dot gnu.org
2021-11-09 13:48 ` wcohen at redhat dot com
1 sibling, 0 replies; 3+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-11-09 11:16 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103134
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever confirmed|0 |1
Last reconfirmed| |2021-11-09
--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
Might be something for DWZ, I'm not sure it's easy enough to determine this
from dwarf2out.c
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug debug/103134] Redundant DW_AT_entry_pc tags for inlined functions
2021-11-08 16:27 [Bug debug/103134] New: Redundant DW_AT_entry_pc tags for inlined functions wcohen at redhat dot com
2021-11-09 11:16 ` [Bug debug/103134] " rguenth at gcc dot gnu.org
@ 2021-11-09 13:48 ` wcohen at redhat dot com
1 sibling, 0 replies; 3+ messages in thread
From: wcohen at redhat dot com @ 2021-11-09 13:48 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103134
--- Comment #2 from Will Cohen <wcohen at redhat dot com> ---
Filed a dwz bug (https://sourceware.org/bugzilla/show_bug.cgi?id=28568) as an
alternative was to address the redundant DW_AT_entry_pc.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-11-09 13:48 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-08 16:27 [Bug debug/103134] New: Redundant DW_AT_entry_pc tags for inlined functions wcohen at redhat dot com
2021-11-09 11:16 ` [Bug debug/103134] " rguenth at gcc dot gnu.org
2021-11-09 13:48 ` wcohen at redhat dot com
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).