systemtap question..

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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--
--errors begin--
[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
This is free software; see the source for copying conditions.
Created temporary directory "/tmp/stap6uzgp4"
Searched '/usr/share/systemtap/tapset/x86_64/*.stp', found 1
Searched '/usr/share/systemtap/tapset/*.stp', found 37
Pass 1: parsed user script and 38 library script(s) in 130usr/0sys/134real ms. probe vfs_read@fs/read_write.c:257 kernel section=.text pc=0xffffffff81098064 probe vfs_write@fs/read_write.c:315 kernel section=.text pc=0xffffffff81097eed semantic error: field 'f_dentry' not found (alternatives: f_u f_path f_op f_count f_flags f_mode f_pos f_owner f_uid f_gid f_ra f_version f_security private_data f_ep_links f_ep_lock f_mapping): identifier '$file' at /space/stap/inode-watch.stp:7:10 semantic error: field 'f_dentry' not found (alternatives: f_u f_path f_op f_count f_flags f_mode f_pos f_owner f_uid f_gid f_ra f_version f_security private_data f_ep_links f_ep_lock f_mapping): identifier '$file' at /space/stap/inode-watch.stp:8:11 semantic error: probe_1063 with unresolved type: identifier 'inode' at /space/stap/inode-watch.stp:7:2 semantic error: probe_1063 with unresolved type: identifier 'dev_nr' at /space/stap/inode-watch.stp:8:2 semantic error: probe_1064 with unresolved type: identifier 'inode' at /space/stap/inode-watch.stp:7:2 semantic error: probe_1064 with unresolved type: identifier 'dev_nr' at /space/stap/inode-watch.stp:8:2 Pass 2: analyzed script: 2 probe(s), 0 function(s), 0 embed(s), 0 global(s) in 230usr/70sys/306real ms.
Pass 2: analysis failed.  Try again with more '-v' (verbose) options.
Running rm -rf /tmp/stap6uzgp4
--errors 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?

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


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux