Bug 9770 - stap -l 'process("bla").mark("*")' should print marker names
Summary: stap -l 'process("bla").mark("*")' should print marker names
Status: RESOLVED FIXED
Alias: None
Product: systemtap
Classification: Unclassified
Component: translator (show other bugs)
Version: unspecified
: P2 normal
Target Milestone: ---
Assignee: Stan Cox
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-01-21 11:56 UTC by Mark Wielaard
Modified: 2009-04-01 15:28 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Wielaard 2009-01-21 11:56:16 UTC
Unless you know the names of the markers put into a binary it is hard to place
any probes because currently trying to list the markers with stap -l will return
the translated process("bla").statement(123456789) probe points, which don't
tell you much about what exactly will be probed.

Likewise stap -L should print argument names (and types) if possible.
Comment 1 Stan Cox 2009-02-16 19:53:21 UTC
This works fine, modulo one gets a line number instead of a label name, for gcc
where there are DW_TAG_label that can be queried:
stap -c ./static_uprobes.x -l  'process("static_uprobes.x").mark("*")'
process("static_uprobes.x").function("bar@static_uprobes.c:11")
process("static_uprobes.x").function("baz@static_uprobes.c:17")
process("static_uprobes.x").function("baz@static_uprobes.c:20")
process("static_uprobes.x").function("buz@static_uprobes.c:28")
gcc compiled probes all use .label now.

This is a tough one for g++ 4.3.2 because there are usually no DW_TAG_label to
query so everything is done by converting info in .probe to .statement,
therefore there is no obvious way to hook into the -l machinery.
Comment 2 Mark Wielaard 2009-02-17 09:28:23 UTC
Thanks for looking into this Stan. I finally get the idea now.
So I think we actually have two issues (maybe open a two separate bug reports
for them).

First in case of having only statement probes available to translate the mark()
probes we cannot easily list all the statement() probes for them.

Secondly by translating the mark() probes to either function() or statement()
probes and having -l list these translated probes the user doesn't really get a
list of available mark() probe names (so they won't actually know which mark("*)
probe gc-begin, transaction-end, etc) corresponds to which or actually which
ones are available by running -l (but maybe that isn't the purpose of -l and we
need some other mechanism for that?)
Comment 3 Stan Cox 2009-02-25 22:37:14 UTC
commit: 3c1f71d54d

* tapsets.cxx (dwflpp::build): Use .label for listing mode.
Comment 4 Mark Wielaard 2009-03-27 11:08:50 UTC
This broke again with the switch to always using the .probes section.
Comment 5 Stan Cox 2009-04-01 15:28:55 UTC
commit: c5746f91b1
Customize .mark -l output.