Loading include/trace/events/rxrpc.h +36 −0 Original line number Diff line number Diff line Loading @@ -414,6 +414,42 @@ TRACE_EVENT(rxrpc_rtt_rx, __entry->avg) ); TRACE_EVENT(rxrpc_timer, TP_PROTO(struct rxrpc_call *call, enum rxrpc_timer_trace why, unsigned long now), TP_ARGS(call, why, now), TP_STRUCT__entry( __field(struct rxrpc_call *, call ) __field(enum rxrpc_timer_trace, why ) __field(unsigned long, now ) __field(unsigned long, expire_at ) __field(unsigned long, ack_at ) __field(unsigned long, resend_at ) __field(unsigned long, timer ) ), TP_fast_assign( __entry->call = call; __entry->why = why; __entry->now = now; __entry->expire_at = call->expire_at; __entry->ack_at = call->ack_at; __entry->resend_at = call->resend_at; __entry->timer = call->timer.expires; ), TP_printk("c=%p %s now=%lx x=%ld a=%ld r=%ld t=%ld", __entry->call, rxrpc_timer_traces[__entry->why], __entry->now, __entry->expire_at - __entry->now, __entry->ack_at - __entry->now, __entry->resend_at - __entry->now, __entry->timer - __entry->now) ); #endif /* _TRACE_RXRPC_H */ /* This part must be outside protection */ Loading net/rxrpc/ar-internal.h +12 −1 Original line number Diff line number Diff line Loading @@ -678,6 +678,17 @@ enum rxrpc_rtt_rx_trace { extern const char rxrpc_rtt_rx_traces[rxrpc_rtt_rx__nr_trace][5]; enum rxrpc_timer_trace { rxrpc_timer_begin, rxrpc_timer_expired, rxrpc_timer_set_for_ack, rxrpc_timer_set_for_resend, rxrpc_timer_set_for_send, rxrpc_timer__nr_trace }; extern const char rxrpc_timer_traces[rxrpc_timer__nr_trace][8]; extern const char *const rxrpc_pkts[]; extern const char *rxrpc_acks(u8 reason); Loading Loading @@ -707,7 +718,7 @@ int rxrpc_reject_call(struct rxrpc_sock *); /* * call_event.c */ void rxrpc_set_timer(struct rxrpc_call *); void rxrpc_set_timer(struct rxrpc_call *, enum rxrpc_timer_trace); void rxrpc_propose_ACK(struct rxrpc_call *, u8, u16, u32, bool, bool); void rxrpc_process_call(struct work_struct *); Loading net/rxrpc/call_event.c +4 −3 Original line number Diff line number Diff line Loading @@ -24,7 +24,7 @@ /* * Set the timer */ void rxrpc_set_timer(struct rxrpc_call *call) void rxrpc_set_timer(struct rxrpc_call *call, enum rxrpc_timer_trace why) { unsigned long t, now = jiffies; Loading @@ -45,6 +45,7 @@ void rxrpc_set_timer(struct rxrpc_call *call) if (call->timer.expires != t || !timer_pending(&call->timer)) { mod_timer(&call->timer, t); trace_rxrpc_timer(call, why, now); } } Loading Loading @@ -120,7 +121,7 @@ static void __rxrpc_propose_ACK(struct rxrpc_call *call, u8 ack_reason, _debug("deferred ACK %ld < %ld", expiry, call->ack_at - now); if (time_before(ack_at, call->ack_at)) { call->ack_at = ack_at; rxrpc_set_timer(call); rxrpc_set_timer(call, rxrpc_timer_set_for_ack); } } } Loading Loading @@ -293,7 +294,7 @@ void rxrpc_process_call(struct work_struct *work) goto recheck_state; } rxrpc_set_timer(call); rxrpc_set_timer(call, rxrpc_timer_set_for_resend); /* other events may have been raised since we started checking */ if (call->events && call->state < RXRPC_CALL_COMPLETE) { Loading net/rxrpc/call_object.c +4 −2 Original line number Diff line number Diff line Loading @@ -76,9 +76,11 @@ static void rxrpc_call_timer_expired(unsigned long _call) _enter("%d", call->debug_id); if (call->state < RXRPC_CALL_COMPLETE) if (call->state < RXRPC_CALL_COMPLETE) { trace_rxrpc_timer(call, rxrpc_timer_expired, jiffies); rxrpc_queue_call(call); } } /* * find an extant server call Loading Loading @@ -200,7 +202,7 @@ static void rxrpc_start_call_timer(struct rxrpc_call *call) call->ack_at = expire_at; call->resend_at = expire_at; call->timer.expires = expire_at + 1; rxrpc_set_timer(call); rxrpc_set_timer(call, rxrpc_timer_begin); } /* Loading net/rxrpc/misc.c +8 −0 Original line number Diff line number Diff line Loading @@ -194,3 +194,11 @@ const char rxrpc_rtt_rx_traces[rxrpc_rtt_rx__nr_trace][5] = { [rxrpc_rtt_rx_ping_response] = "PONG", [rxrpc_rtt_rx_requested_ack] = "RACK", }; const char rxrpc_timer_traces[rxrpc_timer__nr_trace][8] = { [rxrpc_timer_begin] = "Begin ", [rxrpc_timer_expired] = "*EXPR*", [rxrpc_timer_set_for_ack] = "SetAck", [rxrpc_timer_set_for_send] = "SetTx ", [rxrpc_timer_set_for_resend] = "SetRTx", }; Loading
include/trace/events/rxrpc.h +36 −0 Original line number Diff line number Diff line Loading @@ -414,6 +414,42 @@ TRACE_EVENT(rxrpc_rtt_rx, __entry->avg) ); TRACE_EVENT(rxrpc_timer, TP_PROTO(struct rxrpc_call *call, enum rxrpc_timer_trace why, unsigned long now), TP_ARGS(call, why, now), TP_STRUCT__entry( __field(struct rxrpc_call *, call ) __field(enum rxrpc_timer_trace, why ) __field(unsigned long, now ) __field(unsigned long, expire_at ) __field(unsigned long, ack_at ) __field(unsigned long, resend_at ) __field(unsigned long, timer ) ), TP_fast_assign( __entry->call = call; __entry->why = why; __entry->now = now; __entry->expire_at = call->expire_at; __entry->ack_at = call->ack_at; __entry->resend_at = call->resend_at; __entry->timer = call->timer.expires; ), TP_printk("c=%p %s now=%lx x=%ld a=%ld r=%ld t=%ld", __entry->call, rxrpc_timer_traces[__entry->why], __entry->now, __entry->expire_at - __entry->now, __entry->ack_at - __entry->now, __entry->resend_at - __entry->now, __entry->timer - __entry->now) ); #endif /* _TRACE_RXRPC_H */ /* This part must be outside protection */ Loading
net/rxrpc/ar-internal.h +12 −1 Original line number Diff line number Diff line Loading @@ -678,6 +678,17 @@ enum rxrpc_rtt_rx_trace { extern const char rxrpc_rtt_rx_traces[rxrpc_rtt_rx__nr_trace][5]; enum rxrpc_timer_trace { rxrpc_timer_begin, rxrpc_timer_expired, rxrpc_timer_set_for_ack, rxrpc_timer_set_for_resend, rxrpc_timer_set_for_send, rxrpc_timer__nr_trace }; extern const char rxrpc_timer_traces[rxrpc_timer__nr_trace][8]; extern const char *const rxrpc_pkts[]; extern const char *rxrpc_acks(u8 reason); Loading Loading @@ -707,7 +718,7 @@ int rxrpc_reject_call(struct rxrpc_sock *); /* * call_event.c */ void rxrpc_set_timer(struct rxrpc_call *); void rxrpc_set_timer(struct rxrpc_call *, enum rxrpc_timer_trace); void rxrpc_propose_ACK(struct rxrpc_call *, u8, u16, u32, bool, bool); void rxrpc_process_call(struct work_struct *); Loading
net/rxrpc/call_event.c +4 −3 Original line number Diff line number Diff line Loading @@ -24,7 +24,7 @@ /* * Set the timer */ void rxrpc_set_timer(struct rxrpc_call *call) void rxrpc_set_timer(struct rxrpc_call *call, enum rxrpc_timer_trace why) { unsigned long t, now = jiffies; Loading @@ -45,6 +45,7 @@ void rxrpc_set_timer(struct rxrpc_call *call) if (call->timer.expires != t || !timer_pending(&call->timer)) { mod_timer(&call->timer, t); trace_rxrpc_timer(call, why, now); } } Loading Loading @@ -120,7 +121,7 @@ static void __rxrpc_propose_ACK(struct rxrpc_call *call, u8 ack_reason, _debug("deferred ACK %ld < %ld", expiry, call->ack_at - now); if (time_before(ack_at, call->ack_at)) { call->ack_at = ack_at; rxrpc_set_timer(call); rxrpc_set_timer(call, rxrpc_timer_set_for_ack); } } } Loading Loading @@ -293,7 +294,7 @@ void rxrpc_process_call(struct work_struct *work) goto recheck_state; } rxrpc_set_timer(call); rxrpc_set_timer(call, rxrpc_timer_set_for_resend); /* other events may have been raised since we started checking */ if (call->events && call->state < RXRPC_CALL_COMPLETE) { Loading
net/rxrpc/call_object.c +4 −2 Original line number Diff line number Diff line Loading @@ -76,9 +76,11 @@ static void rxrpc_call_timer_expired(unsigned long _call) _enter("%d", call->debug_id); if (call->state < RXRPC_CALL_COMPLETE) if (call->state < RXRPC_CALL_COMPLETE) { trace_rxrpc_timer(call, rxrpc_timer_expired, jiffies); rxrpc_queue_call(call); } } /* * find an extant server call Loading Loading @@ -200,7 +202,7 @@ static void rxrpc_start_call_timer(struct rxrpc_call *call) call->ack_at = expire_at; call->resend_at = expire_at; call->timer.expires = expire_at + 1; rxrpc_set_timer(call); rxrpc_set_timer(call, rxrpc_timer_begin); } /* Loading
net/rxrpc/misc.c +8 −0 Original line number Diff line number Diff line Loading @@ -194,3 +194,11 @@ const char rxrpc_rtt_rx_traces[rxrpc_rtt_rx__nr_trace][5] = { [rxrpc_rtt_rx_ping_response] = "PONG", [rxrpc_rtt_rx_requested_ack] = "RACK", }; const char rxrpc_timer_traces[rxrpc_timer__nr_trace][8] = { [rxrpc_timer_begin] = "Begin ", [rxrpc_timer_expired] = "*EXPR*", [rxrpc_timer_set_for_ack] = "SetAck", [rxrpc_timer_set_for_send] = "SetTx ", [rxrpc_timer_set_for_resend] = "SetRTx", };