newbie question : how to access ptr->member.member->data?
Srikar Dronamraju
srikar@linux.vnet.ibm.com
Thu Aug 21 07:06:00 GMT 2008
Hi Om,
Please do mention the kernel version when you are referring to a
problem. Because structures might have changed accordingly.
> Hi,
> Trying out systemtap. Running into this problem.
>
> --script begin--
> [om@testserv ~]$ cat /space/stap/inode-watch.stp
> # Usage:
> # taps the vfs_write and vfs_read
> #
>
> probe kernel.function ("vfs_read"), kernel.function("vfs_write")
> {
> inode = $file->f_dentry->d_inode->i_ino
> dev_nr = $file->f_dentry->d_inode->i_sb->s_dev
>
> }
> -- script end--
>
> I know why the error occur.
> From include/linux/fs.h,
> #define f_dentry f_path.dentry
>
> Apparently f_dentry cannot be used from systemtap.
> If I replace f_dentry with fpath.dentry, systemtap complains about string
> operations because `.` is string concatenation operator.
>
> Any idea? Any pointers?
Try f_path->dentry.
"." in stap language is a concatenation operator.
--
Thanks and Regards
Srikar
More information about the Systemtap
mailing list