This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
$foo in probe predicates
- From: Roland McGrath <roland at redhat dot com>
- To: systemtap at sources dot redhat dot com
- Date: Wed, 7 Jan 2009 14:09:03 -0800 (PST)
- Subject: $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