summaryrefslogtreecommitdiff
path: root/include/trace
diff options
context:
space:
mode:
authorJeff Layton <jlayton@primarydata.com>2014-10-28 18:24:12 (GMT)
committerTrond Myklebust <trond.myklebust@primarydata.com>2014-11-24 17:53:34 (GMT)
commit860a0d9e511f278bedab62d555a457c18e0841d5 (patch)
tree4e5348dd4d2e9abf81dea3c9715fe887a4f3fedc /include/trace
parent878ffa9f855e84d35d950f1abeb5a37b8435baea (diff)
downloadlinux-860a0d9e511f278bedab62d555a457c18e0841d5.tar.xz
sunrpc: add some tracepoints in svc_rqst handling functions
...just around svc_send, svc_recv and svc_process for now. Signed-off-by: Jeff Layton <jlayton@primarydata.com> Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Diffstat (limited to 'include/trace')
-rw-r--r--include/trace/events/sunrpc.h55
1 files changed, 55 insertions, 0 deletions
diff --git a/include/trace/events/sunrpc.h b/include/trace/events/sunrpc.h
index 1fef3e6..6260f51 100644
--- a/include/trace/events/sunrpc.h
+++ b/include/trace/events/sunrpc.h
@@ -6,6 +6,7 @@
#include <linux/sunrpc/sched.h>
#include <linux/sunrpc/clnt.h>
+#include <linux/sunrpc/svc.h>
#include <net/tcp_states.h>
#include <linux/net.h>
#include <linux/tracepoint.h>
@@ -306,6 +307,60 @@ DEFINE_RPC_SOCKET_EVENT_DONE(rpc_socket_reset_connection);
DEFINE_RPC_SOCKET_EVENT(rpc_socket_close);
DEFINE_RPC_SOCKET_EVENT(rpc_socket_shutdown);
+TRACE_EVENT(svc_recv,
+ TP_PROTO(struct svc_rqst *rqst, int status),
+
+ TP_ARGS(rqst, status),
+
+ TP_STRUCT__entry(
+ __field(struct sockaddr *, addr)
+ __field(__be32, xid)
+ __field(int, status)
+ ),
+
+ TP_fast_assign(
+ __entry->addr = (struct sockaddr *)&rqst->rq_addr;
+ __entry->xid = status > 0 ? rqst->rq_xid : 0;
+ __entry->status = status;
+ ),
+
+ TP_printk("addr=%pIScp xid=0x%x status=%d", __entry->addr,
+ be32_to_cpu(__entry->xid), __entry->status)
+);
+
+DECLARE_EVENT_CLASS(svc_rqst_status,
+
+ TP_PROTO(struct svc_rqst *rqst, int status),
+
+ TP_ARGS(rqst, status),
+
+ TP_STRUCT__entry(
+ __field(struct sockaddr *, addr)
+ __field(__be32, xid)
+ __field(int, dropme)
+ __field(int, status)
+ ),
+
+ TP_fast_assign(
+ __entry->addr = (struct sockaddr *)&rqst->rq_addr;
+ __entry->xid = rqst->rq_xid;
+ __entry->dropme = (int)rqst->rq_dropme;
+ __entry->status = status;
+ ),
+
+ TP_printk("addr=%pIScp rq_xid=0x%x dropme=%d status=%d",
+ __entry->addr, be32_to_cpu(__entry->xid), __entry->dropme,
+ __entry->status)
+);
+
+DEFINE_EVENT(svc_rqst_status, svc_process,
+ TP_PROTO(struct svc_rqst *rqst, int status),
+ TP_ARGS(rqst, status));
+
+DEFINE_EVENT(svc_rqst_status, svc_send,
+ TP_PROTO(struct svc_rqst *rqst, int status),
+ TP_ARGS(rqst, status));
+
#endif /* _TRACE_SUNRPC_H */
#include <trace/define_trace.h>