This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

odd behavior in stap statement probes with varied wildcards


Description:
statement("*@<file>:<line>") *doesn't* find the probe point
statement("<function>@<file>:<line>") *does* find the probe point.
statement("*@<file>:*") *does* find the probe point (grepped)
statement("*@<file>:0,<line>") *does* find the probe point
statement("*@<file>:<line>,<line>) *does* find the probe point

Theory: Possible interaction bug with the wildcarding between function
specifier and line number specifier which is somehow overridden with
comma-separated line specifier or line-number wildcarding.

I'm a bit familiar with this code, so I can put some eyeballs on it.

---
This is a transcript that I've modified just to simplify the binary
name to 'Binary', the source file to 'foo.h', and the function name to
'myfunction' from their original (very unreadable) values.
---
[root@buildvm-2adb537a-8af2-4184-9f64-42c3a9329afa ~]# stap -v -e
'global tmp318; probe process("Binary").statement("*@*/foo.h:0,366")
if (tmp318 == 0) { tmp318++; println(pp()); }'
Pass 1: parsed user script and 111 library script(s) using
207960virt/35752res/3164shr/32876data kb, in 170usr/10sys/183real ms.
Pass 2: analyzed script: 1 probe(s), 1 function(s), 0 embed(s), 1
global(s) using 234888virt/63464res/3864shr/59804data kb, in
420usr/30sys/453real ms.
Pass 3: using cached
/root/.systemtap/cache/30/stap_30b7d2b815e7a2fe3fae6880268de171_1826.c
Pass 4: using cached
/root/.systemtap/cache/30/stap_30b7d2b815e7a2fe3fae6880268de171_1826.ko
Pass 5: starting run.
^CPass 5: run completed in 0usr/10sys/2652real ms.
[root@buildvm-2adb537a-8af2-4184-9f64-42c3a9329afa ~]# stap -v -e
'global tmp318; probe process("Binary").statement("*@*/foo.h:366,0")
if (tmp318 == 0) { tmp318++; println(pp()); }'
Pass 1: parsed user script and 111 library script(s) using
207960virt/35752res/3164shr/32876data kb, in 150usr/10sys/169real ms.
Pass 2: analyzed script: 1 probe(s), 1 function(s), 0 embed(s), 1
global(s) using 234884virt/63460res/3864shr/59800data kb, in
400usr/50sys/447real ms.
Pass 3: using cached
/root/.systemtap/cache/30/stap_30b7d2b815e7a2fe3fae6880268de171_1826.c
Pass 4: using cached
/root/.systemtap/cache/30/stap_30b7d2b815e7a2fe3fae6880268de171_1826.ko
Pass 5: starting run.
^CPass 5: run completed in 0usr/10sys/3418real ms.
[root@buildvm-2adb537a-8af2-4184-9f64-42c3a9329afa ~]# stap -v -e
'global tmp318; probe process("Binary").statement("*@*/foo.h:366") if
(tmp318 == 0) { tmp318++; println(pp()); }'
Pass 1: parsed user script and 111 library script(s) using
207972virt/35752res/3164shr/32888data kb, in 160usr/10sys/169real ms.
semantic error: no line records for foo.h:366 [man error::dwarf]

semantic error: while resolving probe point: identifier 'process' at
<input>:1:22
        source: global tmp318; probe
process("Binary").statement("*@*/foo.h:366") if (tmp318 == 0) {
tmp318++; println(pp()); }
                                     ^

semantic error: no match

Pass 2: analyzed script: 0 probe(s), 0 function(s), 0 embed(s), 1
global(s) using 224812virt/53188res/3816shr/49728data kb, in
120usr/20sys/140real ms.
Pass 2: analysis failed.  [man error::pass2]
[root@buildvm-2adb537a-8af2-4184-9f64-42c3a9329afa ~]# stap -l
'process("Binary").statement("*@*/foo.h:*")' | grep 'foo.h:366'
process("Binary").statement("myfunction@foo.h:366")
[root@buildvm-2adb537a-8af2-4184-9f64-42c3a9329afa ~]# stap -l
'process("Binary").statement("*@*/foo.h:366")'
[root@buildvm-2adb537a-8af2-4184-9f64-42c3a9329afa ~]# echo $?
1
[root@buildvm-2adb537a-8af2-4184-9f64-42c3a9329afa ~]#
[root@buildvm-2adb537a-8af2-4184-9f64-42c3a9329afa ~]# stap -l
'process("Binary").statement("myfunction@foo.h:366")'
process("Binary").statement("myfunction@foo.h:366")
[root@buildvm-2adb537a-8af2-4184-9f64-42c3a9329afa ~]#


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]