xref: /openbmc/linux/include/trace/events/rxrpc.h (revision fc7ab6d29a3af0b7f6df7c095509378c8caf85b5)
1df844fd4SDavid Howells /* AF_RXRPC tracepoints
2df844fd4SDavid Howells  *
3df844fd4SDavid Howells  * Copyright (C) 2016 Red Hat, Inc. All Rights Reserved.
4df844fd4SDavid Howells  * Written by David Howells (dhowells@redhat.com)
5df844fd4SDavid Howells  *
6df844fd4SDavid Howells  * This program is free software; you can redistribute it and/or
7df844fd4SDavid Howells  * modify it under the terms of the GNU General Public Licence
8df844fd4SDavid Howells  * as published by the Free Software Foundation; either version
9df844fd4SDavid Howells  * 2 of the Licence, or (at your option) any later version.
10df844fd4SDavid Howells  */
11df844fd4SDavid Howells #undef TRACE_SYSTEM
12df844fd4SDavid Howells #define TRACE_SYSTEM rxrpc
13df844fd4SDavid Howells 
14df844fd4SDavid Howells #if !defined(_TRACE_RXRPC_H) || defined(TRACE_HEADER_MULTI_READ)
15df844fd4SDavid Howells #define _TRACE_RXRPC_H
16df844fd4SDavid Howells 
17df844fd4SDavid Howells #include <linux/tracepoint.h>
18df844fd4SDavid Howells 
19363deeabSDavid Howells TRACE_EVENT(rxrpc_conn,
20363deeabSDavid Howells 	    TP_PROTO(struct rxrpc_connection *conn, enum rxrpc_conn_trace op,
21363deeabSDavid Howells 		     int usage, const void *where),
22363deeabSDavid Howells 
23363deeabSDavid Howells 	    TP_ARGS(conn, op, usage, where),
24363deeabSDavid Howells 
25363deeabSDavid Howells 	    TP_STRUCT__entry(
26363deeabSDavid Howells 		    __field(struct rxrpc_connection *,	conn		)
27363deeabSDavid Howells 		    __field(int,			op		)
28363deeabSDavid Howells 		    __field(int,			usage		)
29363deeabSDavid Howells 		    __field(const void *,		where		)
30363deeabSDavid Howells 			     ),
31363deeabSDavid Howells 
32363deeabSDavid Howells 	    TP_fast_assign(
33363deeabSDavid Howells 		    __entry->conn = conn;
34363deeabSDavid Howells 		    __entry->op = op;
35363deeabSDavid Howells 		    __entry->usage = usage;
36363deeabSDavid Howells 		    __entry->where = where;
37363deeabSDavid Howells 			   ),
38363deeabSDavid Howells 
39363deeabSDavid Howells 	    TP_printk("C=%p %s u=%d sp=%pSR",
40363deeabSDavid Howells 		      __entry->conn,
41363deeabSDavid Howells 		      rxrpc_conn_traces[__entry->op],
42363deeabSDavid Howells 		      __entry->usage,
43363deeabSDavid Howells 		      __entry->where)
44363deeabSDavid Howells 	    );
45363deeabSDavid Howells 
46363deeabSDavid Howells TRACE_EVENT(rxrpc_client,
47363deeabSDavid Howells 	    TP_PROTO(struct rxrpc_connection *conn, int channel,
48363deeabSDavid Howells 		     enum rxrpc_client_trace op),
49363deeabSDavid Howells 
50363deeabSDavid Howells 	    TP_ARGS(conn, channel, op),
51363deeabSDavid Howells 
52363deeabSDavid Howells 	    TP_STRUCT__entry(
53363deeabSDavid Howells 		    __field(struct rxrpc_connection *,	conn		)
54363deeabSDavid Howells 		    __field(u32,			cid		)
55363deeabSDavid Howells 		    __field(int,			channel		)
56363deeabSDavid Howells 		    __field(int,			usage		)
57363deeabSDavid Howells 		    __field(enum rxrpc_client_trace,	op		)
58363deeabSDavid Howells 		    __field(enum rxrpc_conn_cache_state, cs		)
59363deeabSDavid Howells 			     ),
60363deeabSDavid Howells 
61363deeabSDavid Howells 	    TP_fast_assign(
62363deeabSDavid Howells 		    __entry->conn = conn;
63363deeabSDavid Howells 		    __entry->channel = channel;
64363deeabSDavid Howells 		    __entry->usage = atomic_read(&conn->usage);
65363deeabSDavid Howells 		    __entry->op = op;
66363deeabSDavid Howells 		    __entry->cid = conn->proto.cid;
67363deeabSDavid Howells 		    __entry->cs = conn->cache_state;
68363deeabSDavid Howells 			   ),
69363deeabSDavid Howells 
70363deeabSDavid Howells 	    TP_printk("C=%p h=%2d %s %s i=%08x u=%d",
71363deeabSDavid Howells 		      __entry->conn,
72363deeabSDavid Howells 		      __entry->channel,
73363deeabSDavid Howells 		      rxrpc_client_traces[__entry->op],
74363deeabSDavid Howells 		      rxrpc_conn_cache_states[__entry->cs],
75363deeabSDavid Howells 		      __entry->cid,
76363deeabSDavid Howells 		      __entry->usage)
77363deeabSDavid Howells 	    );
78363deeabSDavid Howells 
79e34d4234SDavid Howells TRACE_EVENT(rxrpc_call,
80fff72429SDavid Howells 	    TP_PROTO(struct rxrpc_call *call, enum rxrpc_call_trace op,
812ab27215SDavid Howells 		     int usage, const void *where, const void *aux),
82e34d4234SDavid Howells 
832ab27215SDavid Howells 	    TP_ARGS(call, op, usage, where, aux),
84e34d4234SDavid Howells 
85e34d4234SDavid Howells 	    TP_STRUCT__entry(
86e34d4234SDavid Howells 		    __field(struct rxrpc_call *,	call		)
87e34d4234SDavid Howells 		    __field(int,			op		)
88e34d4234SDavid Howells 		    __field(int,			usage		)
89e34d4234SDavid Howells 		    __field(const void *,		where		)
90e34d4234SDavid Howells 		    __field(const void *,		aux		)
91e34d4234SDavid Howells 			     ),
92e34d4234SDavid Howells 
93e34d4234SDavid Howells 	    TP_fast_assign(
94e34d4234SDavid Howells 		    __entry->call = call;
95e34d4234SDavid Howells 		    __entry->op = op;
96e34d4234SDavid Howells 		    __entry->usage = usage;
97e34d4234SDavid Howells 		    __entry->where = where;
98e34d4234SDavid Howells 		    __entry->aux = aux;
99e34d4234SDavid Howells 			   ),
100e34d4234SDavid Howells 
1012ab27215SDavid Howells 	    TP_printk("c=%p %s u=%d sp=%pSR a=%p",
102e34d4234SDavid Howells 		      __entry->call,
103fff72429SDavid Howells 		      rxrpc_call_traces[__entry->op],
104e34d4234SDavid Howells 		      __entry->usage,
105e34d4234SDavid Howells 		      __entry->where,
106e34d4234SDavid Howells 		      __entry->aux)
107e34d4234SDavid Howells 	    );
108e34d4234SDavid Howells 
109df844fd4SDavid Howells TRACE_EVENT(rxrpc_skb,
11071f3ca40SDavid Howells 	    TP_PROTO(struct sk_buff *skb, enum rxrpc_skb_trace op,
11171f3ca40SDavid Howells 		     int usage, int mod_count, const void *where),
112df844fd4SDavid Howells 
113df844fd4SDavid Howells 	    TP_ARGS(skb, op, usage, mod_count, where),
114df844fd4SDavid Howells 
115df844fd4SDavid Howells 	    TP_STRUCT__entry(
116df844fd4SDavid Howells 		    __field(struct sk_buff *,		skb		)
11771f3ca40SDavid Howells 		    __field(enum rxrpc_skb_trace,	op		)
118df844fd4SDavid Howells 		    __field(int,			usage		)
119df844fd4SDavid Howells 		    __field(int,			mod_count	)
120df844fd4SDavid Howells 		    __field(const void *,		where		)
121df844fd4SDavid Howells 			     ),
122df844fd4SDavid Howells 
123df844fd4SDavid Howells 	    TP_fast_assign(
124df844fd4SDavid Howells 		    __entry->skb = skb;
125df844fd4SDavid Howells 		    __entry->op = op;
126df844fd4SDavid Howells 		    __entry->usage = usage;
127df844fd4SDavid Howells 		    __entry->mod_count = mod_count;
128df844fd4SDavid Howells 		    __entry->where = where;
129df844fd4SDavid Howells 			   ),
130df844fd4SDavid Howells 
131df844fd4SDavid Howells 	    TP_printk("s=%p %s u=%d m=%d p=%pSR",
132df844fd4SDavid Howells 		      __entry->skb,
13371f3ca40SDavid Howells 		      rxrpc_skb_traces[__entry->op],
134df844fd4SDavid Howells 		      __entry->usage,
135df844fd4SDavid Howells 		      __entry->mod_count,
136df844fd4SDavid Howells 		      __entry->where)
137df844fd4SDavid Howells 	    );
138df844fd4SDavid Howells 
13949e19ec7SDavid Howells TRACE_EVENT(rxrpc_rx_packet,
14049e19ec7SDavid Howells 	    TP_PROTO(struct rxrpc_skb_priv *sp),
14149e19ec7SDavid Howells 
14249e19ec7SDavid Howells 	    TP_ARGS(sp),
14349e19ec7SDavid Howells 
14449e19ec7SDavid Howells 	    TP_STRUCT__entry(
14549e19ec7SDavid Howells 		    __field_struct(struct rxrpc_host_header,	hdr		)
14649e19ec7SDavid Howells 			     ),
14749e19ec7SDavid Howells 
14849e19ec7SDavid Howells 	    TP_fast_assign(
14949e19ec7SDavid Howells 		    memcpy(&__entry->hdr, &sp->hdr, sizeof(__entry->hdr));
15049e19ec7SDavid Howells 			   ),
15149e19ec7SDavid Howells 
152a3868bfcSDavid Howells 	    TP_printk("%08x:%08x:%08x:%04x %08x %08x %02x %02x %s",
15349e19ec7SDavid Howells 		      __entry->hdr.epoch, __entry->hdr.cid,
15449e19ec7SDavid Howells 		      __entry->hdr.callNumber, __entry->hdr.serviceId,
15549e19ec7SDavid Howells 		      __entry->hdr.serial, __entry->hdr.seq,
156a3868bfcSDavid Howells 		      __entry->hdr.type, __entry->hdr.flags,
157a3868bfcSDavid Howells 		      __entry->hdr.type <= 15 ? rxrpc_pkts[__entry->hdr.type] : "?UNK")
15849e19ec7SDavid Howells 	    );
15949e19ec7SDavid Howells 
16049e19ec7SDavid Howells TRACE_EVENT(rxrpc_rx_done,
16149e19ec7SDavid Howells 	    TP_PROTO(int result, int abort_code),
16249e19ec7SDavid Howells 
16349e19ec7SDavid Howells 	    TP_ARGS(result, abort_code),
16449e19ec7SDavid Howells 
16549e19ec7SDavid Howells 	    TP_STRUCT__entry(
16649e19ec7SDavid Howells 		    __field(int,			result		)
16749e19ec7SDavid Howells 		    __field(int,			abort_code	)
16849e19ec7SDavid Howells 			     ),
16949e19ec7SDavid Howells 
17049e19ec7SDavid Howells 	    TP_fast_assign(
17149e19ec7SDavid Howells 		    __entry->result = result;
17249e19ec7SDavid Howells 		    __entry->abort_code = abort_code;
17349e19ec7SDavid Howells 			   ),
17449e19ec7SDavid Howells 
17549e19ec7SDavid Howells 	    TP_printk("r=%d a=%d", __entry->result, __entry->abort_code)
17649e19ec7SDavid Howells 	    );
17749e19ec7SDavid Howells 
1785a42976dSDavid Howells TRACE_EVENT(rxrpc_abort,
1795a42976dSDavid Howells 	    TP_PROTO(const char *why, u32 cid, u32 call_id, rxrpc_seq_t seq,
1805a42976dSDavid Howells 		     int abort_code, int error),
1815a42976dSDavid Howells 
1825a42976dSDavid Howells 	    TP_ARGS(why, cid, call_id, seq, abort_code, error),
1835a42976dSDavid Howells 
1845a42976dSDavid Howells 	    TP_STRUCT__entry(
1855a42976dSDavid Howells 		    __array(char,			why, 4		)
1865a42976dSDavid Howells 		    __field(u32,			cid		)
1875a42976dSDavid Howells 		    __field(u32,			call_id		)
1885a42976dSDavid Howells 		    __field(rxrpc_seq_t,		seq		)
1895a42976dSDavid Howells 		    __field(int,			abort_code	)
1905a42976dSDavid Howells 		    __field(int,			error		)
1915a42976dSDavid Howells 			     ),
1925a42976dSDavid Howells 
1935a42976dSDavid Howells 	    TP_fast_assign(
1945a42976dSDavid Howells 		    memcpy(__entry->why, why, 4);
1955a42976dSDavid Howells 		    __entry->cid = cid;
1965a42976dSDavid Howells 		    __entry->call_id = call_id;
1975a42976dSDavid Howells 		    __entry->abort_code = abort_code;
1985a42976dSDavid Howells 		    __entry->error = error;
1995a42976dSDavid Howells 		    __entry->seq = seq;
2005a42976dSDavid Howells 			   ),
2015a42976dSDavid Howells 
2025a42976dSDavid Howells 	    TP_printk("%08x:%08x s=%u a=%d e=%d %s",
2035a42976dSDavid Howells 		      __entry->cid, __entry->call_id, __entry->seq,
2045a42976dSDavid Howells 		      __entry->abort_code, __entry->error, __entry->why)
2055a42976dSDavid Howells 	    );
2065a42976dSDavid Howells 
207a124fe3eSDavid Howells TRACE_EVENT(rxrpc_transmit,
208a124fe3eSDavid Howells 	    TP_PROTO(struct rxrpc_call *call, enum rxrpc_transmit_trace why),
209a124fe3eSDavid Howells 
210a124fe3eSDavid Howells 	    TP_ARGS(call, why),
211a124fe3eSDavid Howells 
212a124fe3eSDavid Howells 	    TP_STRUCT__entry(
213a124fe3eSDavid Howells 		    __field(struct rxrpc_call *,	call		)
214a124fe3eSDavid Howells 		    __field(enum rxrpc_transmit_trace,	why		)
215a124fe3eSDavid Howells 		    __field(rxrpc_seq_t,		tx_hard_ack	)
216a124fe3eSDavid Howells 		    __field(rxrpc_seq_t,		tx_top		)
217a124fe3eSDavid Howells 			     ),
218a124fe3eSDavid Howells 
219a124fe3eSDavid Howells 	    TP_fast_assign(
220a124fe3eSDavid Howells 		    __entry->call = call;
221a124fe3eSDavid Howells 		    __entry->why = why;
222a124fe3eSDavid Howells 		    __entry->tx_hard_ack = call->tx_hard_ack;
223a124fe3eSDavid Howells 		    __entry->tx_top = call->tx_top;
224a124fe3eSDavid Howells 			   ),
225a124fe3eSDavid Howells 
226a124fe3eSDavid Howells 	    TP_printk("c=%p %s f=%08x n=%u",
227a124fe3eSDavid Howells 		      __entry->call,
228a124fe3eSDavid Howells 		      rxrpc_transmit_traces[__entry->why],
229a124fe3eSDavid Howells 		      __entry->tx_hard_ack + 1,
230a124fe3eSDavid Howells 		      __entry->tx_top - __entry->tx_hard_ack)
231a124fe3eSDavid Howells 	    );
232a124fe3eSDavid Howells 
233ec71eb9aSDavid Howells TRACE_EVENT(rxrpc_rx_ack,
234ec71eb9aSDavid Howells 	    TP_PROTO(struct rxrpc_call *call, rxrpc_seq_t first, u8 reason, u8 n_acks),
235ec71eb9aSDavid Howells 
236ec71eb9aSDavid Howells 	    TP_ARGS(call, first, reason, n_acks),
237ec71eb9aSDavid Howells 
238ec71eb9aSDavid Howells 	    TP_STRUCT__entry(
239ec71eb9aSDavid Howells 		    __field(struct rxrpc_call *,	call		)
240ec71eb9aSDavid Howells 		    __field(rxrpc_seq_t,		first		)
241ec71eb9aSDavid Howells 		    __field(u8,				reason		)
242ec71eb9aSDavid Howells 		    __field(u8,				n_acks		)
243ec71eb9aSDavid Howells 			     ),
244ec71eb9aSDavid Howells 
245ec71eb9aSDavid Howells 	    TP_fast_assign(
246ec71eb9aSDavid Howells 		    __entry->call = call;
247ec71eb9aSDavid Howells 		    __entry->first = first;
248ec71eb9aSDavid Howells 		    __entry->reason = reason;
249ec71eb9aSDavid Howells 		    __entry->n_acks = n_acks;
250ec71eb9aSDavid Howells 			   ),
251ec71eb9aSDavid Howells 
252ec71eb9aSDavid Howells 	    TP_printk("c=%p %s f=%08x n=%u",
253ec71eb9aSDavid Howells 		      __entry->call,
254ec71eb9aSDavid Howells 		      rxrpc_acks(__entry->reason),
255ec71eb9aSDavid Howells 		      __entry->first,
256ec71eb9aSDavid Howells 		      __entry->n_acks)
257ec71eb9aSDavid Howells 	    );
258ec71eb9aSDavid Howells 
259f3639df2SDavid Howells TRACE_EVENT(rxrpc_tx_ack,
260f3639df2SDavid Howells 	    TP_PROTO(struct rxrpc_call *call, rxrpc_seq_t first,
261f3639df2SDavid Howells 		     rxrpc_serial_t serial, u8 reason, u8 n_acks),
262f3639df2SDavid Howells 
263f3639df2SDavid Howells 	    TP_ARGS(call, first, serial, reason, n_acks),
264f3639df2SDavid Howells 
265f3639df2SDavid Howells 	    TP_STRUCT__entry(
266f3639df2SDavid Howells 		    __field(struct rxrpc_call *,	call		)
267f3639df2SDavid Howells 		    __field(rxrpc_seq_t,		first		)
268f3639df2SDavid Howells 		    __field(rxrpc_serial_t,		serial		)
269f3639df2SDavid Howells 		    __field(u8,				reason		)
270f3639df2SDavid Howells 		    __field(u8,				n_acks		)
271f3639df2SDavid Howells 			     ),
272f3639df2SDavid Howells 
273f3639df2SDavid Howells 	    TP_fast_assign(
274f3639df2SDavid Howells 		    __entry->call = call;
275f3639df2SDavid Howells 		    __entry->first = first;
276f3639df2SDavid Howells 		    __entry->serial = serial;
277f3639df2SDavid Howells 		    __entry->reason = reason;
278f3639df2SDavid Howells 		    __entry->n_acks = n_acks;
279f3639df2SDavid Howells 			   ),
280f3639df2SDavid Howells 
281f3639df2SDavid Howells 	    TP_printk("c=%p %s f=%08x r=%08x n=%u",
282f3639df2SDavid Howells 		      __entry->call,
283f3639df2SDavid Howells 		      rxrpc_acks(__entry->reason),
284f3639df2SDavid Howells 		      __entry->first,
285f3639df2SDavid Howells 		      __entry->serial,
286f3639df2SDavid Howells 		      __entry->n_acks)
287f3639df2SDavid Howells 	    );
288f3639df2SDavid Howells 
28958dc63c9SDavid Howells TRACE_EVENT(rxrpc_receive,
29058dc63c9SDavid Howells 	    TP_PROTO(struct rxrpc_call *call, enum rxrpc_receive_trace why,
29158dc63c9SDavid Howells 		     rxrpc_serial_t serial, rxrpc_seq_t seq),
29258dc63c9SDavid Howells 
29358dc63c9SDavid Howells 	    TP_ARGS(call, why, serial, seq),
29458dc63c9SDavid Howells 
29558dc63c9SDavid Howells 	    TP_STRUCT__entry(
29658dc63c9SDavid Howells 		    __field(struct rxrpc_call *,	call		)
29758dc63c9SDavid Howells 		    __field(enum rxrpc_receive_trace,	why		)
29858dc63c9SDavid Howells 		    __field(rxrpc_serial_t,		serial		)
29958dc63c9SDavid Howells 		    __field(rxrpc_seq_t,		seq		)
30058dc63c9SDavid Howells 		    __field(rxrpc_seq_t,		hard_ack	)
30158dc63c9SDavid Howells 		    __field(rxrpc_seq_t,		top		)
30258dc63c9SDavid Howells 			     ),
30358dc63c9SDavid Howells 
30458dc63c9SDavid Howells 	    TP_fast_assign(
30558dc63c9SDavid Howells 		    __entry->call = call;
30658dc63c9SDavid Howells 		    __entry->why = why;
30758dc63c9SDavid Howells 		    __entry->serial = serial;
30858dc63c9SDavid Howells 		    __entry->seq = seq;
30958dc63c9SDavid Howells 		    __entry->hard_ack = call->rx_hard_ack;
31058dc63c9SDavid Howells 		    __entry->top = call->rx_top;
31158dc63c9SDavid Howells 			   ),
31258dc63c9SDavid Howells 
31358dc63c9SDavid Howells 	    TP_printk("c=%p %s r=%08x q=%08x w=%08x-%08x",
31458dc63c9SDavid Howells 		      __entry->call,
31558dc63c9SDavid Howells 		      rxrpc_receive_traces[__entry->why],
31658dc63c9SDavid Howells 		      __entry->serial,
31758dc63c9SDavid Howells 		      __entry->seq,
31858dc63c9SDavid Howells 		      __entry->hard_ack,
31958dc63c9SDavid Howells 		      __entry->top)
32058dc63c9SDavid Howells 	    );
32158dc63c9SDavid Howells 
32284997905SDavid Howells TRACE_EVENT(rxrpc_recvmsg,
32384997905SDavid Howells 	    TP_PROTO(struct rxrpc_call *call, enum rxrpc_recvmsg_trace why,
32484997905SDavid Howells 		     rxrpc_seq_t seq, unsigned int offset, unsigned int len,
32584997905SDavid Howells 		     int ret),
32684997905SDavid Howells 
32784997905SDavid Howells 	    TP_ARGS(call, why, seq, offset, len, ret),
32884997905SDavid Howells 
32984997905SDavid Howells 	    TP_STRUCT__entry(
33084997905SDavid Howells 		    __field(struct rxrpc_call *,	call		)
33184997905SDavid Howells 		    __field(enum rxrpc_recvmsg_trace,	why		)
33284997905SDavid Howells 		    __field(rxrpc_seq_t,		seq		)
33384997905SDavid Howells 		    __field(unsigned int,		offset		)
33484997905SDavid Howells 		    __field(unsigned int,		len		)
33584997905SDavid Howells 		    __field(int,			ret		)
33684997905SDavid Howells 			     ),
33784997905SDavid Howells 
33884997905SDavid Howells 	    TP_fast_assign(
33984997905SDavid Howells 		    __entry->call = call;
34084997905SDavid Howells 		    __entry->why = why;
34184997905SDavid Howells 		    __entry->seq = seq;
34284997905SDavid Howells 		    __entry->offset = offset;
34384997905SDavid Howells 		    __entry->len = len;
34484997905SDavid Howells 		    __entry->ret = ret;
34584997905SDavid Howells 			   ),
34684997905SDavid Howells 
34784997905SDavid Howells 	    TP_printk("c=%p %s q=%08x o=%u l=%u ret=%d",
34884997905SDavid Howells 		      __entry->call,
34984997905SDavid Howells 		      rxrpc_recvmsg_traces[__entry->why],
35084997905SDavid Howells 		      __entry->seq,
35184997905SDavid Howells 		      __entry->offset,
35284997905SDavid Howells 		      __entry->len,
35384997905SDavid Howells 		      __entry->ret)
35484997905SDavid Howells 	    );
35584997905SDavid Howells 
356cf1a6474SDavid Howells TRACE_EVENT(rxrpc_rtt_tx,
357cf1a6474SDavid Howells 	    TP_PROTO(struct rxrpc_call *call, enum rxrpc_rtt_tx_trace why,
358cf1a6474SDavid Howells 		     rxrpc_serial_t send_serial),
359cf1a6474SDavid Howells 
360cf1a6474SDavid Howells 	    TP_ARGS(call, why, send_serial),
361cf1a6474SDavid Howells 
362cf1a6474SDavid Howells 	    TP_STRUCT__entry(
363cf1a6474SDavid Howells 		    __field(struct rxrpc_call *,	call		)
364cf1a6474SDavid Howells 		    __field(enum rxrpc_rtt_tx_trace,	why		)
365cf1a6474SDavid Howells 		    __field(rxrpc_serial_t,		send_serial	)
366cf1a6474SDavid Howells 			     ),
367cf1a6474SDavid Howells 
368cf1a6474SDavid Howells 	    TP_fast_assign(
369cf1a6474SDavid Howells 		    __entry->call = call;
370cf1a6474SDavid Howells 		    __entry->why = why;
371cf1a6474SDavid Howells 		    __entry->send_serial = send_serial;
372cf1a6474SDavid Howells 			   ),
373cf1a6474SDavid Howells 
374cf1a6474SDavid Howells 	    TP_printk("c=%p %s sr=%08x",
375cf1a6474SDavid Howells 		      __entry->call,
376cf1a6474SDavid Howells 		      rxrpc_rtt_tx_traces[__entry->why],
377cf1a6474SDavid Howells 		      __entry->send_serial)
378cf1a6474SDavid Howells 	    );
379cf1a6474SDavid Howells 
380cf1a6474SDavid Howells TRACE_EVENT(rxrpc_rtt_rx,
381cf1a6474SDavid Howells 	    TP_PROTO(struct rxrpc_call *call, enum rxrpc_rtt_rx_trace why,
382cf1a6474SDavid Howells 		     rxrpc_serial_t send_serial, rxrpc_serial_t resp_serial,
383cf1a6474SDavid Howells 		     s64 rtt, u8 nr, s64 avg),
384cf1a6474SDavid Howells 
385cf1a6474SDavid Howells 	    TP_ARGS(call, why, send_serial, resp_serial, rtt, nr, avg),
386cf1a6474SDavid Howells 
387cf1a6474SDavid Howells 	    TP_STRUCT__entry(
388cf1a6474SDavid Howells 		    __field(struct rxrpc_call *,	call		)
389cf1a6474SDavid Howells 		    __field(enum rxrpc_rtt_rx_trace,	why		)
390cf1a6474SDavid Howells 		    __field(u8,				nr		)
391cf1a6474SDavid Howells 		    __field(rxrpc_serial_t,		send_serial	)
392cf1a6474SDavid Howells 		    __field(rxrpc_serial_t,		resp_serial	)
393cf1a6474SDavid Howells 		    __field(s64,			rtt		)
394cf1a6474SDavid Howells 		    __field(u64,			avg		)
395cf1a6474SDavid Howells 			     ),
396cf1a6474SDavid Howells 
397cf1a6474SDavid Howells 	    TP_fast_assign(
398cf1a6474SDavid Howells 		    __entry->call = call;
399cf1a6474SDavid Howells 		    __entry->why = why;
400cf1a6474SDavid Howells 		    __entry->send_serial = send_serial;
401cf1a6474SDavid Howells 		    __entry->resp_serial = resp_serial;
402cf1a6474SDavid Howells 		    __entry->rtt = rtt;
403cf1a6474SDavid Howells 		    __entry->nr = nr;
404cf1a6474SDavid Howells 		    __entry->avg = avg;
405cf1a6474SDavid Howells 			   ),
406cf1a6474SDavid Howells 
407cf1a6474SDavid Howells 	    TP_printk("c=%p %s sr=%08x rr=%08x rtt=%lld nr=%u avg=%lld",
408cf1a6474SDavid Howells 		      __entry->call,
409cf1a6474SDavid Howells 		      rxrpc_rtt_rx_traces[__entry->why],
410cf1a6474SDavid Howells 		      __entry->send_serial,
411cf1a6474SDavid Howells 		      __entry->resp_serial,
412cf1a6474SDavid Howells 		      __entry->rtt,
413cf1a6474SDavid Howells 		      __entry->nr,
414cf1a6474SDavid Howells 		      __entry->avg)
415cf1a6474SDavid Howells 	    );
416cf1a6474SDavid Howells 
417*fc7ab6d2SDavid Howells TRACE_EVENT(rxrpc_timer,
418*fc7ab6d2SDavid Howells 	    TP_PROTO(struct rxrpc_call *call, enum rxrpc_timer_trace why,
419*fc7ab6d2SDavid Howells 		     unsigned long now),
420*fc7ab6d2SDavid Howells 
421*fc7ab6d2SDavid Howells 	    TP_ARGS(call, why, now),
422*fc7ab6d2SDavid Howells 
423*fc7ab6d2SDavid Howells 	    TP_STRUCT__entry(
424*fc7ab6d2SDavid Howells 		    __field(struct rxrpc_call *,		call		)
425*fc7ab6d2SDavid Howells 		    __field(enum rxrpc_timer_trace,		why		)
426*fc7ab6d2SDavid Howells 		    __field(unsigned long,			now		)
427*fc7ab6d2SDavid Howells 		    __field(unsigned long,			expire_at	)
428*fc7ab6d2SDavid Howells 		    __field(unsigned long,			ack_at		)
429*fc7ab6d2SDavid Howells 		    __field(unsigned long,			resend_at	)
430*fc7ab6d2SDavid Howells 		    __field(unsigned long,			timer		)
431*fc7ab6d2SDavid Howells 			     ),
432*fc7ab6d2SDavid Howells 
433*fc7ab6d2SDavid Howells 	    TP_fast_assign(
434*fc7ab6d2SDavid Howells 		    __entry->call	= call;
435*fc7ab6d2SDavid Howells 		    __entry->why	= why;
436*fc7ab6d2SDavid Howells 		    __entry->now	= now;
437*fc7ab6d2SDavid Howells 		    __entry->expire_at	= call->expire_at;
438*fc7ab6d2SDavid Howells 		    __entry->ack_at	= call->ack_at;
439*fc7ab6d2SDavid Howells 		    __entry->resend_at	= call->resend_at;
440*fc7ab6d2SDavid Howells 		    __entry->timer	= call->timer.expires;
441*fc7ab6d2SDavid Howells 			   ),
442*fc7ab6d2SDavid Howells 
443*fc7ab6d2SDavid Howells 	    TP_printk("c=%p %s now=%lx x=%ld a=%ld r=%ld t=%ld",
444*fc7ab6d2SDavid Howells 		      __entry->call,
445*fc7ab6d2SDavid Howells 		      rxrpc_timer_traces[__entry->why],
446*fc7ab6d2SDavid Howells 		      __entry->now,
447*fc7ab6d2SDavid Howells 		      __entry->expire_at - __entry->now,
448*fc7ab6d2SDavid Howells 		      __entry->ack_at - __entry->now,
449*fc7ab6d2SDavid Howells 		      __entry->resend_at - __entry->now,
450*fc7ab6d2SDavid Howells 		      __entry->timer - __entry->now)
451*fc7ab6d2SDavid Howells 	    );
452*fc7ab6d2SDavid Howells 
453df844fd4SDavid Howells #endif /* _TRACE_RXRPC_H */
454df844fd4SDavid Howells 
455df844fd4SDavid Howells /* This part must be outside protection */
456df844fd4SDavid Howells #include <trace/define_trace.h>
457