This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Providing device number and inode number information in VFS probes
- From: "K.Prasad" <prasad at linux dot vnet dot ibm dot com>
- To: SystemTap Mailing list <systemtap at sources dot redhat dot com>
- Date: Wed, 9 Jul 2008 07:51:53 +0530
- Subject: Providing device number and inode number information in VFS probes
- Reply-to: prasad at linux dot vnet dot ibm dot com
Hi All,
Please find a small patch below that adds device number and
inode number information in many VFS related probes (basically wherever
a file pointer is available).
If I don't hear any objections to this in a day or so, I plan to commit
it to the VFS tapset.
Thanks,
K.Prasad
This patch uses the variables dev and ino to populate them with device
and inode number respectively.
Signed-off-by: K.Prasad <prasad@linux.vnet.ibm.com>
---
tapset/vfs.stp | 14 ++++++++++++++
1 file changed, 14 insertions(+)
Index: systemtap/tapset/vfs.stp
===================================================================
--- systemtap.orig/tapset/vfs.stp
+++ systemtap/tapset/vfs.stp
@@ -792,6 +792,8 @@ probe vfs.read = kernel.function ("vfs_r
pos = $pos
buf = $buf
bytes_to_read = $count
+ dev = __file_dev($file)
+ ino = __file_ino($file)
}
probe vfs.read.return = kernel.function ("vfs_read").return
@@ -814,6 +816,8 @@ probe vfs.readv = kernel.function ("vfs_
vec = $vec
vlen = $vlen
bytes_to_read = _get_fopv_size($vec, $vlen)
+ dev = __file_dev($file)
+ ino = __file_ino($file)
}
probe vfs.readv.return = kernel.function ("vfs_readv").return
@@ -836,6 +840,8 @@ probe vfs.write = kernel.function ("vfs_
pos = $pos
buf = $buf
bytes_to_write = $count
+ dev = __file_dev($file)
+ ino = __file_ino($file)
}
probe vfs.write.return = kernel.function ("vfs_write").return
@@ -858,6 +864,8 @@ probe vfs.writev = kernel.function("vfs_
vlen = $vlen
vec = $vec
bytes_to_write = _get_fopv_size($vec, $vlen)
+ dev = __file_dev($file)
+ ino = __file_ino($file)
}
probe vfs.writev.return = kernel.function ("vfs_writev").return
@@ -879,6 +887,8 @@ kernel.function("generic_file_readonly_m
{
file = $file
vma = $vma
+ dev = __file_dev($file)
+ ino = __file_ino($file)
}
probe _vfs.generic_file_readonly_mmap.return = kernel.function ("generic_file_readonly_mmap").return
@@ -936,6 +946,8 @@ probe _vfs.block_write_begin = kernel.fu
flags = $flags
_inode = __address_inode($mapping)
+ dev = __file_dev($file)
+ ino = __file_ino($file)
}
probe _vfs.block_write_begin.return = kernel.function ("block_write_begin").return
@@ -959,6 +971,8 @@ probe _vfs.block_write_end = kernel.func
len = $len
page = $page
_inode = __address_inode($mapping)
+ dev = __file_dev($file)
+ ino = __file_ino($file)
}
probe _vfs.block_write_end.return = kernel.function ("block_write_end").return