This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
[Bug translator/16478] New: stap -l process.function.label listing not just labels
- From: "jlebon at redhat dot com" <sourceware-bugzilla at sourceware dot org>
- To: systemtap at sourceware dot org
- Date: Tue, 21 Jan 2014 20:10:50 +0000
- Subject: [Bug translator/16478] New: stap -l process.function.label listing not just labels
- Auto-submitted: auto-generated
https://sourceware.org/bugzilla/show_bug.cgi?id=16478
Bug ID: 16478
Summary: stap -l process.function.label listing not just labels
Product: systemtap
Version: unspecified
Status: NEW
Severity: normal
Priority: P2
Component: translator
Assignee: systemtap at sourceware dot org
Reporter: jlebon at redhat dot com
Compile testsuite/systemtap.base/labels.c:
$ gcc testsuite/systemtap.base/labels.c -g -lm -o labels.x
$
Then try to list the labels:
$ stap -l 'process("labels.x").function("*").label("*")'
process("/home/vm/codebase/systemtap/build/labels.x").function("__do_global_dtors_aux")
process("/home/vm/codebase/systemtap/build/labels.x").function("__libc_csu_fini")
process("/home/vm/codebase/systemtap/build/labels.x").function("__libc_csu_init")
process("/home/vm/codebase/systemtap/build/labels.x").function("__libc_start_main@@GLIBC_2.2.5")
process("/home/vm/codebase/systemtap/build/labels.x").function("_fini")
process("/home/vm/codebase/systemtap/build/labels.x").function("_init")
process("/home/vm/codebase/systemtap/build/labels.x").function("_start")
process("/home/vm/codebase/systemtap/build/labels.x").function("deregister_tm_clones")
process("/home/vm/codebase/systemtap/build/labels.x").function("foo@/home/vm/codebase/systemtap/build/labels.c:5").label("init_an_int")
process("/home/vm/codebase/systemtap/build/labels.x").function("frame_dummy")
process("/home/vm/codebase/systemtap/build/labels.x").function("main@/home/vm/codebase/systemtap/build/labels.c:16").label("init_an_int")
process("/home/vm/codebase/systemtap/build/labels.x").function("main@/home/vm/codebase/systemtap/build/labels.c:18").label("init_an_int_again")
process("/home/vm/codebase/systemtap/build/labels.x").function("main@/home/vm/codebase/systemtap/build/labels.c:21").label("ptr_inited")
process("/home/vm/codebase/systemtap/build/labels.x").function("register_tm_clones")
$
Even regular functions show up in the listing. This also happens when we
specify a label e.g. .label("ptr_inited") will still list all the functions and
labels.
I believe this is due to the function("*"), which will match all other
functions. For example, this works as expected:
$ stap -l
'process("labels.x").function("main@/home/vm/codebase/systemtap/build/labels.c").label("*")'
process("/home/vm/codebase/systemtap/build/labels.x").function("main@/home/vm/codebase/systemtap/build/labels.c:16").label("init_an_int")
process("/home/vm/codebase/systemtap/build/labels.x").function("main@/home/vm/codebase/systemtap/build/labels.c:18").label("init_an_int_again")
process("/home/vm/codebase/systemtap/build/labels.x").function("main@/home/vm/codebase/systemtap/build/labels.c:21").label("ptr_inited")
$
(Note that the main function was not listed on its own)
This also means that a script like this:
stap -e 'process("myproc").function("*").label("label_prefix*") { next }' will
not only trigger whenever labels are crossed, but also when functions are
entered. Do we want to change this behaviour?
Along these lines, it might be interesting to have a pplabel() tapset function.
--
You are receiving this mail because:
You are the assignee for the bug.