public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
From: "wcohen at redhat dot com" <sourceware-bugzilla@sourceware.org>
To: systemtap@sourceware.org
Subject: [Bug translator/25972] New: stap -v -L misses probe points
Date: Mon, 11 May 2020 15:32:03 +0000	[thread overview]
Message-ID: <bug-25972-6586@http.sourceware.org/bugzilla/> (raw)

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

            Bug ID: 25972
           Summary: stap -v -L misses probe points
           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: ---

Created attachment 12525
  --> https://sourceware.org/bugzilla/attachment.cgi?id=12525&action=edit
Reproducer for stap missing statement lines

When debugging pr25549 I noticed that there were some cases where it appeared
systemtap missed listing lines for instruction that had multiple debuginfo
views for the same instruction.  this can be replicated on fedora 32 with the

$ rpm -q gcc systemtap elfutils
gcc-10.1.1-1.fc32.x86_64
systemtap-4.3-0.20200211git91ffb97ad335.fc32.x86_64
elfutils-0.179-2.fc32pr25549.x86_64
$ gcc -O2 -g pr25549b.cxx -o pr25549b
$ stap -v -L 'process("./pr25549b").statement("*@*:*")'
Pass 1: parsed user script and 502 library scripts using
442584virt/211916res/12772shr/199236data kb, in 450usr/70sys/554real ms.
process("/home/wcohen/pr25549b").statement("main@/home/wcohen/pr25549b.cxx:10")
/* pc=.absolute+0x1040 */ $argc:int $argv:char**
process("/home/wcohen/pr25549b").statement("main@/home/wcohen/pr25549b.cxx:12")
/* pc=.absolute+0x104e */ $argc:int $argv:char**
Pass 2: analyzed script: 2 probes, 0 functions, 0 embeds, 0 globals using
451284virt/222188res/13700shr/207936data kb, in 60usr/0sys/69real ms.

However, there are multiple views for the instructions:

$ readelf --debug-dump=decodedline pr25549b
Contents of the .debug_line section:

CU: pr25549b.cxx:
File name                            Line number    Starting address    View   
Stmt
pr25549b.cxx                                  10            0x401040           
   x
pr25549b.cxx                                  11            0x401040       1   
   x
pr25549b.cxx                                   3            0x401040       2   
   x
pr25549b.cxx                                   5            0x401040       3   
   x
pr25549b.cxx                                  10            0x401040       4
pr25549b.cxx                                   5            0x401044        
pr25549b.cxx                                   5            0x401049        
pr25549b.cxx                                   6            0x40104e           
   x
pr25549b.cxx                                  12            0x40104e       1   
   x
pr25549b.cxx                                  13            0x40104e       2
pr25549b.cxx                                  13            0x401055        


gdb allows setting breakpoints at those alternative view for the instructions. 
I would expect that systemtap would also allow probe points at those points.

-- 
You are receiving this mail because:
You are the assignee for the bug.

                 reply	other threads:[~2020-05-11 15:32 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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