public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
From: William Cohen <wcohen@redhat.com>
To: Kevin Jia <jiaminghao@gmail.com>
Cc: systemtap@sourceware.org
Subject: Re: help-inode-watch error
Date: Thu, 30 Mar 2006 14:48:00 -0000	[thread overview]
Message-ID: <442BEF9D.4090401@redhat.com> (raw)
In-Reply-To: <30c154100603300331n50a03a3dyd1c9ea7a39b4a3df@mail.gmail.com>

Kevin Jia wrote:
> inode-watch.stp  (in systemtap tutorial) source code:
> 
> probe kernel.function ("vfs_write"),
>       kernel.function ("vfs_read")
> {
>         dev_nr = $file->f_dentry->d_inode->i_sb->s_dev
>         inode_nr = $file->f_dentry->d_inode->i_ino
>         if (dev_nr == ($1 << 20 | $2) && inode_nr == $3)
>         printf ("%s(%d) %s 0x%x/%u\n",
>         execname(), pid(), probefunc(), dev_nr, inode_nr)
> }
> 
> but have errors about $1,$2,$3, the information:
> 
> semantic error: unable to find local '1' near pc 0xc015b304:
> identifier '$1' at inode-watch.stp:7:17
> semantic error: unable to find local '2' near pc 0xc015b304:
> identifier '$2' at inode-watch.stp:7:28
> semantic error: unable to find local '3' near pc 0xc015b304:
> identifier '$3' at inode-watch.stp:7:47
> semantic error: due to failed target variable resolution
> semantic error: no match for probe point
>          while: resolving probe point kernel.function("vfs_write")
> semantic error: unable to find local '1' near pc 0xc015b096:
> identifier '$1' at inode-watch.stp:7:17
> semantic error: unable to find local '2' near pc 0xc015b096:
> identifier '$2' at inode-watch.stp:7:28
> semantic error: unable to find local '3' near pc 0xc015b096:
> identifier '$3' at inode-watch.stp:7:47
> semantic error: due to failed target variable resolution
> semantic error: no match for probe point
>          while: resolving probe point kernel.function("vfs_read")
> Pass 2: analysis failed.  Try again with '-v' (verbose) option.
> 
> Why? Thank you.

Which version of systemtap are you using? It looks like the version of 
stap you are using is interpretting them as local variables. Do you have 
a relatively recent version of stap (one around mid march))? The $1, $2, 
and $3 refer to arguments on the command line. Take a look at the 
example in the tutorial and there are additional arguments on command line.

-Will

  reply	other threads:[~2006-03-30 14:48 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-30 11:31 Kevin Jia
2006-03-30 14:48 ` William Cohen [this message]
     [not found]   ` <30c154100603301724u4a967b8bgab10156c5d4befca@mail.gmail.com>
2006-03-31  3:45     ` William Cohen

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=442BEF9D.4090401@redhat.com \
    --to=wcohen@redhat.com \
    --cc=jiaminghao@gmail.com \
    --cc=systemtap@sourceware.org \
    /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).