diff options
author | Jeff Layton <jlayton@primarydata.com> | 2014-10-28 14:24:13 -0400 |
---|---|---|
committer | Trond Myklebust <trond.myklebust@primarydata.com> | 2014-11-24 12:53:35 -0500 |
commit | 3705ad64f123271b2b88dbff0c9891b7b90299d2 (patch) | |
tree | f84b813e2e69ed7f317e3499a638f2892ea6ab91 /include/trace | |
parent | 860a0d9e511f278bedab62d555a457c18e0841d5 (diff) |
sunrpc: add new tracepoints in xprt handling code
...so we can keep track of when calls are sent and replies received.
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 | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/include/trace/events/sunrpc.h b/include/trace/events/sunrpc.h index 6260f5134212..5edb16bcd836 100644 --- a/include/trace/events/sunrpc.h +++ b/include/trace/events/sunrpc.h | |||
@@ -307,6 +307,69 @@ DEFINE_RPC_SOCKET_EVENT_DONE(rpc_socket_reset_connection); | |||
307 | DEFINE_RPC_SOCKET_EVENT(rpc_socket_close); | 307 | DEFINE_RPC_SOCKET_EVENT(rpc_socket_close); |
308 | DEFINE_RPC_SOCKET_EVENT(rpc_socket_shutdown); | 308 | DEFINE_RPC_SOCKET_EVENT(rpc_socket_shutdown); |
309 | 309 | ||
310 | DECLARE_EVENT_CLASS(rpc_xprt_event, | ||
311 | TP_PROTO(struct rpc_xprt *xprt, __be32 xid, int status), | ||
312 | |||
313 | TP_ARGS(xprt, xid, status), | ||
314 | |||
315 | TP_STRUCT__entry( | ||
316 | __field(__be32, xid) | ||
317 | __field(int, status) | ||
318 | __string(addr, xprt->address_strings[RPC_DISPLAY_ADDR]) | ||
319 | __string(port, xprt->address_strings[RPC_DISPLAY_PORT]) | ||
320 | ), | ||
321 | |||
322 | TP_fast_assign( | ||
323 | __entry->xid = xid; | ||
324 | __entry->status = status; | ||
325 | __assign_str(addr, xprt->address_strings[RPC_DISPLAY_ADDR]); | ||
326 | __assign_str(port, xprt->address_strings[RPC_DISPLAY_PORT]); | ||
327 | ), | ||
328 | |||
329 | TP_printk("peer=%s/%s xid=0x%x status=%d", __get_str(addr), | ||
330 | __get_str(port), be32_to_cpu(__entry->xid), | ||
331 | __entry->status) | ||
332 | ); | ||
333 | |||
334 | DEFINE_EVENT(rpc_xprt_event, xprt_lookup_rqst, | ||
335 | TP_PROTO(struct rpc_xprt *xprt, __be32 xid, int status), | ||
336 | TP_ARGS(xprt, xid, status)); | ||
337 | |||
338 | DEFINE_EVENT(rpc_xprt_event, xprt_transmit, | ||
339 | TP_PROTO(struct rpc_xprt *xprt, __be32 xid, int status), | ||
340 | TP_ARGS(xprt, xid, status)); | ||
341 | |||
342 | DEFINE_EVENT(rpc_xprt_event, xprt_complete_rqst, | ||
343 | TP_PROTO(struct rpc_xprt *xprt, __be32 xid, int status), | ||
344 | TP_ARGS(xprt, xid, status)); | ||
345 | |||
346 | TRACE_EVENT(xs_tcp_data_ready, | ||
347 | TP_PROTO(struct rpc_xprt *xprt, int err, unsigned int total), | ||
348 | |||
349 | TP_ARGS(xprt, err, total), | ||
350 | |||
351 | TP_STRUCT__entry( | ||
352 | __field(int, err) | ||
353 | __field(unsigned int, total) | ||
354 | __string(addr, xprt ? xprt->address_strings[RPC_DISPLAY_ADDR] : | ||
355 | "(null)") | ||
356 | __string(port, xprt ? xprt->address_strings[RPC_DISPLAY_PORT] : | ||
357 | "(null)") | ||
358 | ), | ||
359 | |||
360 | TP_fast_assign( | ||
361 | __entry->err = err; | ||
362 | __entry->total = total; | ||
363 | __assign_str(addr, xprt ? | ||
364 | xprt->address_strings[RPC_DISPLAY_ADDR] : "(null)"); | ||
365 | __assign_str(port, xprt ? | ||
366 | xprt->address_strings[RPC_DISPLAY_PORT] : "(null)"); | ||
367 | ), | ||
368 | |||
369 | TP_printk("peer=[%s]:%s err=%d total=%u", __get_str(addr), | ||
370 | __get_str(port), __entry->err, __entry->total) | ||
371 | ); | ||
372 | |||
310 | TRACE_EVENT(svc_recv, | 373 | TRACE_EVENT(svc_recv, |
311 | TP_PROTO(struct svc_rqst *rqst, int status), | 374 | TP_PROTO(struct svc_rqst *rqst, int status), |
312 | 375 | ||