summaryrefslogtreecommitdiff
path: root/include/trace
diff options
context:
space:
mode:
authorChuck Lever <chuck.lever@oracle.com>2018-03-27 10:50:07 -0400
committerJ. Bruce Fields <bfields@redhat.com>2018-04-03 15:08:10 -0400
commitcaa3e106dc623eb41542e6221abecf9956e8a0e6 (patch)
tree7d0c614596ed0965789297e371522185b9b83b73 /include/trace
parent03edb90f57a5f7edaa13db3174e269331ef9a527 (diff)
sunrpc: Move trace_svc_xprt_dequeue()
Reduce the amount of noise generated by trace_svc_xprt_dequeue by moving it to the end of svc_get_next_xprt. This generates exactly one trace event when a ready xprt is found, rather than spurious events when there is no work to do. The empty events contain no information that can't be obtained simply by tracing function calls to svc_xprt_dequeue. A small additional benefit is simplification of the svc_xprt_event trace class, which no longer has to handle the case when the @xprt parameter is NULL. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'include/trace')
-rw-r--r--include/trace/events/sunrpc.h16
1 files changed, 5 insertions, 11 deletions
diff --git a/include/trace/events/sunrpc.h b/include/trace/events/sunrpc.h
index a23144471b6b..9bba3070f873 100644
--- a/include/trace/events/sunrpc.h
+++ b/include/trace/events/sunrpc.h
@@ -634,24 +634,18 @@ DECLARE_EVENT_CLASS(svc_xprt_event,
TP_STRUCT__entry(
__field(struct svc_xprt *, xprt)
__field(unsigned long, flags)
- __dynamic_array(unsigned char, addr, xprt != NULL ?
- xprt->xpt_remotelen : 0)
+ __dynamic_array(unsigned char, addr, xprt->xpt_remotelen)
),
TP_fast_assign(
__entry->xprt = xprt;
- if (xprt) {
- memcpy(__get_dynamic_array(addr),
- &xprt->xpt_remote,
- xprt->xpt_remotelen);
- __entry->flags = xprt->xpt_flags;
- } else
- __entry->flags = 0;
+ __entry->flags = xprt->xpt_flags;
+ memcpy(__get_dynamic_array(addr),
+ &xprt->xpt_remote, xprt->xpt_remotelen);
),
TP_printk("xprt=0x%p addr=%pIScp flags=%s", __entry->xprt,
- __get_dynamic_array_len(addr) != 0 ?
- (struct sockaddr *)__get_dynamic_array(addr) : NULL,
+ (struct sockaddr *)__get_dynamic_array(addr),
show_svc_xprt_flags(__entry->flags))
);