$foo in probe predicates
Stone, Joshua I
joshua.i.stone@intel.com
Wed Jan 7 22:19:00 GMT 2009
Roland McGrath wrote:
> [...]
> 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.
You can achieve this with "next", which is like a return statement for probes.
probe foo.bar = kernel.function("blah") { if ($arg != 1) next; argstr=... }
probe foo.baz = kernel.function("blah") { if ($arg != 2) next; argstr=... }
Josh
More information about the Systemtap
mailing list