This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
[PATCH 03/10] Updated nfsd.proc.read probes
- From: Steve Dickson <SteveD at redhat dot com>
- To: Systemtap Mailing list <systemtap at sources dot redhat dot com>
- Date: Thu, 25 Feb 2010 17:21:00 -0500
- Subject: [PATCH 03/10] Updated nfsd.proc.read probes
- References: <4B86F6E4.8020408@RedHat.com>
commit adc1a13049227d3d1478030bdd48ce19cdfeff32
Author: Steve Dickson <steved@redhat.com>
Date: Tue Feb 23 11:47:19 2010 -0500
Updated nfsd.proc.read probes
Converted the nfsd.proc.read probes to used
the @cast() mechanism.
Created the nfsd.proc4.read probes
Signed-off-by: Steve Dickson <steved@redhat.com>
diff --git a/tapset/nfsd.stp b/tapset/nfsd.stp
index 92f682f..84f1c56 100644
--- a/tapset/nfsd.stp
+++ b/tapset/nfsd.stp
@@ -197,7 +197,7 @@ probe nfsd.proc4.lookup.return = kernel.function("nfsd4_lookup").return !,
{
name = "nfsd.proc4.lookup.return"
version = 4
- retstr = sprintf("%s",nfsderror($return))
+ retstr = sprintf("%s", nfsderror($return))
}
/*
@@ -217,11 +217,13 @@ probe nfsd.proc4.lookup.return = kernel.function("nfsd4_lookup").return !,
* vlen : read blocks
*/
probe nfsd.proc.read = nfsd.proc2.read,
- nfsd.proc3.read
+ nfsd.proc3.read,
+ nfsd.proc4.read
{}
probe nfsd.proc.read.return = nfsd.proc2.read.return,
- nfsd.proc3.read.return
+ nfsd.proc3.read.return,
+ nfsd.proc4.read.return
{
}
@@ -232,7 +234,7 @@ probe nfsd.proc2.read = kernel.function("nfsd_proc_read")!,
client_ip = addr_from_rqst($rqstp)
proto = $rqstp->rq_prot
version = 2
- fh = __get_fh($argp,3)
+ fh = & @cast($argp, "nfsd_readargs", "kernel:nfsd")->fh
count = $argp->count
offset = $argp->offset
@@ -246,8 +248,8 @@ probe nfsd.proc2.read = kernel.function("nfsd_proc_read")!,
name = "nfsd.proc2.read"
argstr = sprintf("%d,%d",count,offset)
- size = count
- units = "bytes"
+ size = count
+ units = "bytes"
}
@@ -256,7 +258,7 @@ probe nfsd.proc2.read.return = kernel.function("nfsd_proc_read").return!,
{
name = "nfsd.proc2.read.return"
version = 2
- retstr = sprintf("%d",$return)
+ retstr = sprintf("%s", nfsderror($return))
}
probe nfsd.proc3.read = kernel.function("nfsd3_proc_read")!,
@@ -264,8 +266,8 @@ probe nfsd.proc3.read = kernel.function("nfsd3_proc_read")!,
{
client_ip = addr_from_rqst($rqstp)
proto = $rqstp->rq_prot
- version = 3
- fh = __get_fh($argp,4)
+ version = 3
+ fh = & @cast($argp, "nfsd3_readargs", "kernel:nfsd")->fh
count = $argp->count
offset = $argp->offset
@@ -279,8 +281,8 @@ probe nfsd.proc3.read = kernel.function("nfsd3_proc_read")!,
name = "nfsd.proc3.read"
argstr = sprintf("%d,%d",count,offset)
- size = count
- units = "bytes"
+ size = count
+ units = "bytes"
}
@@ -289,7 +291,34 @@ probe nfsd.proc3.read.return = kernel.function("nfsd3_proc_read").return!,
{
name = "nfsd.proc3.read.return"
version = 3
- retstr = sprintf("%d",$return)
+ retstr = sprintf("%s", nfsderror($return))
+}
+
+probe nfsd.proc4.read = kernel.function("nfsd4_read") !,
+ module("nfsd").function("nfsd4_read") ?
+{
+ client_ip = addr_from_rqst($rqstp)
+ proto = $rqstp->rq_prot
+ version = 4
+ fh = & @cast($cstate, "nfsd4_compound_state", "kernel:nfsd")->current_fh
+
+ count = $read->rd_length
+ offset = $read->rd_offset
+ vec = $read->rd_vlen
+
+ name = "nfsd.proc4.read"
+ argstr = sprintf("%d,%d",count,offset)
+
+ size = count
+ units = "bytes"
+}
+
+probe nfsd.proc4.read.return = kernel.function("nfsd4_read").return!,
+ module("nfsd").function("nfsd4_read").return?
+{
+ name = "nfsd.proc4.read.return"
+ version = 4
+ retstr = sprintf("%s", nfsderror($return))
}
/*