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]

$foo in probe predicates


-bash-3.2$ ./run-stap -c 'cat < /dev/null' -e 'probe kernel.function("sys_read") { if ($fd == 0) printf("%d %d\n", $fd, $count) }'
0 4096
-bash-3.2$ ./run-stap -c 'cat < /dev/null' -e 'probe kernel.function("sys_read") if ($fd == 0) { printf("%d %d\n", $fd, $count) }'
semantic error: unresolved target-symbol expression: identifier '$fd' at <input>:1:39
        source: probe kernel.function("sys_read") if ($fd == 0) { printf("%d %d\n", $fd, $count) }
                                                      ^
Pass 2: analysis failed.  Try again with another '--vp 01' option.
-bash-3.2$ 


AFAICT this makes it impossible to do:

probe foo.bar = kernel.function("blah") if ($arg == 1) { argstr=... }
probe foo.baz = kernel.function("blah") if ($arg == 2) { argstr=... }

and I don't know how else I could get the same effect.  That is, so:

probe foo.bar { print... }

does not print on $arg!=1 cases, with the knowedlge about $arg and its
values being hidden in the tapset.


Thanks,
Roland


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