aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfsd/trace.h
diff options
context:
space:
mode:
authorChuck Lever <chuck.lever@oracle.com>2018-03-27 10:53:54 -0400
committerJ. Bruce Fields <bfields@redhat.com>2018-04-03 15:08:15 -0400
commitfff4080b2f1389ecf3028d72eb70e1837df48b01 (patch)
treea5d1cc9ebca0828441b4196c789fb68b3133c242 /fs/nfsd/trace.h
parent87c5942e8fae81ac296267654a047eb2db81592b (diff)
nfsd: Trace NFSv4 COMPOUND execution
This helps record the identity and timing of the ops in each NFSv4 COMPOUND, replacing dprintk calls that did much the same thing. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/nfsd/trace.h')
-rw-r--r--fs/nfsd/trace.h39
1 files changed, 39 insertions, 0 deletions
diff --git a/fs/nfsd/trace.h b/fs/nfsd/trace.h
index a8bbd9d00a9e..80933e4334d8 100644
--- a/fs/nfsd/trace.h
+++ b/fs/nfsd/trace.h
@@ -11,6 +11,45 @@
11#include <linux/tracepoint.h> 11#include <linux/tracepoint.h>
12#include "nfsfh.h" 12#include "nfsfh.h"
13 13
14TRACE_EVENT(nfsd_compound,
15 TP_PROTO(const struct svc_rqst *rqst,
16 u32 args_opcnt),
17 TP_ARGS(rqst, args_opcnt),
18 TP_STRUCT__entry(
19 __field(u32, xid)
20 __field(u32, args_opcnt)
21 ),
22 TP_fast_assign(
23 __entry->xid = be32_to_cpu(rqst->rq_xid);
24 __entry->args_opcnt = args_opcnt;
25 ),
26 TP_printk("xid=0x%08x opcnt=%u",
27 __entry->xid, __entry->args_opcnt)
28)
29
30TRACE_EVENT(nfsd_compound_status,
31 TP_PROTO(u32 args_opcnt,
32 u32 resp_opcnt,
33 __be32 status,
34 const char *name),
35 TP_ARGS(args_opcnt, resp_opcnt, status, name),
36 TP_STRUCT__entry(
37 __field(u32, args_opcnt)
38 __field(u32, resp_opcnt)
39 __field(int, status)
40 __string(name, name)
41 ),
42 TP_fast_assign(
43 __entry->args_opcnt = args_opcnt;
44 __entry->resp_opcnt = resp_opcnt;
45 __entry->status = be32_to_cpu(status);
46 __assign_str(name, name);
47 ),
48 TP_printk("op=%u/%u %s status=%d",
49 __entry->resp_opcnt, __entry->args_opcnt,
50 __get_str(name), __entry->status)
51)
52
14DECLARE_EVENT_CLASS(nfsd_io_class, 53DECLARE_EVENT_CLASS(nfsd_io_class,
15 TP_PROTO(struct svc_rqst *rqstp, 54 TP_PROTO(struct svc_rqst *rqstp,
16 struct svc_fh *fhp, 55 struct svc_fh *fhp,