public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* Providing device number and inode number information in VFS probes
@ 2008-07-09  2:22 K.Prasad
  2008-07-09 11:00 ` Frank Ch. Eigler
  0 siblings, 1 reply; 2+ messages in thread
From: K.Prasad @ 2008-07-09  2:22 UTC (permalink / raw)
  To: SystemTap Mailing list

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Providing device number and inode number information in VFS probes
  2008-07-09  2:22 Providing device number and inode number information in VFS probes K.Prasad
@ 2008-07-09 11:00 ` Frank Ch. Eigler
  0 siblings, 0 replies; 2+ messages in thread
From: Frank Ch. Eigler @ 2008-07-09 11:00 UTC (permalink / raw)
  To: prasad; +Cc: SystemTap Mailing list

"K.Prasad" <prasad@linux.vnet.ibm.com> writes:

> 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).
> [...]

Very good.  Would you mind also updating the doc/tutorial.tex file's
vfs example to use the tapset and these variables?  Unfortunately, we
lack formal documentation for the tapset in man pages, so there is
nowhere else immediately ready to receive a few more lines.

- FChE

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-07-09 11:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-07-09  2:22 Providing device number and inode number information in VFS probes K.Prasad
2008-07-09 11:00 ` Frank Ch. Eigler

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).