diff options
| author | Jeff Layton <jlayton@primarydata.com> | 2014-10-28 14:24:12 -0400 |
|---|---|---|
| committer | Trond Myklebust <trond.myklebust@primarydata.com> | 2014-11-24 12:53:34 -0500 |
| commit | 860a0d9e511f278bedab62d555a457c18e0841d5 (patch) | |
| tree | 4e5348dd4d2e9abf81dea3c9715fe887a4f3fedc /include/trace | |
| parent | 878ffa9f855e84d35d950f1abeb5a37b8435baea (diff) | |
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.h | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/include/trace/events/sunrpc.h b/include/trace/events/sunrpc.h index 1fef3e6e9436..6260f5134212 100644 --- a/include/trace/events/sunrpc.h +++ b/include/trace/events/sunrpc.h | |||
| @@ -6,6 +6,7 @@ | |||
| 6 | 6 | ||
| 7 | #include <linux/sunrpc/sched.h> | 7 | #include <linux/sunrpc/sched.h> |
| 8 | #include <linux/sunrpc/clnt.h> | 8 | #include <linux/sunrpc/clnt.h> |
| 9 | #include <linux/sunrpc/svc.h> | ||
| 9 | #include <net/tcp_states.h> | 10 | #include <net/tcp_states.h> |
| 10 | #include <linux/net.h> | 11 | #include <linux/net.h> |
| 11 | #include <linux/tracepoint.h> | 12 | #include <linux/tracepoint.h> |
| @@ -306,6 +307,60 @@ DEFINE_RPC_SOCKET_EVENT_DONE(rpc_socket_reset_connection); | |||
| 306 | DEFINE_RPC_SOCKET_EVENT(rpc_socket_close); | 307 | DEFINE_RPC_SOCKET_EVENT(rpc_socket_close); |
| 307 | DEFINE_RPC_SOCKET_EVENT(rpc_socket_shutdown); | 308 | DEFINE_RPC_SOCKET_EVENT(rpc_socket_shutdown); |
| 308 | 309 | ||
| 310 | TRACE_EVENT(svc_recv, | ||
| 311 | TP_PROTO(struct svc_rqst *rqst, int status), | ||
| 312 | |||
| 313 | TP_ARGS(rqst, status), | ||
| 314 | |||
| 315 | TP_STRUCT__entry( | ||
| 316 | __field(struct sockaddr *, addr) | ||
| 317 | __field(__be32, xid) | ||
| 318 | __field(int, status) | ||
| 319 | ), | ||
| 320 | |||
| 321 | TP_fast_assign( | ||
| 322 | __entry->addr = (struct sockaddr *)&rqst->rq_addr; | ||
| 323 | __entry->xid = status > 0 ? rqst->rq_xid : 0; | ||
| 324 | __entry->status = status; | ||
| 325 | ), | ||
| 326 | |||
| 327 | TP_printk("addr=%pIScp xid=0x%x status=%d", __entry->addr, | ||
| 328 | be32_to_cpu(__entry->xid), __entry->status) | ||
| 329 | ); | ||
| 330 | |||
| 331 | DECLARE_EVENT_CLASS(svc_rqst_status, | ||
| 332 | |||
| 333 | TP_PROTO(struct svc_rqst *rqst, int status), | ||
| 334 | |||
| 335 | TP_ARGS(rqst, status), | ||
| 336 | |||
| 337 | TP_STRUCT__entry( | ||
| 338 | __field(struct sockaddr *, addr) | ||
| 339 | __field(__be32, xid) | ||
| 340 | __field(int, dropme) | ||
| 341 | __field(int, status) | ||
| 342 | ), | ||
| 343 | |||
| 344 | TP_fast_assign( | ||
| 345 | __entry->addr = (struct sockaddr *)&rqst->rq_addr; | ||
| 346 | __entry->xid = rqst->rq_xid; | ||
| 347 | __entry->dropme = (int)rqst->rq_dropme; | ||
| 348 | __entry->status = status; | ||
| 349 | ), | ||
| 350 | |||
| 351 | TP_printk("addr=%pIScp rq_xid=0x%x dropme=%d status=%d", | ||
| 352 | __entry->addr, be32_to_cpu(__entry->xid), __entry->dropme, | ||
| 353 | __entry->status) | ||
| 354 | ); | ||
| 355 | |||
| 356 | DEFINE_EVENT(svc_rqst_status, svc_process, | ||
| 357 | TP_PROTO(struct svc_rqst *rqst, int status), | ||
| 358 | TP_ARGS(rqst, status)); | ||
| 359 | |||
| 360 | DEFINE_EVENT(svc_rqst_status, svc_send, | ||
| 361 | TP_PROTO(struct svc_rqst *rqst, int status), | ||
| 362 | TP_ARGS(rqst, status)); | ||
| 363 | |||
| 309 | #endif /* _TRACE_SUNRPC_H */ | 364 | #endif /* _TRACE_SUNRPC_H */ |
| 310 | 365 | ||
| 311 | #include <trace/define_trace.h> | 366 | #include <trace/define_trace.h> |
