From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9634 invoked by alias); 30 Mar 2006 14:48:02 -0000 Received: (qmail 9626 invoked by uid 22791); 30 Mar 2006 14:48:02 -0000 X-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 30 Mar 2006 14:48:01 +0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11.20060308/8.12.11) with ESMTP id k2UElw9o016115; Thu, 30 Mar 2006 09:47:59 -0500 Received: from pobox.corp.redhat.com (pobox.corp.redhat.com [172.16.52.156]) by int-mx1.corp.redhat.com (8.12.11.20060308/8.11.6) with ESMTP id k2UElwRD018617; Thu, 30 Mar 2006 09:47:58 -0500 Received: from [172.16.59.118] (dhcp59-118.rdu.redhat.com [172.16.59.118]) by pobox.corp.redhat.com (8.12.8/8.12.8) with ESMTP id k2UElwM6010357; Thu, 30 Mar 2006 09:47:58 -0500 Message-ID: <442BEF9D.4090401@redhat.com> Date: Thu, 30 Mar 2006 14:48:00 -0000 From: William Cohen User-Agent: Mozilla Thunderbird 1.0.7-1.1.fc4 (X11/20050929) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Kevin Jia CC: systemtap@sourceware.org Subject: Re: help-inode-watch error References: <30c154100603300331n50a03a3dyd1c9ea7a39b4a3df@mail.gmail.com> In-Reply-To: <30c154100603300331n50a03a3dyd1c9ea7a39b4a3df@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact systemtap-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Post: List-Help: , Sender: systemtap-owner@sourceware.org X-SW-Source: 2006-q1/txt/msg00898.txt.bz2 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