public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
From: "Stone, Joshua I" <joshua.i.stone@intel.com>
To: Roland McGrath <roland@redhat.com>,
	"systemtap@sources.redhat.com" 	<systemtap@sources.redhat.com>
Subject: RE: $foo in probe predicates
Date: Wed, 07 Jan 2009 22:19:00 -0000	[thread overview]
Message-ID: <60BA3EDE80604C4BAEE4AAF7FF714D18CC06F66B@orsmsx504.amr.corp.intel.com> (raw)
In-Reply-To: <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

  reply	other threads:[~2009-01-07 22:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-07 22:09 Roland McGrath
2009-01-07 22:19 ` Stone, Joshua I [this message]
2009-01-07 23:54 ` Frank Ch. Eigler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=60BA3EDE80604C4BAEE4AAF7FF714D18CC06F66B@orsmsx504.amr.corp.intel.com \
    --to=joshua.i.stone@intel.com \
    --cc=roland@redhat.com \
    --cc=systemtap@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).