public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* [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

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).