* [Bug translator/31028] New: Systemtap doesn't find probe points for process.function("*").callee("*")' in code with DWARF5 debuginfo
@ 2023-11-02 20:40 wcohen at redhat dot com
2023-11-03 14:00 ` [Bug translator/31028] " wcohen at redhat dot com
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: wcohen at redhat dot com @ 2023-11-02 20:40 UTC (permalink / raw)
To: systemtap
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.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug translator/31028] Systemtap doesn't find probe points for process.function("*").callee("*")' in code with DWARF5 debuginfo
2023-11-02 20:40 [Bug translator/31028] New: Systemtap doesn't find probe points for process.function("*").callee("*")' in code with DWARF5 debuginfo wcohen at redhat dot com
@ 2023-11-03 14:00 ` 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
2 siblings, 0 replies; 4+ messages in thread
From: wcohen at redhat dot com @ 2023-11-03 14:00 UTC (permalink / raw)
To: systemtap
https://sourceware.org/bugzilla/show_bug.cgi?id=31028
--- Comment #1 from William Cohen <wcohen at redhat dot com> ---
Created attachment 15206
--> https://sourceware.org/bugzilla/attachment.cgi?id=15206&action=edit
WIP patch to add dwarf5 callee support
This is a non-working patch attempting to add the dwarf5 callee support.
It has changes in the general area expected for the callee checks, but does not
currently provide any expected matches with the simple:
stap -l 'process.function("foo").callee("bar")' -c listing_mode
--
You are receiving this mail because:
You are the assignee for the bug.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug translator/31028] Systemtap doesn't find probe points for process.function("*").callee("*")' in code with DWARF5 debuginfo
2023-11-02 20:40 [Bug translator/31028] New: Systemtap doesn't find probe points for process.function("*").callee("*")' in code with DWARF5 debuginfo wcohen at redhat dot com
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
2 siblings, 0 replies; 4+ messages in thread
From: wcohen at redhat dot com @ 2023-11-03 16:18 UTC (permalink / raw)
To: systemtap
https://sourceware.org/bugzilla/show_bug.cgi?id=31028
--- Comment #2 from William Cohen <wcohen at redhat dot com> ---
Created attachment 15207
--> https://sourceware.org/bugzilla/attachment.cgi?id=15207&action=edit
This patch appears to address the problem on f38 and works on rhel8
--
You are receiving this mail because:
You are the assignee for the bug.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug translator/31028] Systemtap doesn't find probe points for process.function("*").callee("*")' in code with DWARF5 debuginfo
2023-11-02 20:40 [Bug translator/31028] New: Systemtap doesn't find probe points for process.function("*").callee("*")' in code with DWARF5 debuginfo wcohen at redhat dot com
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
2 siblings, 0 replies; 4+ messages in thread
From: wcohen at redhat dot com @ 2023-11-03 17:34 UTC (permalink / raw)
To: systemtap
https://sourceware.org/bugzilla/show_bug.cgi?id=31028
William Cohen <wcohen at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|NEW |RESOLVED
--- Comment #3 from William Cohen <wcohen at redhat dot com> ---
This should be resolved git commit e72dc118e563c645d93a1a2d771e8d90e8fec1ae.
After the commit the systemtap.base/listing_mode.exp test results are much
better:
sudo make installcheck RUNTESTFLAGS="systemtap.base/listing_mode.exp"
....
=== systemtap Summary ===
# of expected passes 1701
# of known failures 32
--
You are receiving this mail because:
You are the assignee for the bug.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-11-03 17:34 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-02 20:40 [Bug translator/31028] New: Systemtap doesn't find probe points for process.function("*").callee("*")' in code with DWARF5 debuginfo wcohen at redhat dot com
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
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).