From: "wcohen at redhat dot com" <sourceware-bugzilla@sourceware.org>
To: systemtap@sourceware.org
Subject: [Bug translator/31028] New: Systemtap doesn't find probe points for process.function("*").callee("*")' in code with DWARF5 debuginfo
Date: Thu, 02 Nov 2023 20:40:56 +0000 [thread overview]
Message-ID: <bug-31028-6586@http.sourceware.org/bugzilla/> (raw)
https://sourceware.org/bugzilla/show_bug.cgi?id=31028
Bug ID: 31028
Summary: Systemtap doesn't find probe points for
process.function("*").callee("*")' in code with DWARF5
debuginfo
Product: systemtap
Version: unspecified
Status: NEW
Severity: normal
Priority: P2
Component: translator
Assignee: systemtap at sourceware dot org
Reporter: wcohen at redhat dot com
Target Milestone: ---
When reviewing the systemtap "make install" test results there were and
excessive number of failures for the systemtap.base/listing_mode.exp on RHEL9,
Fedora 38, and rawhide, about 200 failure on x86_64 machines. this can be
reproduced with:
sudo make installcheck RUNTESTFLAGS="-debug systemtap.base/listing_mode.exp"
The issues are with the .callee()
There are fewer failures on RHEL8 machine. When comparing the code being
instrumented I found that RHEL 8 is using DWARF4 and the tests with the high
failure rate are using DWARF5. Can narrow the reproducer down to following:
gcc /usr/share/systemtap/testsuite/systemtap.base/listing_mode.c
-isystem/usr/share/systemtap/testsuite -isystem/usr/include -g -O -fPIC -shared
-DLISTING_MODE_LIB -lm -o liblisting_mode.so
gcc /usr/share/systemtap/testsuite/systemtap.base/listing_mode.c
-isystem/usr/share/systemtap/testsuite -isystem/usr/include -g -O
-llisting_mode -Wl,-rpath,/usr/share/systemtap/testsuite -L.
-DLISTING_MODE_MAIN -lm -o listing_mode
stap -l 'process.function("foo").callee("bar")' -c listing_mode
On RHEL8 get the expected output:
process("/home/wcohen/systemtap_write/systemtap/listing_mode").function("foo@/usr/share/systemtap/testsuite/systemtap.base/listing_mode.c:23").callee("bar@/usr/share/systemtap/testsuite/systemtap.base/listing_mode.c:16")
On RHEL9/fedora38/rawhide get nothing.
Comparing the llvm-dwarfdump output for listing_mode on RHEL8 see:
0x000003f6: DW_TAG_GNU_call_site
DW_AT_low_pc (0x0000000000400711)
DW_AT_abstract_origin (0x0000040c "bar")
0x00000403: DW_TAG_GNU_call_site_parameter
DW_AT_location (DW_OP_reg5 RDI)
DW_AT_GNU_call_site_value
(DW_OP_GNU_entry_value(DW_OP_reg5 RDI))
On Fedora 38 the dwarf 5 call site information is a little different:
0x00000188: DW_TAG_call_site
DW_AT_call_return_pc (0x0000000000401182)
DW_AT_call_origin (0x0000019e)
0x00000195: DW_TAG_call_site_parameter
DW_AT_location (DW_OP_reg5 RDI)
DW_AT_call_value (DW_OP_entry_value(DW_OP_reg5 RDI))
Appears:
DWARF4 -> DWARF5
DW_AT_low_pc -> DW_AT_call_return_pc
DW_AT_abstract_origin -> DW_AT_call_origin
--
You are receiving this mail because:
You are the assignee for the bug.
next reply other threads:[~2023-11-02 20:40 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-02 20:40 wcohen at redhat dot com [this message]
2023-11-03 14:00 ` [Bug translator/31028] " wcohen at redhat dot com
2023-11-03 16:18 ` wcohen at redhat dot com
2023-11-03 17:34 ` 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-31028-6586@http.sourceware.org/bugzilla/ \
--to=sourceware-bugzilla@sourceware.org \
--cc=systemtap@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).