Commit 1bae5d22 authored by David Howells's avatar David Howells

rxrpc: Trace call completion

Add a tracepoint to track rxrpc calls moving into the completed state and
to log the completion type and the recorded error value and abort code.
Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
parent a25e21f0
...@@ -400,6 +400,13 @@ enum rxrpc_congest_change { ...@@ -400,6 +400,13 @@ enum rxrpc_congest_change {
EM(RXRPC_ACK_IDLE, "IDL") \ EM(RXRPC_ACK_IDLE, "IDL") \
E_(RXRPC_ACK__INVALID, "-?-") E_(RXRPC_ACK__INVALID, "-?-")
#define rxrpc_completions \
EM(RXRPC_CALL_SUCCEEDED, "Succeeded") \
EM(RXRPC_CALL_REMOTELY_ABORTED, "RemoteAbort") \
EM(RXRPC_CALL_LOCALLY_ABORTED, "LocalAbort") \
EM(RXRPC_CALL_LOCAL_ERROR, "LocalError") \
E_(RXRPC_CALL_NETWORK_ERROR, "NetError")
/* /*
* Export enum symbols via userspace. * Export enum symbols via userspace.
*/ */
...@@ -624,6 +631,32 @@ TRACE_EVENT(rxrpc_abort, ...@@ -624,6 +631,32 @@ TRACE_EVENT(rxrpc_abort,
__entry->abort_code, __entry->error, __entry->why) __entry->abort_code, __entry->error, __entry->why)
); );
TRACE_EVENT(rxrpc_call_complete,
TP_PROTO(struct rxrpc_call *call),
TP_ARGS(call),
TP_STRUCT__entry(
__field(unsigned int, call )
__field(enum rxrpc_call_completion, compl )
__field(int, error )
__field(u32, abort_code )
),
TP_fast_assign(
__entry->call = call->debug_id;
__entry->compl = call->completion;
__entry->error = call->error;
__entry->abort_code = call->abort_code;
),
TP_printk("c=%08x %s r=%d ac=%d",
__entry->call,
__print_symbolic(__entry->compl, rxrpc_completions),
__entry->error,
__entry->abort_code)
);
TRACE_EVENT(rxrpc_transmit, TRACE_EVENT(rxrpc_transmit,
TP_PROTO(struct rxrpc_call *call, enum rxrpc_transmit_trace why), TP_PROTO(struct rxrpc_call *call, enum rxrpc_transmit_trace why),
......
...@@ -778,6 +778,7 @@ static inline bool __rxrpc_set_call_completion(struct rxrpc_call *call, ...@@ -778,6 +778,7 @@ static inline bool __rxrpc_set_call_completion(struct rxrpc_call *call,
call->error = error; call->error = error;
call->completion = compl, call->completion = compl,
call->state = RXRPC_CALL_COMPLETE; call->state = RXRPC_CALL_COMPLETE;
trace_rxrpc_call_complete(call);
wake_up(&call->waitq); wake_up(&call->waitq);
return true; return true;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment