Peter Teoh wrote:
On Thu, Aug 21, 2008 at 1:24 PM, Om Narasimhan <om.turyx@xxxxxxxxx> wrote:
[om@testserv ~]$ stap -vv -u /space/stap/inode-watch.stp
SystemTap translator/driver (version 0.6.2/0.127 built 2008-03-27)
Copyright (C) 2005-2008 Red Hat, Inc. and others
my version (not the latest though) has no problem compiling:
/mnt/hd0/download/linux-2.6-latest/stp>stap -V
SystemTap translator/driver (version 0.7.1/0.131 non-git sources)
Copyright (C) 2005-2008 Red Hat, Inc. and others
This is free software; see the source for copying conditions.
but runtime it hanged and freezed.....which i am trying to determine why.
I think my code snippet was wrong. Actually, it should be something like,
$ cat /space/stap/inode-watch.stp
# input device number and inode number, this prints out who accesses the
file
#
probe kernel.function ("vfs_read"), kernel.function("vfs_write")
{
inode = $file->f_path->dentry->d_inode->i_ino
dev_nr = $file->f_path->dentry->d_inode->i_sb->s_dev
if(inode == $1 && (dev_nr == ($2 << 20 | $3))){
printf("%s(%d) -> %s\n", execname(), pid(), probefunc())
}
}
When I took out the f_dentry, (which is #defined in fs.h) and replaced
it with f_path->dentry (in C, it would be f_path.dentry), it started
working fine.
So, it may not be a bug with systemtap after all.
But if f_dentry is supposed to work, it would be a bug. I don't know
about this.
Thanks,
Om.
--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ