public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* help-inode-watch error
@ 2006-03-30 11:31 Kevin Jia
  2006-03-30 14:48 ` William Cohen
  0 siblings, 1 reply; 3+ messages in thread
From: Kevin Jia @ 2006-03-30 11:31 UTC (permalink / raw)
  To: systemtap

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.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: help-inode-watch error
  2006-03-30 11:31 help-inode-watch error Kevin Jia
@ 2006-03-30 14:48 ` William Cohen
       [not found]   ` <30c154100603301724u4a967b8bgab10156c5d4befca@mail.gmail.com>
  0 siblings, 1 reply; 3+ messages in thread
From: William Cohen @ 2006-03-30 14:48 UTC (permalink / raw)
  To: Kevin Jia; +Cc: systemtap

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: help-inode-watch error
       [not found]   ` <30c154100603301724u4a967b8bgab10156c5d4befca@mail.gmail.com>
@ 2006-03-31  3:45     ` William Cohen
  0 siblings, 0 replies; 3+ messages in thread
From: William Cohen @ 2006-03-31  3:45 UTC (permalink / raw)
  To: Kevin Jia, SystemTAP

Kevin Jia wrote:
>>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))?
> 
> 
> Version of systemtap is  0.5.3 build 01-17-2006. Can you send me the
> new version ?

There are instructions on build the latest version at:

http://sourceware.org/systemtap/build.html

> I am a beginner of systemtap. I have think
> about this carefully, but also have many confusions that how use
> systemtap trace interrupt. Does systemtap can recognise the function
> "foo_interrupt_handler", "bar_interrupt_handler"...? Can you support
> me a example about trace a interrupt? I need the detail to research
> vexedly.
> 
> thank you very much.

I am not quite sure what your question is. SystemTap can place probes on 
various functions in the kernel. If the naming scheme of the interrupts 
is reasonable, you could use the wild card notation to put probes on a 
group of functions. You might do a "man stapprobes" to get more 
information about that.

cscope can give you some insight in the the static call tree in the kernel.

http://cscope.sourceforge.net/

-Will

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2006-03-31  3:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-03-30 11:31 help-inode-watch error Kevin Jia
2006-03-30 14:48 ` William Cohen
     [not found]   ` <30c154100603301724u4a967b8bgab10156c5d4befca@mail.gmail.com>
2006-03-31  3:45     ` William Cohen

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).