Skip to content

Commit 8b9a7bd

Browse files
dhowellskuba-moo
authored andcommitted
rxrpc: Add a tracepoint for aborts being proposed
Add a tracepoint to rxrpc to trace the proposal of an abort. The abort is performed asynchronously by the I/O thread. Signed-off-by: David Howells <dhowells@redhat.com> cc: Marc Dionne <marc.dionne@auristor.com> cc: Simon Horman <horms@kernel.org> cc: linux-afs@lists.infradead.org Link: https://patch.msgid.link/726356.1730898045@warthog.procyon.org.uk Signed-off-by: Jakub Kicinski <kuba@kernel.org>
1 parent d9ccb18 commit 8b9a7bd

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

include/trace/events/rxrpc.h

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -773,6 +773,31 @@ TRACE_EVENT(rxrpc_rx_done,
773773
TP_printk("r=%d a=%d", __entry->result, __entry->abort_code)
774774
);
775775

776+
TRACE_EVENT(rxrpc_abort_call,
777+
TP_PROTO(const struct rxrpc_call *call, int abort_code),
778+
779+
TP_ARGS(call, abort_code),
780+
781+
TP_STRUCT__entry(
782+
__field(unsigned int, call_nr)
783+
__field(enum rxrpc_abort_reason, why)
784+
__field(int, abort_code)
785+
__field(int, error)
786+
),
787+
788+
TP_fast_assign(
789+
__entry->call_nr = call->debug_id;
790+
__entry->why = call->send_abort_why;
791+
__entry->abort_code = abort_code;
792+
__entry->error = call->send_abort_err;
793+
),
794+
795+
TP_printk("c=%08x a=%d e=%d %s",
796+
__entry->call_nr,
797+
__entry->abort_code, __entry->error,
798+
__print_symbolic(__entry->why, rxrpc_abort_reasons))
799+
);
800+
776801
TRACE_EVENT(rxrpc_abort,
777802
TP_PROTO(unsigned int call_nr, enum rxrpc_abort_reason why,
778803
u32 cid, u32 call_id, rxrpc_seq_t seq, int abort_code, int error),

net/rxrpc/sendmsg.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ bool rxrpc_propose_abort(struct rxrpc_call *call, s32 abort_code, int error,
2929
call->send_abort_why = why;
3030
call->send_abort_err = error;
3131
call->send_abort_seq = 0;
32+
trace_rxrpc_abort_call(call, abort_code);
3233
/* Request abort locklessly vs rxrpc_input_call_event(). */
3334
smp_store_release(&call->send_abort, abort_code);
3435
rxrpc_poke_call(call, rxrpc_call_poke_abort);

0 commit comments

Comments
 (0)