public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
From: Roland McGrath <roland@redhat.com>
To: systemtap@sources.redhat.com
Subject: $foo in probe predicates
Date: Wed, 07 Jan 2009 22:09:00 -0000	[thread overview]
Message-ID: <20090107220903.9BB49FC305@magilla.sf.frob.com> (raw)


-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

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

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-07 22:09 Roland McGrath [this message]
2009-01-07 22:19 ` Stone, Joshua I
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=20090107220903.9BB49FC305@magilla.sf.frob.com \
    --to=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).