diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-12-10 18:13:13 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-12-10 18:13:13 -0500 |
commit | e20db597b6264de55ea6636fc79b1e4aaa89d129 (patch) | |
tree | fa650cb9cfad4b22598ae9867ca92baf57491a9d /include/trace/events | |
parent | 3a5dc1fafb016560315fe45bb4ef8bde259dd1bc (diff) | |
parent | 388f0c776781fe64ce951701bfe712b2182a31f2 (diff) |
Merge tag 'nfs-for-3.19-1' of git://git.linux-nfs.org/projects/trondmy/linux-nfs
Pull NFS client updates from Trond Myklebust:
"Highlights include:
Features:
- NFSv4.2 client support for hole punching and preallocation.
- Further RPC/RDMA client improvements.
- Add more RPC transport debugging tracepoints.
- Add RPC debugging tools in debugfs.
Bugfixes:
- Stable fix for layoutget error handling
- Fix a change in COMMIT behaviour resulting from the recent io code
updates"
* tag 'nfs-for-3.19-1' of git://git.linux-nfs.org/projects/trondmy/linux-nfs: (28 commits)
sunrpc: add a debugfs rpc_xprt directory with an info file in it
sunrpc: add debugfs file for displaying client rpc_task queue
nfs: Add DEALLOCATE support
nfs: Add ALLOCATE support
NFS: Clean up nfs4_init_callback()
NFS: SETCLIENTID XDR buffer sizes are incorrect
SUNRPC: serialize iostats updates
xprtrdma: Display async errors
xprtrdma: Enable pad optimization
xprtrdma: Re-write rpcrdma_flush_cqs()
xprtrdma: Refactor tasklet scheduling
xprtrdma: unmap all FMRs during transport disconnect
xprtrdma: Cap req_cqinit
xprtrdma: Return an errno from rpcrdma_register_external()
nfs: define nfs_inc_fscache_stats and using it as possible
nfs: replace nfs_add_stats with nfs_inc_stats when add one
NFS: Deletion of unnecessary checks before the function call "nfs_put_client"
sunrpc: eliminate RPC_TRACEPOINTS
sunrpc: eliminate RPC_DEBUG
lockd: eliminate LOCKD_DEBUG
...
Diffstat (limited to 'include/trace/events')
-rw-r--r-- | include/trace/events/sunrpc.h | 160 |
1 files changed, 160 insertions, 0 deletions
diff --git a/include/trace/events/sunrpc.h b/include/trace/events/sunrpc.h index 1fef3e6e9436..171ca4ff6d99 100644 --- a/include/trace/events/sunrpc.h +++ b/include/trace/events/sunrpc.h | |||
@@ -6,6 +6,8 @@ | |||
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> | ||
10 | #include <linux/sunrpc/xprtsock.h> | ||
9 | #include <net/tcp_states.h> | 11 | #include <net/tcp_states.h> |
10 | #include <linux/net.h> | 12 | #include <linux/net.h> |
11 | #include <linux/tracepoint.h> | 13 | #include <linux/tracepoint.h> |
@@ -306,6 +308,164 @@ DEFINE_RPC_SOCKET_EVENT_DONE(rpc_socket_reset_connection); | |||
306 | DEFINE_RPC_SOCKET_EVENT(rpc_socket_close); | 308 | DEFINE_RPC_SOCKET_EVENT(rpc_socket_close); |
307 | DEFINE_RPC_SOCKET_EVENT(rpc_socket_shutdown); | 309 | DEFINE_RPC_SOCKET_EVENT(rpc_socket_shutdown); |
308 | 310 | ||
311 | DECLARE_EVENT_CLASS(rpc_xprt_event, | ||
312 | TP_PROTO(struct rpc_xprt *xprt, __be32 xid, int status), | ||
313 | |||
314 | TP_ARGS(xprt, xid, status), | ||
315 | |||
316 | TP_STRUCT__entry( | ||
317 | __field(__be32, xid) | ||
318 | __field(int, status) | ||
319 | __string(addr, xprt->address_strings[RPC_DISPLAY_ADDR]) | ||
320 | __string(port, xprt->address_strings[RPC_DISPLAY_PORT]) | ||
321 | ), | ||
322 | |||
323 | TP_fast_assign( | ||
324 | __entry->xid = xid; | ||
325 | __entry->status = status; | ||
326 | __assign_str(addr, xprt->address_strings[RPC_DISPLAY_ADDR]); | ||
327 | __assign_str(port, xprt->address_strings[RPC_DISPLAY_PORT]); | ||
328 | ), | ||
329 | |||
330 | TP_printk("peer=[%s]:%s xid=0x%x status=%d", __get_str(addr), | ||
331 | __get_str(port), be32_to_cpu(__entry->xid), | ||
332 | __entry->status) | ||
333 | ); | ||
334 | |||
335 | DEFINE_EVENT(rpc_xprt_event, xprt_lookup_rqst, | ||
336 | TP_PROTO(struct rpc_xprt *xprt, __be32 xid, int status), | ||
337 | TP_ARGS(xprt, xid, status)); | ||
338 | |||
339 | DEFINE_EVENT(rpc_xprt_event, xprt_transmit, | ||
340 | TP_PROTO(struct rpc_xprt *xprt, __be32 xid, int status), | ||
341 | TP_ARGS(xprt, xid, status)); | ||
342 | |||
343 | DEFINE_EVENT(rpc_xprt_event, xprt_complete_rqst, | ||
344 | TP_PROTO(struct rpc_xprt *xprt, __be32 xid, int status), | ||
345 | TP_ARGS(xprt, xid, status)); | ||
346 | |||
347 | TRACE_EVENT(xs_tcp_data_ready, | ||
348 | TP_PROTO(struct rpc_xprt *xprt, int err, unsigned int total), | ||
349 | |||
350 | TP_ARGS(xprt, err, total), | ||
351 | |||
352 | TP_STRUCT__entry( | ||
353 | __field(int, err) | ||
354 | __field(unsigned int, total) | ||
355 | __string(addr, xprt ? xprt->address_strings[RPC_DISPLAY_ADDR] : | ||
356 | "(null)") | ||
357 | __string(port, xprt ? xprt->address_strings[RPC_DISPLAY_PORT] : | ||
358 | "(null)") | ||
359 | ), | ||
360 | |||
361 | TP_fast_assign( | ||
362 | __entry->err = err; | ||
363 | __entry->total = total; | ||
364 | __assign_str(addr, xprt ? | ||
365 | xprt->address_strings[RPC_DISPLAY_ADDR] : "(null)"); | ||
366 | __assign_str(port, xprt ? | ||
367 | xprt->address_strings[RPC_DISPLAY_PORT] : "(null)"); | ||
368 | ), | ||
369 | |||
370 | TP_printk("peer=[%s]:%s err=%d total=%u", __get_str(addr), | ||
371 | __get_str(port), __entry->err, __entry->total) | ||
372 | ); | ||
373 | |||
374 | #define rpc_show_sock_xprt_flags(flags) \ | ||
375 | __print_flags(flags, "|", \ | ||
376 | { TCP_RCV_LAST_FRAG, "TCP_RCV_LAST_FRAG" }, \ | ||
377 | { TCP_RCV_COPY_FRAGHDR, "TCP_RCV_COPY_FRAGHDR" }, \ | ||
378 | { TCP_RCV_COPY_XID, "TCP_RCV_COPY_XID" }, \ | ||
379 | { TCP_RCV_COPY_DATA, "TCP_RCV_COPY_DATA" }, \ | ||
380 | { TCP_RCV_READ_CALLDIR, "TCP_RCV_READ_CALLDIR" }, \ | ||
381 | { TCP_RCV_COPY_CALLDIR, "TCP_RCV_COPY_CALLDIR" }, \ | ||
382 | { TCP_RPC_REPLY, "TCP_RPC_REPLY" }) | ||
383 | |||
384 | TRACE_EVENT(xs_tcp_data_recv, | ||
385 | TP_PROTO(struct sock_xprt *xs), | ||
386 | |||
387 | TP_ARGS(xs), | ||
388 | |||
389 | TP_STRUCT__entry( | ||
390 | __string(addr, xs->xprt.address_strings[RPC_DISPLAY_ADDR]) | ||
391 | __string(port, xs->xprt.address_strings[RPC_DISPLAY_PORT]) | ||
392 | __field(__be32, xid) | ||
393 | __field(unsigned long, flags) | ||
394 | __field(unsigned long, copied) | ||
395 | __field(unsigned int, reclen) | ||
396 | __field(unsigned long, offset) | ||
397 | ), | ||
398 | |||
399 | TP_fast_assign( | ||
400 | __assign_str(addr, xs->xprt.address_strings[RPC_DISPLAY_ADDR]); | ||
401 | __assign_str(port, xs->xprt.address_strings[RPC_DISPLAY_PORT]); | ||
402 | __entry->xid = xs->tcp_xid; | ||
403 | __entry->flags = xs->tcp_flags; | ||
404 | __entry->copied = xs->tcp_copied; | ||
405 | __entry->reclen = xs->tcp_reclen; | ||
406 | __entry->offset = xs->tcp_offset; | ||
407 | ), | ||
408 | |||
409 | TP_printk("peer=[%s]:%s xid=0x%x flags=%s copied=%lu reclen=%u offset=%lu", | ||
410 | __get_str(addr), __get_str(port), be32_to_cpu(__entry->xid), | ||
411 | rpc_show_sock_xprt_flags(__entry->flags), | ||
412 | __entry->copied, __entry->reclen, __entry->offset) | ||
413 | ); | ||
414 | |||
415 | TRACE_EVENT(svc_recv, | ||
416 | TP_PROTO(struct svc_rqst *rqst, int status), | ||
417 | |||
418 | TP_ARGS(rqst, status), | ||
419 | |||
420 | TP_STRUCT__entry( | ||
421 | __field(struct sockaddr *, addr) | ||
422 | __field(__be32, xid) | ||
423 | __field(int, status) | ||
424 | ), | ||
425 | |||
426 | TP_fast_assign( | ||
427 | __entry->addr = (struct sockaddr *)&rqst->rq_addr; | ||
428 | __entry->xid = status > 0 ? rqst->rq_xid : 0; | ||
429 | __entry->status = status; | ||
430 | ), | ||
431 | |||
432 | TP_printk("addr=%pIScp xid=0x%x status=%d", __entry->addr, | ||
433 | be32_to_cpu(__entry->xid), __entry->status) | ||
434 | ); | ||
435 | |||
436 | DECLARE_EVENT_CLASS(svc_rqst_status, | ||
437 | |||
438 | TP_PROTO(struct svc_rqst *rqst, int status), | ||
439 | |||
440 | TP_ARGS(rqst, status), | ||
441 | |||
442 | TP_STRUCT__entry( | ||
443 | __field(struct sockaddr *, addr) | ||
444 | __field(__be32, xid) | ||
445 | __field(int, dropme) | ||
446 | __field(int, status) | ||
447 | ), | ||
448 | |||
449 | TP_fast_assign( | ||
450 | __entry->addr = (struct sockaddr *)&rqst->rq_addr; | ||
451 | __entry->xid = rqst->rq_xid; | ||
452 | __entry->dropme = (int)rqst->rq_dropme; | ||
453 | __entry->status = status; | ||
454 | ), | ||
455 | |||
456 | TP_printk("addr=%pIScp rq_xid=0x%x dropme=%d status=%d", | ||
457 | __entry->addr, be32_to_cpu(__entry->xid), __entry->dropme, | ||
458 | __entry->status) | ||
459 | ); | ||
460 | |||
461 | DEFINE_EVENT(svc_rqst_status, svc_process, | ||
462 | TP_PROTO(struct svc_rqst *rqst, int status), | ||
463 | TP_ARGS(rqst, status)); | ||
464 | |||
465 | DEFINE_EVENT(svc_rqst_status, svc_send, | ||
466 | TP_PROTO(struct svc_rqst *rqst, int status), | ||
467 | TP_ARGS(rqst, status)); | ||
468 | |||
309 | #endif /* _TRACE_SUNRPC_H */ | 469 | #endif /* _TRACE_SUNRPC_H */ |
310 | 470 | ||
311 | #include <trace/define_trace.h> | 471 | #include <trace/define_trace.h> |