rxrpc: Add a tracepoint for the call timer

Add a tracepoint to log call timer initiation, setting and expiry.

Signed-off-by: David Howells <dhowells@redhat.com>
This commit is contained in:
David Howells
2016-09-23 15:22:36 +01:00
parent b86e218e0d
commit fc7ab6d29a
6 changed files with 65 additions and 7 deletions

View File

@@ -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 */