summaryrefslogtreecommitdiff
path: root/include/trace/events
diff options
context:
space:
mode:
authorChuck Lever <chuck.lever@oracle.com>2020-04-30 22:25:01 +0300
committerChuck Lever <chuck.lever@oracle.com>2020-05-18 17:21:22 +0300
commite979a173a0b8dc1a41bc3194e34b92d79c049ad3 (patch)
tree61609debcd87ce949c12266f692affb59bf19f1f /include/trace/events
parentdecc13f7eb258b8c5c564ec1f11a24f14af275f8 (diff)
downloadlinux-e979a173a0b8dc1a41bc3194e34b92d79c049ad3.tar.xz
svcrdma: Add tracepoints to report ->xpo_accept failures
Failure to accept a connection is typically due to a problem specific to a transport type. Also, ->xpo_accept returns NULL on error rather than reporting a specific problem. So, add failure-specific tracepoints in svc_rdma_accept(). Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Diffstat (limited to 'include/trace/events')
-rw-r--r--include/trace/events/rpcrdma.h38
1 files changed, 37 insertions, 1 deletions
diff --git a/include/trace/events/rpcrdma.h b/include/trace/events/rpcrdma.h
index 53b24c8c7860..79ef2ab7743c 100644
--- a/include/trace/events/rpcrdma.h
+++ b/include/trace/events/rpcrdma.h
@@ -1309,9 +1309,45 @@ DECLARE_EVENT_CLASS(svcrdma_xprt_event,
TP_ARGS(xprt))
DEFINE_XPRT_EVENT(accept);
-DEFINE_XPRT_EVENT(fail);
DEFINE_XPRT_EVENT(free);
+DECLARE_EVENT_CLASS(svcrdma_accept_class,
+ TP_PROTO(
+ const struct svcxprt_rdma *rdma,
+ long status
+ ),
+
+ TP_ARGS(rdma, status),
+
+ TP_STRUCT__entry(
+ __field(long, status)
+ __string(addr, rdma->sc_xprt.xpt_remotebuf)
+ ),
+
+ TP_fast_assign(
+ __entry->status = status;
+ __assign_str(addr, rdma->sc_xprt.xpt_remotebuf);
+ ),
+
+ TP_printk("addr=%s status=%ld",
+ __get_str(addr), __entry->status
+ )
+);
+
+#define DEFINE_ACCEPT_EVENT(name) \
+ DEFINE_EVENT(svcrdma_accept_class, svcrdma_##name##_err, \
+ TP_PROTO( \
+ const struct svcxprt_rdma *rdma, \
+ long status \
+ ), \
+ TP_ARGS(rdma, status))
+
+DEFINE_ACCEPT_EVENT(pd);
+DEFINE_ACCEPT_EVENT(qp);
+DEFINE_ACCEPT_EVENT(fabric);
+DEFINE_ACCEPT_EVENT(initdepth);
+DEFINE_ACCEPT_EVENT(accept);
+
TRACE_DEFINE_ENUM(RDMA_MSG);
TRACE_DEFINE_ENUM(RDMA_NOMSG);
TRACE_DEFINE_ENUM(RDMA_MSGP);