summaryrefslogtreecommitdiffstats
path: root/tapset/nfs.stp
diff options
context:
space:
mode:
authorDavid Smith <dsmith@redhat.com>2009-11-16 15:53:33 -0600
committerDavid Smith <dsmith@redhat.com>2009-11-16 15:53:33 -0600
commite7c84665f79fd944371c2c49e57189ed1f6cee6d (patch)
treef0b604ad1f14accd620a0f69388bc771687b48e5 /tapset/nfs.stp
parent5409e5bf98ddc994931754d0cb1cae36ba9a08fd (diff)
downloadsystemtap-steved-e7c84665f79fd944371c2c49e57189ed1f6cee6d.tar.gz
systemtap-steved-e7c84665f79fd944371c2c49e57189ed1f6cee6d.tar.xz
systemtap-steved-e7c84665f79fd944371c2c49e57189ed1f6cee6d.zip
PR 5150 partial fixes. Added support for nfs_file_fsync.
* tapset/nfs.stp(nfs.fop.fsync): Added support for nfs_file_fsync. (nfs.fop.fsync.return): Ditto. (nfs.aop.readpages.return): Fixed 'size' bug. (nfs.aop.write_begin): Renamed to make 'nfs.*.*' probes work correctly. (nfs.aop.write_end): Ditto. (__nfs.aop.write_begin): Ditto. (__nfs.aop.write_end): Ditto. (__nfs.aop.prepare_write): Ditto. (__nfs.aop.commit_write): Ditto. (nfs.fop.aio_read.return): Always sets 'units'. (nfs.fop.aio_write.return): Ditto. (nfs.fop.sendfile.return): Ditto.
Diffstat (limited to 'tapset/nfs.stp')
-rw-r--r--tapset/nfs.stp77
1 files changed, 40 insertions, 37 deletions
diff --git a/tapset/nfs.stp b/tapset/nfs.stp
index 7d0ebc35..50bdc087 100644
--- a/tapset/nfs.stp
+++ b/tapset/nfs.stp
@@ -450,8 +450,8 @@ probe nfs.fop.aio_read.return = kernel.function ("nfs_file_read").return !,
if ($return > 0) {
size = $return
- units = "bytes"
}
+ units = "bytes"
}
/* probe nfs.fop.aio_write
@@ -503,8 +503,8 @@ probe nfs.fop.aio_write.return = kernel.function("nfs_file_write").return !,
if ($return > 0) {
size = $return
- units = "bytes"
}
+ units = "bytes"
}
/* probe nfs.fop.mmap
@@ -669,7 +669,9 @@ probe nfs.fop.release.return = kernel.function("nfs_file_release").return !,
* ino : inode number
* ndirty : number of dirty pages
*/
-probe nfs.fop.fsync = kernel.function("nfs_fsync") !,
+probe nfs.fop.fsync = kernel.function("nfs_file_fsync") !,
+ module("nfs").function("nfs_file_fsync") !,
+ kernel.function("nfs_fsync") !,
module("nfs").function("nfs_fsync")
{
dev = __file_dev($file)
@@ -683,7 +685,9 @@ probe nfs.fop.fsync = kernel.function("nfs_fsync") !,
argstr = sprintf("%d", ino)
}
-probe nfs.fop.fsync.return = kernel.function("nfs_fsync").return !,
+probe nfs.fop.fsync.return = kernel.function("nfs_file_fsync").return !,
+ module("nfs").function("nfs_file_fsync").return !,
+ kernel.function("nfs_fsync").return !,
module("nfs").function("nfs_fsync").return
{
name = "nfs.fop.fsync.return"
@@ -782,8 +786,8 @@ probe nfs.fop.sendfile.return = kernel.function("nfs_file_sendfile").return !,
if ($return > 0) {
size = $return
- units = "bytes"
}
+ units = "bytes"
}
%)
@@ -816,8 +820,8 @@ probe nfs.aop.entries = nfs.aop.readpage,
nfs.aop.writepage,
nfs.aop.writepages,
nfs.aop.release_page ?,
- nfs.aop.__write_begin_func,
- nfs.aop.__write_end_func
+ nfs.aop.write_begin,
+ nfs.aop.write_end
{
}
@@ -826,8 +830,8 @@ probe nfs.aop.return = nfs.aop.readpage.return,
nfs.aop.writepage.return,
nfs.aop.writepages.return,
nfs.aop.release_page.return ?,
- nfs.aop.__write_begin_func.return,
- nfs.aop.__write_end_func.return
+ nfs.aop.write_begin.return,
+ nfs.aop.write_end.return
{
}
@@ -922,9 +926,8 @@ probe nfs.aop.readpages.return = kernel.function ("nfs_readpages").return !,
name = "nfs.aop.readpages.return"
retstr = sprintf("%d", $return)
- if ($return > 0 )
- {
- size = retstr
+ if ($return > 0 ) {
+ size = $return
}
units = "pages"
}
@@ -1069,28 +1072,28 @@ probe nfs.aop.writepages.return = kernel.function ("nfs_writepages").return !,
# nfs_write_begin()/nfs_write_end(). So, we try to find whatever the
# current kernel has.
-probe nfs.aop.__write_begin_func = nfs.aop.write_begin !,
- nfs.aop.prepare_write
+probe nfs.aop.write_begin = __nfs.aop.write_begin !,
+ __nfs.aop.prepare_write
{
}
-probe nfs.aop.__write_begin_func.return
- = nfs.aop.write_begin.return !,
- nfs.aop.prepare_write.return
+probe nfs.aop.write_begin.return
+ = __nfs.aop.write_begin.return !,
+ __nfs.aop.prepare_write.return
{
}
-probe nfs.aop.__write_end_func = nfs.aop.write_end !,
- nfs.aop.commit_write
+probe nfs.aop.write_end = __nfs.aop.write_end !,
+ __nfs.aop.commit_write
{
}
-probe nfs.aop.__write_end_func.return
- = nfs.aop.write_end.return !,
- nfs.aop.commit_write.return
+probe nfs.aop.write_end.return
+ = __nfs.aop.write_end.return !,
+ __nfs.aop.commit_write.return
{
}
-probe nfs.aop.write_begin = kernel.function ("nfs_write_begin") !,
- module("nfs").function("nfs_write_begin")
+probe __nfs.aop.write_begin = kernel.function ("nfs_write_begin") !,
+ module("nfs").function("nfs_write_begin")
{
dev = __file_dev($file)
ino = __file_ino($file)
@@ -1105,7 +1108,7 @@ probe nfs.aop.write_begin = kernel.function ("nfs_write_begin") !,
units = "bytes"
}
-probe nfs.aop.write_begin.return
+probe __nfs.aop.write_begin.return
= kernel.function ("nfs_write_begin").return !,
module("nfs").function ("nfs_write_begin").return
{
@@ -1113,8 +1116,8 @@ probe nfs.aop.write_begin.return
retstr = sprintf("%d", $return)
}
-probe nfs.aop.write_end = kernel.function ("nfs_write_end") !,
- module("nfs").function("nfs_write_end")
+probe __nfs.aop.write_end = kernel.function ("nfs_write_end") !,
+ module("nfs").function("nfs_write_end")
{
dev = __file_dev($file)
ino = __file_ino($file)
@@ -1129,8 +1132,9 @@ probe nfs.aop.write_end = kernel.function ("nfs_write_end") !,
units = "bytes"
}
-probe nfs.aop.write_end.return = kernel.function ("nfs_write_end").return !,
- module("nfs").function("nfs_write_end").return
+probe __nfs.aop.write_end.return
+ = kernel.function ("nfs_write_end").return !,
+ module("nfs").function("nfs_write_end").return
{
name = "nfs.aop.write_end.return"
retstr = sprintf("%d", $return)
@@ -1156,8 +1160,8 @@ probe nfs.aop.write_end.return = kernel.function ("nfs_write_end").return !,
* in the page frame
* size : write bytes
*/
-probe nfs.aop.prepare_write = kernel.function ("nfs_prepare_write") !,
- module("nfs").function ("nfs_prepare_write")
+probe __nfs.aop.prepare_write = kernel.function ("nfs_prepare_write") !,
+ module("nfs").function ("nfs_prepare_write")
{
__page = $page
dev = __page_dev(__page)
@@ -1176,7 +1180,7 @@ probe nfs.aop.prepare_write = kernel.function ("nfs_prepare_write") !,
units = "bytes"
}
-probe nfs.aop.prepare_write.return =
+probe __nfs.aop.prepare_write.return =
kernel.function ("nfs_prepare_write").return !,
module("nfs").function ("nfs_prepare_write").return
{
@@ -1204,16 +1208,15 @@ probe nfs.aop.prepare_write.return =
* in the page frame
* size : write bytes
*/
-probe nfs.aop.commit_write = kernel.function ("nfs_commit_write") !,
- module("nfs").function ("nfs_commit_write")
+probe __nfs.aop.commit_write = kernel.function ("nfs_commit_write") !,
+ module("nfs").function ("nfs_commit_write")
{
- __page = $page
+ __page = $page
dev = __page_dev(__page)
ino = __page_ino(__page)
offset = $offset
to = $to
-
i_flag = __p2i_flag($page)
i_size = __p2i_size($page)
@@ -1229,7 +1232,7 @@ probe nfs.aop.commit_write = kernel.function ("nfs_commit_write") !,
units = "bytes"
}
-probe nfs.aop.commit_write.return =
+probe __nfs.aop.commit_write.return =
kernel.function ("nfs_commit_write").return !,
module("nfs").function ("nfs_commit_write").return
{