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]

RE: $foo in probe predicates


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


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