This is the mail archive of the
systemtap@sources.redhat.com
mailing list for the systemtap project.
Tracing VFS layer
- From: Prasanna S Panchamukhi <prasanna at in dot ibm dot com>
- To: systemtap at sources dot redhat dot com
- Date: Fri, 24 Jun 2005 17:43:43 +0530
- Subject: Tracing VFS layer
- Reply-to: prasanna at in dot ibm dot com
Hi,
Tracing of VFS layer.
There are four interesting VFS objects, which most of the users
would like to trace.
I have listed the VFS objects, filesystems, operations on specific vfs
objects below. Examples scripts are provided in the last section.
Your comments are welcome.
Thanks
Prasanna
1. Below are the list of VFS objects.
<VFS objects> are : superblock
inode
file
dentry
Few more VFS objects can be traced, such as struct file_system_type, and
struct vfsmount.
2. Below are the list of file systems present in linux 2.6 version
<filesystem type> : adfs
affs
afs
autofs
autofs4
befs
bfs
cifs
coda
cramfs
debugfs
devfs
devpts
efs
exportfs
ext2
ext3
fat
freevxfs
hfs
hfsplus
hostfs
hpfs
hppfs
hugetlbfs
3. Below are the list of operations on superblock object.
<superblock operation> :
alloc_inode
destroy_inode
read_inode
dirty_inode
write_inode
put_inode
drop_inode
delete_inode
put_super
write_super
sync_fs
write_super_lockfs
unlockfs
statfs
remount_fs
clear_inode
umount_begin
show_options
quota_read
quota_write
4. Below are the list of operation on inode object.
<inode operation> :
create
lookup
link
unlink
symlink
mkdir
rmdir
mknod
rename
readlink
follow_link
put_link
truncate
permission
setattr
getattr
setxattr
getxattr
listxattr
removexattr
5. Below are the list of operation on file object.
<file operation>:
llseek
read
aio_read
write
aio_write
readdir
poll
ioctl
unlocked_ioctl
compat_ioctl
mmap
open
flush
release
fsync
aio_fsync
fasync
lock
readv
writev
sendfile
sendpage
get_unmapped_area
check_flags
dir_notify
flock
6. Below are the list of operations on dentry object.
<dentry operation>:
d_revalidate
d_hash
d_compare
d_delete
d_release
d_iput
7. Possible user options to trace the VFS layer
1. User can write scripts to put probe on individual routine that acts
upon a particular object. For example if a user want to put probes
on all the routines that act on superblock and log some elements.
VFS:superblock:ext3:alloc_inode {
trace( "blocksize = ". string($sb->s_blocksize),
"s_dev= ". string($sb->s_dev),
"s_type= ". string($sb->s_type)
);
}
VFS:superblock:ext3:write_super {
trace( "blocksize = ". string($sb->s_blocksize),
"s_dev= ". string($sb->s_dev),
"s_type= ". string($sb->s_type)
);
}
In the example below user wants of put probes on the routines
that act on dentry object and log some elements.
VFS:dentry:devfs:d_iput {
trace( "d_count= ". string($dentry->d_count),
"d_flag= ". string($dentry->d_flag)
);
}
VFS:dentry:devfs:d_release {
trace( "d_count= ". string($dentry->d_count),
"d_flag= ". string($dentry->d_flag)
);
}
--
Prasanna S Panchamukhi
Linux Technology Center
India Software Labs, IBM Bangalore
Ph: 91-80-25044636
<prasanna@in.ibm.com>