Simplifying examples by improving vfs tapset
William Cohen
wcohen@redhat.com
Mon Oct 27 14:54:00 GMT 2008
I am looking through the examples being used in the SystemTap
beginners guide and trying to streamline them a bit. One
simplification is the minimize the use of raw kernel.function() and
module().function() probes by using tapset aliases instead. Probing
the raw C functions is not so meaningful for average users. Plus they
don't know what arguments might be available at those functions. The
tapsets should minimize raw functions. When looking to convert some of
the probes to use the vfs tapsets, I noticed that a number of the vfs
tapsets don't have dev or devname defined, e.g. vfs.read{.return} and
vfs.write{.return}. This result in ugly code such as in disktop.stp
probe handlers:
dev = __file_dev($file)
devname = __find_bdevname(dev,__file_bdev($file))
The dev and devname should be consistently available for vfs
tapset. This would eliminate the need for internal systemtap tapset
functions to be used in the probe handlers and would make examples
such as disktop.stp simpler. There appears to be ugliness in
systemtap.examples/io/iostat-scsi.stp.
Attached is the suggested patch to for the vfs.stp stapset and the disktop.stp
example.
-Will
-------------- next part --------------
A non-text attachment was scrubbed...
Name: vfs.diff
Type: text/x-patch
Size: 3316 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/systemtap/attachments/20081027/687ae005/attachment.bin>
More information about the Systemtap
mailing list