aboutsummaryrefslogtreecommitdiff
path: root/include/trace/events/sunrpc.h
diff options
context:
space:
mode:
authorChuck Lever2020-04-28 17:13:32 -0400
committerChuck Lever2020-05-18 10:21:22 -0400
commit4b8f380e46e4d3f8e9f6f9545fe2b78b872b6070 (patch)
tree33967349e8240bb70001b70ca2dbcc0c65d51c4e /include/trace/events/sunrpc.h
parente3e67621e307920c338393d9a33ccb902354ca31 (diff)
SUNRPC: Tracepoint to record errors in svc_xpo_create()
Capture transport creation failures. Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Diffstat (limited to 'include/trace/events/sunrpc.h')
-rw-r--r--include/trace/events/sunrpc.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/include/trace/events/sunrpc.h b/include/trace/events/sunrpc.h
index 53f2461cf552..f3296ed2b753 100644
--- a/include/trace/events/sunrpc.h
+++ b/include/trace/events/sunrpc.h
@@ -1167,6 +1167,35 @@ DEFINE_EVENT(svc_rqst_status, svc_send,
{ (1UL << XPT_KILL_TEMP), "XPT_KILL_TEMP"}, \
{ (1UL << XPT_CONG_CTRL), "XPT_CONG_CTRL"})
+TRACE_EVENT(svc_xprt_create_err,
+ TP_PROTO(
+ const char *program,
+ const char *protocol,
+ struct sockaddr *sap,
+ const struct svc_xprt *xprt
+ ),
+
+ TP_ARGS(program, protocol, sap, xprt),
+
+ TP_STRUCT__entry(
+ __field(long, error)
+ __string(program, program)
+ __string(protocol, protocol)
+ __array(unsigned char, addr, sizeof(struct sockaddr_in6))
+ ),
+
+ TP_fast_assign(
+ __entry->error = PTR_ERR(xprt);
+ __assign_str(program, program);
+ __assign_str(protocol, protocol);
+ memcpy(__entry->addr, sap, sizeof(__entry->addr));
+ ),
+
+ TP_printk("addr=%pISpc program=%s protocol=%s error=%ld",
+ __entry->addr, __get_str(program), __get_str(protocol),
+ __entry->error)
+);
+
TRACE_EVENT(svc_xprt_do_enqueue,
TP_PROTO(struct svc_xprt *xprt, struct svc_rqst *rqst),