summaryrefslogtreecommitdiffstats
path: root/tapset/nfsd.stp
diff options
context:
space:
mode:
authorSteve Dickson <steved@redhat.com>2010-03-04 09:18:47 -0500
committerSteve Dickson <steved@redhat.com>2010-03-04 09:18:47 -0500
commit35f22bd95cea2fb75573a27282f2a5edea84f2d7 (patch)
tree6b582b54990d716c9fb98300a012e80afc47baa1 /tapset/nfsd.stp
parent1dba1a69d2a16ce061ebd97269a675ee68002064 (diff)
downloadsystemtap-steved-35f22bd95cea2fb75573a27282f2a5edea84f2d7.tar.gz
systemtap-steved-35f22bd95cea2fb75573a27282f2a5edea84f2d7.tar.xz
systemtap-steved-35f22bd95cea2fb75573a27282f2a5edea84f2d7.zip
Backport recently added probes to RHEL5(U5)
Ensured the recent additions of v4 probes and supporting routines worked or at least don't break with RHEL5 U5 kernel. Signed-off-by: Steve Dickson <steved@redhat.com>
Diffstat (limited to 'tapset/nfsd.stp')
-rw-r--r--tapset/nfsd.stp159
1 files changed, 109 insertions, 50 deletions
diff --git a/tapset/nfsd.stp b/tapset/nfsd.stp
index 96fd285d..a5dc86bd 100644
--- a/tapset/nfsd.stp
+++ b/tapset/nfsd.stp
@@ -12,11 +12,12 @@
%{
#include <linux/stat.h>
+#include <linux/sunrpc/svc.h>
+
#include <linux/nfsd/nfsfh.h>
#include <linux/nfs3.h>
#include <linux/nfs4.h>
-#include <linux/sunrpc/svc.h>
%}
@@ -186,7 +187,6 @@ probe nfsd.proc.entries = nfsd.proc.lookup,
nfsd.proc.read,
nfsd.proc.write,
nfsd.proc.commit,
- nfsd.proc.compound,
nfsd.proc.remove,
nfsd.proc.rename,
nfsd.proc.create
@@ -195,8 +195,6 @@ probe nfsd.proc.entries = nfsd.proc.lookup,
probe nfsd.proc.return = nfsd.proc.lookup.return,
nfsd.proc.read.return,
nfsd.proc.write.return,
- nfsd.proc.commit.return,
- nfsd.proc.compound.return,
nfsd.proc.remove.return,
nfsd.proc.rename.return,
nfsd.proc.create.return
@@ -214,14 +212,20 @@ probe nfsd.proc.return = nfsd.proc.lookup.return,
* filename : file name
* filelen : the length of file name
*/
-probe nfsd.proc.lookup = nfsd.proc2.lookup,
- nfsd.proc3.lookup,
- nfsd.proc4.lookup
+probe nfsd.proc.lookup =
+%( kernel_v >= "2.6.25" %?
+ nfsd.proc4.lookup,
+%)
+ nfsd.proc3.lookup,
+ nfsd.proc2.lookup
{}
-probe nfsd.proc.lookup.return = nfsd.proc2.lookup.return,
- nfsd.proc3.lookup.return,
- nfsd.proc4.lookup.return
+probe nfsd.proc.lookup.return =
+%( kernel_v >= "2.6.25" %?
+ nfsd.proc4.lookup.return,
+%)
+ nfsd.proc3.lookup.return,
+ nfsd.proc2.lookup.return
{}
probe nfsd.proc2.lookup = kernel.function("nfsd_proc_lookup") !,
@@ -275,6 +279,7 @@ probe nfsd.proc3.lookup.return = kernel.function("nfsd3_proc_lookup").return !,
retstr = sprintf("%s", nfsderror($return))
}
+%( kernel_v >= "2.6.25" %?
probe nfsd.proc4.lookup = kernel.function("nfsd4_lookup") !,
module("nfsd").function("nfsd4_lookup") ?
{
@@ -299,6 +304,7 @@ probe nfsd.proc4.lookup.return = kernel.function("nfsd4_lookup").return !,
version = 4
retstr = sprintf("%s", nfsderror($return))
}
+%)
/*
*probe nfsd.proc.read
@@ -316,14 +322,20 @@ probe nfsd.proc4.lookup.return = kernel.function("nfsd4_lookup").return !,
and length of each buffer
* vlen : read blocks
*/
-probe nfsd.proc.read = nfsd.proc2.read,
- nfsd.proc3.read,
- nfsd.proc4.read
+probe nfsd.proc.read =
+%( kernel_v >= "2.6.25" %?
+ nfsd.proc4.read,
+%)
+ nfsd.proc3.read,
+ nfsd.proc2.read
{}
-probe nfsd.proc.read.return = nfsd.proc2.read.return,
- nfsd.proc3.read.return,
- nfsd.proc4.read.return
+probe nfsd.proc.read.return =
+%( kernel_v >= "2.6.25" %?
+ nfsd.proc4.read.return,
+%)
+ nfsd.proc3.read.return,
+ nfsd.proc2.read.return
{}
probe nfsd.proc2.read = kernel.function("nfsd_proc_read")!,
@@ -396,6 +408,7 @@ probe nfsd.proc3.read.return = kernel.function("nfsd3_proc_read").return!,
retstr = sprintf("%s", nfsderror($return))
}
+%( kernel_v >= "2.6.25" %?
probe nfsd.proc4.read = kernel.function("nfsd4_read") !,
module("nfsd").function("nfsd4_read") ?
{
@@ -424,6 +437,7 @@ probe nfsd.proc4.read.return = kernel.function("nfsd4_read").return!,
version = 4
retstr = sprintf("%s", nfsderror($return))
}
+%)
/*
*probe nfsd.proc.write
@@ -442,14 +456,20 @@ probe nfsd.proc4.read.return = kernel.function("nfsd4_read").return!,
* vlen : read blocks
* stable : argp->stable(only in nfs.proc3.write)
*/
-probe nfsd.proc.write = nfsd.proc2.write,
- nfsd.proc3.write,
- nfsd.proc4.write
+probe nfsd.proc.write =
+%( kernel_v >= "2.6.25" %?
+ nfsd.proc4.write,
+%)
+ nfsd.proc3.write,
+ nfsd.proc2.write
{}
-probe nfsd.proc.write.return = nfsd.proc2.write.return,
- nfsd.proc3.write.return,
- nfsd.proc4.write.return
+probe nfsd.proc.write.return =
+%( kernel_v >= "2.6.25" %?
+ nfsd.proc4.write.return,
+%)
+ nfsd.proc3.write.return,
+ nfsd.proc2.write.return
{}
probe nfsd.proc2.write = kernel.function("nfsd_proc_write")!,
@@ -492,7 +512,7 @@ probe nfsd.proc3.write = kernel.function("nfsd3_proc_write")!,
{
client_ip = addr_from_rqst_str($rqstp)
proto = $rqstp->rq_prot
- version = 3
+ version = 3
fh = & @cast($argp, "nfsd3_writeargs", "kernel:nfsd")->fh
count = $argp->count
@@ -525,6 +545,7 @@ probe nfsd.proc3.write.return = kernel.function("nfsd3_proc_write").return!,
stable = $resp->committed
}
+%( kernel_v >= "2.6.25" %?
probe nfsd.proc4.write = kernel.function("nfsd4_write") !,
module("nfsd").function("nfsd4_write") ?
{
@@ -556,6 +577,7 @@ probe nfsd.proc4.write.return = kernel.function("nfsd4_write").return!,
retstr = sprintf("%s", nfsderror($return))
}
+%)
/*
*probe nfsd.proc.commit
* Fires when client does a commit operation,which is
@@ -571,13 +593,19 @@ probe nfsd.proc4.write.return = kernel.function("nfsd4_write").return!,
* count : read bytes
* offset : the offset of file
*/
-probe nfsd.proc.commit = nfsd.proc3.commit
+probe nfsd.proc.commit =
+%( kernel_v >= "2.6.25" %?
+ nfsd.proc4.commit,
+%)
+ nfsd.proc3.commit
{}
-probe nfsd.proc.commit.return = nfsd.proc3.commit.return
-{
-
-}
+probe nfsd.proc.commit.return =
+%( kernel_v >= "2.6.25" %?
+ nfsd.proc4.commit.return,
+%)
+ nfsd.proc3.commit.return
+{}
probe nfsd.proc3.commit = kernel.function("nfsd3_proc_commit")!,
module("nfsd").function("nfsd3_proc_commit")?
@@ -607,6 +635,7 @@ probe nfsd.proc3.commit.return = kernel.function("nfsd3_proc_commit").return!,
retstr = sprintf("%s", nfsderror($return))
}
+%( kernel_v >= "2.6.25" %?
probe nfsd.proc4.commit = kernel.function("nfsd4_commit") !,
module("nfsd").function("nfsd4_commit") ?
{
@@ -624,7 +653,7 @@ probe nfsd.proc4.commit = kernel.function("nfsd4_commit") !,
units = "bytes"
}
-probe nfsd.proc4.write.commit = kernel.function("nfsd4_commit").return!,
+probe nfsd.proc4.commit.return = kernel.function("nfsd4_commit").return!,
module("nfsd").function("nfsd4_commit").return?
{
client_ip = addr_from_rqst_str($rqstp)
@@ -633,6 +662,7 @@ probe nfsd.proc4.write.commit = kernel.function("nfsd4_commit").return!,
version = 4
retstr = sprintf("%s", nfsderror($return))
}
+%)
/*
*probe nfsd.proc.create
@@ -646,13 +676,19 @@ probe nfsd.proc4.write.commit = kernel.function("nfsd4_commit").return!,
* filename : file name
* filelen : length of file name
*/
-probe nfsd.proc.create = nfsd.proc2.create,
- nfsd.proc3.create,
- nfsd.proc4.create
+probe nfsd.proc.create =
+%( kernel_v >= "2.6.25" %?
+ nfsd.proc4.create,
+%)
+ nfsd.proc3.create,
+ nfsd.proc2.create
{}
-probe nfsd.proc.create.return = nfsd.proc2.create.return,
- nfsd.proc3.create.return,
- nfsd.proc4.create.return
+probe nfsd.proc.create.return =
+%( kernel_v >= "2.6.25" %?
+ nfsd.proc4.create.return,
+%)
+ nfsd.proc3.create.return,
+ nfsd.proc2.create.return
{}
probe nfsd.proc2.create = kernel.function("nfsd_proc_create")!,
@@ -660,7 +696,7 @@ probe nfsd.proc2.create = kernel.function("nfsd_proc_create")!,
{
client_ip = addr_from_rqst_str($rqstp)
proto = $rqstp->rq_prot
- version = 2
+ version = 2
fh = & @cast($argp, "struct nfsd_createargs", "kernel:nfsd")->fh
filelen = $argp->len
@@ -707,6 +743,7 @@ probe nfsd.proc3.create.return = kernel.function("nfsd3_proc_create").return!,
retstr = sprintf("%s", nfsderror($return))
}
+%( kernel_v >= "2.6.25" %?
probe nfsd.proc4.create = kernel.function("nfsd4_create") !,
module("nfsd").function("nfsd4_create") ?
{
@@ -725,8 +762,8 @@ probe nfsd.proc4.create = kernel.function("nfsd4_create") !,
}
-probe nfsd.proc4.write.create = kernel.function("nfsd4_create").return!,
- module("nfsd").function("nfsd4_create").return?
+probe nfsd.proc4.create.return = kernel.function("nfsd4_create").return !,
+ module("nfsd").function("nfsd4_create").return ?
{
client_ip = addr_from_rqst_str($rqstp)
@@ -734,6 +771,7 @@ probe nfsd.proc4.write.create = kernel.function("nfsd4_create").return!,
version = 4
retstr = sprintf("%s", nfsderror($return))
}
+%)
/*
*probe nfsd.proc.remove
@@ -747,13 +785,19 @@ probe nfsd.proc4.write.create = kernel.function("nfsd4_create").return!,
* filename : file name
* filelen : length of file name
*/
-probe nfsd.proc.remove = nfsd.proc2.remove,
- nfsd.proc3.remove,
- nfsd.proc4.remove
+probe nfsd.proc.remove =
+%( kernel_v >= "2.6.25" %?
+ nfsd.proc4.remove,
+%)
+ nfsd.proc3.remove,
+ nfsd.proc2.remove
{}
-probe nfsd.proc.remove.return = nfsd.proc2.remove.return,
- nfsd.proc3.remove.return,
- nfsd.proc4.remove.return
+probe nfsd.proc.remove.return =
+%( kernel_v >= "2.6.25" %?
+ nfsd.proc4.remove.return,
+%)
+ nfsd.proc3.remove.return,
+ nfsd.proc2.remove.return
{}
probe nfsd.proc2.remove = kernel.function("nfsd_proc_remove")!,
@@ -806,6 +850,7 @@ probe nfsd.proc3.remove.return = kernel.function("nfsd3_proc_remove").return!,
retstr = sprintf("%s", nfsderror($return))
}
+%( kernel_v >= "2.6.25" %?
probe nfsd.proc4.remove = kernel.function("nfsd4_remove") !,
module("nfsd").function("nfsd4_remove") ?
{
@@ -831,6 +876,7 @@ probe nfsd.proc4.remove.return = kernel.function("nfsd4_remove").return!,
version = 4
retstr = sprintf("%s", nfsderror($return))
}
+%)
/*
* probe nfsd.proc.rename
* Fires when clients rename a file on server side
@@ -844,14 +890,20 @@ probe nfsd.proc4.remove.return = kernel.function("nfsd4_remove").return!,
* flen : length of old file name
* tlen : length of new file name
*/
-probe nfsd.proc.rename = nfsd.proc2.rename,
- nfsd.proc3.rename,
- nfsd.proc4.rename
+probe nfsd.proc.rename =
+%( kernel_v >= "2.6.25" %?
+ nfsd.proc4.rename,
+%)
+ nfsd.proc3.rename,
+ nfsd.proc2.rename
{}
-probe nfsd.proc.rename.return = nfsd.proc2.rename.return,
- nfsd.proc3.rename.return,
- nfsd.proc4.rename.return
+probe nfsd.proc.rename.return =
+%( kernel_v >= "2.6.25" %?
+ nfsd.proc4.rename.return,
+%)
+ nfsd.proc3.rename.return,
+ nfsd.proc2.rename.return
{}
probe nfsd.proc2.rename = kernel.function("nfsd_proc_rename")!,
@@ -914,6 +966,7 @@ probe nfsd.proc3.rename.return = kernel.function("nfsd3_proc_rename").return!,
retstr = sprintf("%s", nfsderror($return))
}
+%( kernel_v >= "2.6.25" %?
probe nfsd.proc4.rename = kernel.function("nfsd4_rename") !,
module("nfsd").function("nfsd4_rename") ?
{
@@ -943,6 +996,7 @@ probe nfsd.proc4.rename.return = kernel.function("nfsd4_rename").return!,
version = 4
retstr = sprintf("%s", nfsderror($return))
}
+%)
probe nfsd.entries = nfsd.open,
nfsd.read,
@@ -1007,6 +1061,7 @@ probe nfsd.open.return = kernel.function("nfsd_open").return !,
probe nfsd.close = kernel.function("nfsd_close")!,
module("nfsd").function("nfsd_close")?
{
+ client_ip ="N/A"
filename = __file_filename($filp)
name = "nfsd.close"
@@ -1084,7 +1139,11 @@ probe nfsd.write = kernel.function("nfsd_write")!,
%( kernel_v >= "2.6.12" %?
file = $file
%)
+%( kernel_v >= "2.6.30" %?
count = p_long($cnt)
+%:
+ count = $cnt
+%)
offset = $offset
vec = $vec
vlen = $vlen