This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
RE: $foo in probe predicates
- From: "Stone, Joshua I" <joshua dot i dot stone at intel dot com>
- To: Roland McGrath <roland at redhat dot com>, "systemtap at sources dot redhat dot com" <systemtap at sources dot redhat dot com>
- Date: Wed, 7 Jan 2009 14:19:15 -0800
- Subject: RE: $foo in probe predicates
- References: <20090107220903.9BB49FC305@magilla.sf.frob.com>
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