]>
Commit | Line | Data |
---|---|---|
df844fd4 DH |
1 | /* AF_RXRPC tracepoints |
2 | * | |
3 | * Copyright (C) 2016 Red Hat, Inc. All Rights Reserved. | |
4 | * Written by David Howells (dhowells@redhat.com) | |
5 | * | |
6 | * This program is free software; you can redistribute it and/or | |
7 | * modify it under the terms of the GNU General Public Licence | |
8 | * as published by the Free Software Foundation; either version | |
9 | * 2 of the Licence, or (at your option) any later version. | |
10 | */ | |
11 | #undef TRACE_SYSTEM | |
12 | #define TRACE_SYSTEM rxrpc | |
13 | ||
14 | #if !defined(_TRACE_RXRPC_H) || defined(TRACE_HEADER_MULTI_READ) | |
15 | #define _TRACE_RXRPC_H | |
16 | ||
17 | #include <linux/tracepoint.h> | |
18 | ||
b54a134a DH |
19 | /* |
20 | * Define enums for tracing information. | |
21 | * | |
22 | * These should all be kept sorted, making it easier to match the string | |
23 | * mapping tables further on. | |
24 | */ | |
25 | #ifndef __RXRPC_DECLARE_TRACE_ENUMS_ONCE_ONLY | |
26 | #define __RXRPC_DECLARE_TRACE_ENUMS_ONCE_ONLY | |
27 | ||
28 | enum rxrpc_skb_trace { | |
29 | rxrpc_skb_rx_cleaned, | |
30 | rxrpc_skb_rx_freed, | |
31 | rxrpc_skb_rx_got, | |
32 | rxrpc_skb_rx_lost, | |
33 | rxrpc_skb_rx_purged, | |
34 | rxrpc_skb_rx_received, | |
35 | rxrpc_skb_rx_rotated, | |
36 | rxrpc_skb_rx_seen, | |
37 | rxrpc_skb_tx_cleaned, | |
38 | rxrpc_skb_tx_freed, | |
39 | rxrpc_skb_tx_got, | |
40 | rxrpc_skb_tx_new, | |
41 | rxrpc_skb_tx_rotated, | |
42 | rxrpc_skb_tx_seen, | |
43 | }; | |
44 | ||
45 | enum rxrpc_conn_trace { | |
46 | rxrpc_conn_got, | |
47 | rxrpc_conn_new_client, | |
48 | rxrpc_conn_new_service, | |
49 | rxrpc_conn_put_client, | |
50 | rxrpc_conn_put_service, | |
51 | rxrpc_conn_queued, | |
f859ab61 | 52 | rxrpc_conn_reap_service, |
b54a134a DH |
53 | rxrpc_conn_seen, |
54 | }; | |
55 | ||
56 | enum rxrpc_client_trace { | |
57 | rxrpc_client_activate_chans, | |
58 | rxrpc_client_alloc, | |
59 | rxrpc_client_chan_activate, | |
60 | rxrpc_client_chan_disconnect, | |
61 | rxrpc_client_chan_pass, | |
62 | rxrpc_client_chan_unstarted, | |
63 | rxrpc_client_cleanup, | |
64 | rxrpc_client_count, | |
65 | rxrpc_client_discard, | |
66 | rxrpc_client_duplicate, | |
67 | rxrpc_client_exposed, | |
68 | rxrpc_client_replace, | |
69 | rxrpc_client_to_active, | |
70 | rxrpc_client_to_culled, | |
71 | rxrpc_client_to_idle, | |
72 | rxrpc_client_to_inactive, | |
73 | rxrpc_client_to_upgrade, | |
74 | rxrpc_client_to_waiting, | |
75 | rxrpc_client_uncount, | |
76 | }; | |
77 | ||
78 | enum rxrpc_call_trace { | |
79 | rxrpc_call_connected, | |
80 | rxrpc_call_error, | |
81 | rxrpc_call_got, | |
82 | rxrpc_call_got_kernel, | |
83 | rxrpc_call_got_userid, | |
84 | rxrpc_call_new_client, | |
85 | rxrpc_call_new_service, | |
86 | rxrpc_call_put, | |
87 | rxrpc_call_put_kernel, | |
88 | rxrpc_call_put_noqueue, | |
89 | rxrpc_call_put_userid, | |
90 | rxrpc_call_queued, | |
91 | rxrpc_call_queued_ref, | |
92 | rxrpc_call_release, | |
93 | rxrpc_call_seen, | |
94 | }; | |
95 | ||
96 | enum rxrpc_transmit_trace { | |
97 | rxrpc_transmit_await_reply, | |
98 | rxrpc_transmit_end, | |
99 | rxrpc_transmit_queue, | |
100 | rxrpc_transmit_queue_last, | |
101 | rxrpc_transmit_rotate, | |
102 | rxrpc_transmit_rotate_last, | |
103 | rxrpc_transmit_wait, | |
104 | }; | |
105 | ||
106 | enum rxrpc_receive_trace { | |
107 | rxrpc_receive_end, | |
108 | rxrpc_receive_front, | |
109 | rxrpc_receive_incoming, | |
110 | rxrpc_receive_queue, | |
111 | rxrpc_receive_queue_last, | |
112 | rxrpc_receive_rotate, | |
113 | }; | |
114 | ||
115 | enum rxrpc_recvmsg_trace { | |
116 | rxrpc_recvmsg_cont, | |
117 | rxrpc_recvmsg_data_return, | |
118 | rxrpc_recvmsg_dequeue, | |
119 | rxrpc_recvmsg_enter, | |
120 | rxrpc_recvmsg_full, | |
121 | rxrpc_recvmsg_hole, | |
122 | rxrpc_recvmsg_next, | |
540b1c48 | 123 | rxrpc_recvmsg_requeue, |
b54a134a DH |
124 | rxrpc_recvmsg_return, |
125 | rxrpc_recvmsg_terminal, | |
126 | rxrpc_recvmsg_to_be_accepted, | |
127 | rxrpc_recvmsg_wait, | |
128 | }; | |
129 | ||
130 | enum rxrpc_rtt_tx_trace { | |
131 | rxrpc_rtt_tx_data, | |
132 | rxrpc_rtt_tx_ping, | |
133 | }; | |
134 | ||
135 | enum rxrpc_rtt_rx_trace { | |
136 | rxrpc_rtt_rx_ping_response, | |
137 | rxrpc_rtt_rx_requested_ack, | |
138 | }; | |
139 | ||
140 | enum rxrpc_timer_trace { | |
141 | rxrpc_timer_begin, | |
a158bdd3 DH |
142 | rxrpc_timer_exp_ack, |
143 | rxrpc_timer_exp_hard, | |
144 | rxrpc_timer_exp_idle, | |
415f44e4 | 145 | rxrpc_timer_exp_keepalive, |
bd1fdf8c | 146 | rxrpc_timer_exp_lost_ack, |
a158bdd3 DH |
147 | rxrpc_timer_exp_normal, |
148 | rxrpc_timer_exp_ping, | |
149 | rxrpc_timer_exp_resend, | |
b54a134a DH |
150 | rxrpc_timer_expired, |
151 | rxrpc_timer_init_for_reply, | |
152 | rxrpc_timer_init_for_send_reply, | |
a158bdd3 | 153 | rxrpc_timer_restart, |
b54a134a | 154 | rxrpc_timer_set_for_ack, |
a158bdd3 DH |
155 | rxrpc_timer_set_for_hard, |
156 | rxrpc_timer_set_for_idle, | |
415f44e4 | 157 | rxrpc_timer_set_for_keepalive, |
bd1fdf8c | 158 | rxrpc_timer_set_for_lost_ack, |
a158bdd3 | 159 | rxrpc_timer_set_for_normal, |
b54a134a DH |
160 | rxrpc_timer_set_for_ping, |
161 | rxrpc_timer_set_for_resend, | |
162 | rxrpc_timer_set_for_send, | |
163 | }; | |
164 | ||
165 | enum rxrpc_propose_ack_trace { | |
166 | rxrpc_propose_ack_client_tx_end, | |
167 | rxrpc_propose_ack_input_data, | |
415f44e4 | 168 | rxrpc_propose_ack_ping_for_keepalive, |
b54a134a DH |
169 | rxrpc_propose_ack_ping_for_lost_ack, |
170 | rxrpc_propose_ack_ping_for_lost_reply, | |
171 | rxrpc_propose_ack_ping_for_params, | |
172 | rxrpc_propose_ack_processing_op, | |
173 | rxrpc_propose_ack_respond_to_ack, | |
174 | rxrpc_propose_ack_respond_to_ping, | |
175 | rxrpc_propose_ack_retry_tx, | |
176 | rxrpc_propose_ack_rotate_rx, | |
177 | rxrpc_propose_ack_terminal_ack, | |
178 | }; | |
179 | ||
180 | enum rxrpc_propose_ack_outcome { | |
181 | rxrpc_propose_ack_subsume, | |
182 | rxrpc_propose_ack_update, | |
183 | rxrpc_propose_ack_use, | |
184 | }; | |
185 | ||
186 | enum rxrpc_congest_change { | |
187 | rxrpc_cong_begin_retransmission, | |
188 | rxrpc_cong_cleared_nacks, | |
189 | rxrpc_cong_new_low_nack, | |
190 | rxrpc_cong_no_change, | |
191 | rxrpc_cong_progress, | |
192 | rxrpc_cong_retransmit_again, | |
193 | rxrpc_cong_rtt_window_end, | |
194 | rxrpc_cong_saw_nack, | |
195 | }; | |
196 | ||
197 | #endif /* end __RXRPC_DECLARE_TRACE_ENUMS_ONCE_ONLY */ | |
198 | ||
199 | /* | |
200 | * Declare tracing information enums and their string mappings for display. | |
201 | */ | |
202 | #define rxrpc_skb_traces \ | |
203 | EM(rxrpc_skb_rx_cleaned, "Rx CLN") \ | |
204 | EM(rxrpc_skb_rx_freed, "Rx FRE") \ | |
205 | EM(rxrpc_skb_rx_got, "Rx GOT") \ | |
206 | EM(rxrpc_skb_rx_lost, "Rx *L*") \ | |
207 | EM(rxrpc_skb_rx_purged, "Rx PUR") \ | |
208 | EM(rxrpc_skb_rx_received, "Rx RCV") \ | |
209 | EM(rxrpc_skb_rx_rotated, "Rx ROT") \ | |
210 | EM(rxrpc_skb_rx_seen, "Rx SEE") \ | |
211 | EM(rxrpc_skb_tx_cleaned, "Tx CLN") \ | |
212 | EM(rxrpc_skb_tx_freed, "Tx FRE") \ | |
213 | EM(rxrpc_skb_tx_got, "Tx GOT") \ | |
214 | EM(rxrpc_skb_tx_new, "Tx NEW") \ | |
215 | EM(rxrpc_skb_tx_rotated, "Tx ROT") \ | |
216 | E_(rxrpc_skb_tx_seen, "Tx SEE") | |
217 | ||
218 | #define rxrpc_conn_traces \ | |
219 | EM(rxrpc_conn_got, "GOT") \ | |
220 | EM(rxrpc_conn_new_client, "NWc") \ | |
221 | EM(rxrpc_conn_new_service, "NWs") \ | |
222 | EM(rxrpc_conn_put_client, "PTc") \ | |
223 | EM(rxrpc_conn_put_service, "PTs") \ | |
224 | EM(rxrpc_conn_queued, "QUE") \ | |
f859ab61 | 225 | EM(rxrpc_conn_reap_service, "RPs") \ |
b54a134a DH |
226 | E_(rxrpc_conn_seen, "SEE") |
227 | ||
228 | #define rxrpc_client_traces \ | |
229 | EM(rxrpc_client_activate_chans, "Activa") \ | |
230 | EM(rxrpc_client_alloc, "Alloc ") \ | |
231 | EM(rxrpc_client_chan_activate, "ChActv") \ | |
232 | EM(rxrpc_client_chan_disconnect, "ChDisc") \ | |
233 | EM(rxrpc_client_chan_pass, "ChPass") \ | |
234 | EM(rxrpc_client_chan_unstarted, "ChUnst") \ | |
235 | EM(rxrpc_client_cleanup, "Clean ") \ | |
236 | EM(rxrpc_client_count, "Count ") \ | |
237 | EM(rxrpc_client_discard, "Discar") \ | |
238 | EM(rxrpc_client_duplicate, "Duplic") \ | |
239 | EM(rxrpc_client_exposed, "Expose") \ | |
240 | EM(rxrpc_client_replace, "Replac") \ | |
241 | EM(rxrpc_client_to_active, "->Actv") \ | |
242 | EM(rxrpc_client_to_culled, "->Cull") \ | |
243 | EM(rxrpc_client_to_idle, "->Idle") \ | |
244 | EM(rxrpc_client_to_inactive, "->Inac") \ | |
245 | EM(rxrpc_client_to_upgrade, "->Upgd") \ | |
246 | EM(rxrpc_client_to_waiting, "->Wait") \ | |
247 | E_(rxrpc_client_uncount, "Uncoun") | |
248 | ||
249 | #define rxrpc_conn_cache_states \ | |
250 | EM(RXRPC_CONN_CLIENT_INACTIVE, "Inac") \ | |
251 | EM(RXRPC_CONN_CLIENT_WAITING, "Wait") \ | |
252 | EM(RXRPC_CONN_CLIENT_ACTIVE, "Actv") \ | |
4e255721 | 253 | EM(RXRPC_CONN_CLIENT_UPGRADE, "Upgd") \ |
b54a134a DH |
254 | EM(RXRPC_CONN_CLIENT_CULLED, "Cull") \ |
255 | E_(RXRPC_CONN_CLIENT_IDLE, "Idle") \ | |
256 | ||
257 | #define rxrpc_call_traces \ | |
258 | EM(rxrpc_call_connected, "CON") \ | |
259 | EM(rxrpc_call_error, "*E*") \ | |
260 | EM(rxrpc_call_got, "GOT") \ | |
261 | EM(rxrpc_call_got_kernel, "Gke") \ | |
262 | EM(rxrpc_call_got_userid, "Gus") \ | |
263 | EM(rxrpc_call_new_client, "NWc") \ | |
264 | EM(rxrpc_call_new_service, "NWs") \ | |
265 | EM(rxrpc_call_put, "PUT") \ | |
266 | EM(rxrpc_call_put_kernel, "Pke") \ | |
267 | EM(rxrpc_call_put_noqueue, "PNQ") \ | |
268 | EM(rxrpc_call_put_userid, "Pus") \ | |
269 | EM(rxrpc_call_queued, "QUE") \ | |
270 | EM(rxrpc_call_queued_ref, "QUR") \ | |
271 | EM(rxrpc_call_release, "RLS") \ | |
272 | E_(rxrpc_call_seen, "SEE") | |
273 | ||
274 | #define rxrpc_transmit_traces \ | |
275 | EM(rxrpc_transmit_await_reply, "AWR") \ | |
276 | EM(rxrpc_transmit_end, "END") \ | |
277 | EM(rxrpc_transmit_queue, "QUE") \ | |
278 | EM(rxrpc_transmit_queue_last, "QLS") \ | |
279 | EM(rxrpc_transmit_rotate, "ROT") \ | |
280 | EM(rxrpc_transmit_rotate_last, "RLS") \ | |
281 | E_(rxrpc_transmit_wait, "WAI") | |
282 | ||
283 | #define rxrpc_receive_traces \ | |
284 | EM(rxrpc_receive_end, "END") \ | |
285 | EM(rxrpc_receive_front, "FRN") \ | |
286 | EM(rxrpc_receive_incoming, "INC") \ | |
287 | EM(rxrpc_receive_queue, "QUE") \ | |
288 | EM(rxrpc_receive_queue_last, "QLS") \ | |
289 | E_(rxrpc_receive_rotate, "ROT") | |
290 | ||
291 | #define rxrpc_recvmsg_traces \ | |
292 | EM(rxrpc_recvmsg_cont, "CONT") \ | |
293 | EM(rxrpc_recvmsg_data_return, "DATA") \ | |
294 | EM(rxrpc_recvmsg_dequeue, "DEQU") \ | |
295 | EM(rxrpc_recvmsg_enter, "ENTR") \ | |
296 | EM(rxrpc_recvmsg_full, "FULL") \ | |
297 | EM(rxrpc_recvmsg_hole, "HOLE") \ | |
298 | EM(rxrpc_recvmsg_next, "NEXT") \ | |
540b1c48 | 299 | EM(rxrpc_recvmsg_requeue, "REQU") \ |
b54a134a DH |
300 | EM(rxrpc_recvmsg_return, "RETN") \ |
301 | EM(rxrpc_recvmsg_terminal, "TERM") \ | |
302 | EM(rxrpc_recvmsg_to_be_accepted, "TBAC") \ | |
303 | E_(rxrpc_recvmsg_wait, "WAIT") | |
304 | ||
305 | #define rxrpc_rtt_tx_traces \ | |
306 | EM(rxrpc_rtt_tx_data, "DATA") \ | |
307 | E_(rxrpc_rtt_tx_ping, "PING") | |
308 | ||
309 | #define rxrpc_rtt_rx_traces \ | |
310 | EM(rxrpc_rtt_rx_ping_response, "PONG") \ | |
311 | E_(rxrpc_rtt_rx_requested_ack, "RACK") | |
312 | ||
313 | #define rxrpc_timer_traces \ | |
314 | EM(rxrpc_timer_begin, "Begin ") \ | |
315 | EM(rxrpc_timer_expired, "*EXPR*") \ | |
a158bdd3 DH |
316 | EM(rxrpc_timer_exp_ack, "ExpAck") \ |
317 | EM(rxrpc_timer_exp_hard, "ExpHrd") \ | |
318 | EM(rxrpc_timer_exp_idle, "ExpIdl") \ | |
415f44e4 | 319 | EM(rxrpc_timer_exp_keepalive, "ExpKA ") \ |
bd1fdf8c | 320 | EM(rxrpc_timer_exp_lost_ack, "ExpLoA") \ |
a158bdd3 DH |
321 | EM(rxrpc_timer_exp_normal, "ExpNml") \ |
322 | EM(rxrpc_timer_exp_ping, "ExpPng") \ | |
323 | EM(rxrpc_timer_exp_resend, "ExpRsn") \ | |
b54a134a DH |
324 | EM(rxrpc_timer_init_for_reply, "IniRpl") \ |
325 | EM(rxrpc_timer_init_for_send_reply, "SndRpl") \ | |
a158bdd3 | 326 | EM(rxrpc_timer_restart, "Restrt") \ |
b54a134a | 327 | EM(rxrpc_timer_set_for_ack, "SetAck") \ |
a158bdd3 DH |
328 | EM(rxrpc_timer_set_for_hard, "SetHrd") \ |
329 | EM(rxrpc_timer_set_for_idle, "SetIdl") \ | |
415f44e4 | 330 | EM(rxrpc_timer_set_for_keepalive, "KeepAl") \ |
bd1fdf8c | 331 | EM(rxrpc_timer_set_for_lost_ack, "SetLoA") \ |
a158bdd3 | 332 | EM(rxrpc_timer_set_for_normal, "SetNml") \ |
b54a134a DH |
333 | EM(rxrpc_timer_set_for_ping, "SetPng") \ |
334 | EM(rxrpc_timer_set_for_resend, "SetRTx") \ | |
a158bdd3 | 335 | E_(rxrpc_timer_set_for_send, "SetSnd") |
b54a134a DH |
336 | |
337 | #define rxrpc_propose_ack_traces \ | |
338 | EM(rxrpc_propose_ack_client_tx_end, "ClTxEnd") \ | |
339 | EM(rxrpc_propose_ack_input_data, "DataIn ") \ | |
415f44e4 | 340 | EM(rxrpc_propose_ack_ping_for_keepalive, "KeepAlv") \ |
b54a134a DH |
341 | EM(rxrpc_propose_ack_ping_for_lost_ack, "LostAck") \ |
342 | EM(rxrpc_propose_ack_ping_for_lost_reply, "LostRpl") \ | |
343 | EM(rxrpc_propose_ack_ping_for_params, "Params ") \ | |
344 | EM(rxrpc_propose_ack_processing_op, "ProcOp ") \ | |
345 | EM(rxrpc_propose_ack_respond_to_ack, "Rsp2Ack") \ | |
346 | EM(rxrpc_propose_ack_respond_to_ping, "Rsp2Png") \ | |
347 | EM(rxrpc_propose_ack_retry_tx, "RetryTx") \ | |
348 | EM(rxrpc_propose_ack_rotate_rx, "RxAck ") \ | |
349 | E_(rxrpc_propose_ack_terminal_ack, "ClTerm ") | |
350 | ||
351 | #define rxrpc_propose_ack_outcomes \ | |
352 | EM(rxrpc_propose_ack_subsume, " Subsume") \ | |
353 | EM(rxrpc_propose_ack_update, " Update") \ | |
354 | E_(rxrpc_propose_ack_use, "") | |
355 | ||
356 | #define rxrpc_congest_modes \ | |
357 | EM(RXRPC_CALL_CONGEST_AVOIDANCE, "CongAvoid") \ | |
358 | EM(RXRPC_CALL_FAST_RETRANSMIT, "FastReTx ") \ | |
359 | EM(RXRPC_CALL_PACKET_LOSS, "PktLoss ") \ | |
360 | E_(RXRPC_CALL_SLOW_START, "SlowStart") | |
361 | ||
362 | #define rxrpc_congest_changes \ | |
363 | EM(rxrpc_cong_begin_retransmission, " Retrans") \ | |
364 | EM(rxrpc_cong_cleared_nacks, " Cleared") \ | |
365 | EM(rxrpc_cong_new_low_nack, " NewLowN") \ | |
366 | EM(rxrpc_cong_no_change, "") \ | |
367 | EM(rxrpc_cong_progress, " Progres") \ | |
368 | EM(rxrpc_cong_retransmit_again, " ReTxAgn") \ | |
369 | EM(rxrpc_cong_rtt_window_end, " RttWinE") \ | |
370 | E_(rxrpc_cong_saw_nack, " SawNack") | |
371 | ||
372 | #define rxrpc_pkts \ | |
373 | EM(0, "?00") \ | |
374 | EM(RXRPC_PACKET_TYPE_DATA, "DATA") \ | |
375 | EM(RXRPC_PACKET_TYPE_ACK, "ACK") \ | |
376 | EM(RXRPC_PACKET_TYPE_BUSY, "BUSY") \ | |
377 | EM(RXRPC_PACKET_TYPE_ABORT, "ABORT") \ | |
378 | EM(RXRPC_PACKET_TYPE_ACKALL, "ACKALL") \ | |
379 | EM(RXRPC_PACKET_TYPE_CHALLENGE, "CHALL") \ | |
380 | EM(RXRPC_PACKET_TYPE_RESPONSE, "RESP") \ | |
381 | EM(RXRPC_PACKET_TYPE_DEBUG, "DEBUG") \ | |
382 | EM(9, "?09") \ | |
383 | EM(10, "?10") \ | |
384 | EM(11, "?11") \ | |
385 | EM(12, "?12") \ | |
386 | EM(RXRPC_PACKET_TYPE_VERSION, "VERSION") \ | |
387 | EM(14, "?14") \ | |
388 | E_(15, "?15") | |
389 | ||
390 | #define rxrpc_ack_names \ | |
391 | EM(0, "-0-") \ | |
392 | EM(RXRPC_ACK_REQUESTED, "REQ") \ | |
393 | EM(RXRPC_ACK_DUPLICATE, "DUP") \ | |
394 | EM(RXRPC_ACK_OUT_OF_SEQUENCE, "OOS") \ | |
395 | EM(RXRPC_ACK_EXCEEDS_WINDOW, "WIN") \ | |
396 | EM(RXRPC_ACK_NOSPACE, "MEM") \ | |
397 | EM(RXRPC_ACK_PING, "PNG") \ | |
398 | EM(RXRPC_ACK_PING_RESPONSE, "PNR") \ | |
399 | EM(RXRPC_ACK_DELAY, "DLY") \ | |
400 | EM(RXRPC_ACK_IDLE, "IDL") \ | |
401 | E_(RXRPC_ACK__INVALID, "-?-") | |
402 | ||
1bae5d22 DH |
403 | #define rxrpc_completions \ |
404 | EM(RXRPC_CALL_SUCCEEDED, "Succeeded") \ | |
405 | EM(RXRPC_CALL_REMOTELY_ABORTED, "RemoteAbort") \ | |
406 | EM(RXRPC_CALL_LOCALLY_ABORTED, "LocalAbort") \ | |
407 | EM(RXRPC_CALL_LOCAL_ERROR, "LocalError") \ | |
408 | E_(RXRPC_CALL_NETWORK_ERROR, "NetError") | |
409 | ||
b54a134a DH |
410 | /* |
411 | * Export enum symbols via userspace. | |
412 | */ | |
413 | #undef EM | |
414 | #undef E_ | |
415 | #define EM(a, b) TRACE_DEFINE_ENUM(a); | |
416 | #define E_(a, b) TRACE_DEFINE_ENUM(a); | |
417 | ||
418 | rxrpc_skb_traces; | |
419 | rxrpc_conn_traces; | |
420 | rxrpc_client_traces; | |
421 | rxrpc_call_traces; | |
422 | rxrpc_transmit_traces; | |
423 | rxrpc_receive_traces; | |
424 | rxrpc_recvmsg_traces; | |
425 | rxrpc_rtt_tx_traces; | |
426 | rxrpc_rtt_rx_traces; | |
427 | rxrpc_timer_traces; | |
428 | rxrpc_propose_ack_traces; | |
429 | rxrpc_propose_ack_outcomes; | |
827efed6 | 430 | rxrpc_congest_modes; |
b54a134a DH |
431 | rxrpc_congest_changes; |
432 | ||
433 | /* | |
434 | * Now redefine the EM() and E_() macros to map the enums to the strings that | |
435 | * will be printed in the output. | |
436 | */ | |
437 | #undef EM | |
438 | #undef E_ | |
439 | #define EM(a, b) { a, b }, | |
440 | #define E_(a, b) { a, b } | |
441 | ||
363deeab DH |
442 | TRACE_EVENT(rxrpc_conn, |
443 | TP_PROTO(struct rxrpc_connection *conn, enum rxrpc_conn_trace op, | |
444 | int usage, const void *where), | |
445 | ||
446 | TP_ARGS(conn, op, usage, where), | |
447 | ||
448 | TP_STRUCT__entry( | |
a25e21f0 DH |
449 | __field(unsigned int, conn ) |
450 | __field(int, op ) | |
451 | __field(int, usage ) | |
452 | __field(const void *, where ) | |
363deeab DH |
453 | ), |
454 | ||
455 | TP_fast_assign( | |
a25e21f0 | 456 | __entry->conn = conn->debug_id; |
363deeab DH |
457 | __entry->op = op; |
458 | __entry->usage = usage; | |
459 | __entry->where = where; | |
460 | ), | |
461 | ||
a25e21f0 | 462 | TP_printk("C=%08x %s u=%d sp=%pSR", |
363deeab | 463 | __entry->conn, |
b54a134a | 464 | __print_symbolic(__entry->op, rxrpc_conn_traces), |
363deeab DH |
465 | __entry->usage, |
466 | __entry->where) | |
467 | ); | |
468 | ||
469 | TRACE_EVENT(rxrpc_client, | |
470 | TP_PROTO(struct rxrpc_connection *conn, int channel, | |
471 | enum rxrpc_client_trace op), | |
472 | ||
473 | TP_ARGS(conn, channel, op), | |
474 | ||
475 | TP_STRUCT__entry( | |
a25e21f0 | 476 | __field(unsigned int, conn ) |
363deeab DH |
477 | __field(u32, cid ) |
478 | __field(int, channel ) | |
479 | __field(int, usage ) | |
480 | __field(enum rxrpc_client_trace, op ) | |
481 | __field(enum rxrpc_conn_cache_state, cs ) | |
482 | ), | |
483 | ||
484 | TP_fast_assign( | |
a25e21f0 | 485 | __entry->conn = conn->debug_id; |
363deeab DH |
486 | __entry->channel = channel; |
487 | __entry->usage = atomic_read(&conn->usage); | |
488 | __entry->op = op; | |
489 | __entry->cid = conn->proto.cid; | |
490 | __entry->cs = conn->cache_state; | |
491 | ), | |
492 | ||
a25e21f0 | 493 | TP_printk("C=%08x h=%2d %s %s i=%08x u=%d", |
363deeab DH |
494 | __entry->conn, |
495 | __entry->channel, | |
b54a134a DH |
496 | __print_symbolic(__entry->op, rxrpc_client_traces), |
497 | __print_symbolic(__entry->cs, rxrpc_conn_cache_states), | |
363deeab DH |
498 | __entry->cid, |
499 | __entry->usage) | |
500 | ); | |
501 | ||
e34d4234 | 502 | TRACE_EVENT(rxrpc_call, |
fff72429 | 503 | TP_PROTO(struct rxrpc_call *call, enum rxrpc_call_trace op, |
2ab27215 | 504 | int usage, const void *where, const void *aux), |
e34d4234 | 505 | |
2ab27215 | 506 | TP_ARGS(call, op, usage, where, aux), |
e34d4234 DH |
507 | |
508 | TP_STRUCT__entry( | |
a25e21f0 | 509 | __field(unsigned int, call ) |
e34d4234 DH |
510 | __field(int, op ) |
511 | __field(int, usage ) | |
e34d4234 DH |
512 | __field(const void *, where ) |
513 | __field(const void *, aux ) | |
514 | ), | |
515 | ||
516 | TP_fast_assign( | |
a25e21f0 | 517 | __entry->call = call->debug_id; |
e34d4234 DH |
518 | __entry->op = op; |
519 | __entry->usage = usage; | |
e34d4234 DH |
520 | __entry->where = where; |
521 | __entry->aux = aux; | |
522 | ), | |
523 | ||
a25e21f0 | 524 | TP_printk("c=%08x %s u=%d sp=%pSR a=%p", |
e34d4234 | 525 | __entry->call, |
b54a134a | 526 | __print_symbolic(__entry->op, rxrpc_call_traces), |
e34d4234 | 527 | __entry->usage, |
e34d4234 DH |
528 | __entry->where, |
529 | __entry->aux) | |
530 | ); | |
531 | ||
df844fd4 | 532 | TRACE_EVENT(rxrpc_skb, |
71f3ca40 DH |
533 | TP_PROTO(struct sk_buff *skb, enum rxrpc_skb_trace op, |
534 | int usage, int mod_count, const void *where), | |
df844fd4 DH |
535 | |
536 | TP_ARGS(skb, op, usage, mod_count, where), | |
537 | ||
538 | TP_STRUCT__entry( | |
539 | __field(struct sk_buff *, skb ) | |
71f3ca40 | 540 | __field(enum rxrpc_skb_trace, op ) |
df844fd4 DH |
541 | __field(int, usage ) |
542 | __field(int, mod_count ) | |
543 | __field(const void *, where ) | |
544 | ), | |
545 | ||
546 | TP_fast_assign( | |
547 | __entry->skb = skb; | |
548 | __entry->op = op; | |
549 | __entry->usage = usage; | |
550 | __entry->mod_count = mod_count; | |
551 | __entry->where = where; | |
552 | ), | |
553 | ||
554 | TP_printk("s=%p %s u=%d m=%d p=%pSR", | |
555 | __entry->skb, | |
b54a134a | 556 | __print_symbolic(__entry->op, rxrpc_skb_traces), |
df844fd4 DH |
557 | __entry->usage, |
558 | __entry->mod_count, | |
559 | __entry->where) | |
560 | ); | |
561 | ||
49e19ec7 DH |
562 | TRACE_EVENT(rxrpc_rx_packet, |
563 | TP_PROTO(struct rxrpc_skb_priv *sp), | |
564 | ||
565 | TP_ARGS(sp), | |
566 | ||
567 | TP_STRUCT__entry( | |
568 | __field_struct(struct rxrpc_host_header, hdr ) | |
569 | ), | |
570 | ||
571 | TP_fast_assign( | |
572 | memcpy(&__entry->hdr, &sp->hdr, sizeof(__entry->hdr)); | |
573 | ), | |
574 | ||
a3868bfc | 575 | TP_printk("%08x:%08x:%08x:%04x %08x %08x %02x %02x %s", |
49e19ec7 DH |
576 | __entry->hdr.epoch, __entry->hdr.cid, |
577 | __entry->hdr.callNumber, __entry->hdr.serviceId, | |
578 | __entry->hdr.serial, __entry->hdr.seq, | |
a3868bfc | 579 | __entry->hdr.type, __entry->hdr.flags, |
b54a134a DH |
580 | __entry->hdr.type <= 15 ? |
581 | __print_symbolic(__entry->hdr.type, rxrpc_pkts) : "?UNK") | |
49e19ec7 DH |
582 | ); |
583 | ||
584 | TRACE_EVENT(rxrpc_rx_done, | |
585 | TP_PROTO(int result, int abort_code), | |
586 | ||
587 | TP_ARGS(result, abort_code), | |
588 | ||
589 | TP_STRUCT__entry( | |
590 | __field(int, result ) | |
591 | __field(int, abort_code ) | |
592 | ), | |
593 | ||
594 | TP_fast_assign( | |
595 | __entry->result = result; | |
596 | __entry->abort_code = abort_code; | |
597 | ), | |
598 | ||
599 | TP_printk("r=%d a=%d", __entry->result, __entry->abort_code) | |
600 | ); | |
601 | ||
5a42976d | 602 | TRACE_EVENT(rxrpc_abort, |
a25e21f0 DH |
603 | TP_PROTO(unsigned int call_nr, const char *why, u32 cid, u32 call_id, |
604 | rxrpc_seq_t seq, int abort_code, int error), | |
5a42976d | 605 | |
a25e21f0 | 606 | TP_ARGS(call_nr, why, cid, call_id, seq, abort_code, error), |
5a42976d DH |
607 | |
608 | TP_STRUCT__entry( | |
a25e21f0 | 609 | __field(unsigned int, call_nr ) |
5a42976d DH |
610 | __array(char, why, 4 ) |
611 | __field(u32, cid ) | |
612 | __field(u32, call_id ) | |
613 | __field(rxrpc_seq_t, seq ) | |
614 | __field(int, abort_code ) | |
615 | __field(int, error ) | |
616 | ), | |
617 | ||
618 | TP_fast_assign( | |
619 | memcpy(__entry->why, why, 4); | |
a25e21f0 | 620 | __entry->call_nr = call_nr; |
5a42976d DH |
621 | __entry->cid = cid; |
622 | __entry->call_id = call_id; | |
623 | __entry->abort_code = abort_code; | |
624 | __entry->error = error; | |
625 | __entry->seq = seq; | |
626 | ), | |
627 | ||
a25e21f0 DH |
628 | TP_printk("c=%08x %08x:%08x s=%u a=%d e=%d %s", |
629 | __entry->call_nr, | |
5a42976d DH |
630 | __entry->cid, __entry->call_id, __entry->seq, |
631 | __entry->abort_code, __entry->error, __entry->why) | |
632 | ); | |
633 | ||
1bae5d22 DH |
634 | TRACE_EVENT(rxrpc_call_complete, |
635 | TP_PROTO(struct rxrpc_call *call), | |
636 | ||
637 | TP_ARGS(call), | |
638 | ||
639 | TP_STRUCT__entry( | |
640 | __field(unsigned int, call ) | |
641 | __field(enum rxrpc_call_completion, compl ) | |
642 | __field(int, error ) | |
643 | __field(u32, abort_code ) | |
644 | ), | |
645 | ||
646 | TP_fast_assign( | |
647 | __entry->call = call->debug_id; | |
648 | __entry->compl = call->completion; | |
649 | __entry->error = call->error; | |
650 | __entry->abort_code = call->abort_code; | |
651 | ), | |
652 | ||
653 | TP_printk("c=%08x %s r=%d ac=%d", | |
654 | __entry->call, | |
655 | __print_symbolic(__entry->compl, rxrpc_completions), | |
656 | __entry->error, | |
657 | __entry->abort_code) | |
658 | ); | |
659 | ||
a124fe3e DH |
660 | TRACE_EVENT(rxrpc_transmit, |
661 | TP_PROTO(struct rxrpc_call *call, enum rxrpc_transmit_trace why), | |
662 | ||
663 | TP_ARGS(call, why), | |
664 | ||
665 | TP_STRUCT__entry( | |
a25e21f0 | 666 | __field(unsigned int, call ) |
a124fe3e DH |
667 | __field(enum rxrpc_transmit_trace, why ) |
668 | __field(rxrpc_seq_t, tx_hard_ack ) | |
669 | __field(rxrpc_seq_t, tx_top ) | |
b1d9f7fd | 670 | __field(int, tx_winsize ) |
a124fe3e DH |
671 | ), |
672 | ||
673 | TP_fast_assign( | |
a25e21f0 | 674 | __entry->call = call->debug_id; |
a124fe3e DH |
675 | __entry->why = why; |
676 | __entry->tx_hard_ack = call->tx_hard_ack; | |
677 | __entry->tx_top = call->tx_top; | |
b1d9f7fd | 678 | __entry->tx_winsize = call->tx_winsize; |
a124fe3e DH |
679 | ), |
680 | ||
a25e21f0 | 681 | TP_printk("c=%08x %s f=%08x n=%u/%u", |
a124fe3e | 682 | __entry->call, |
b54a134a | 683 | __print_symbolic(__entry->why, rxrpc_transmit_traces), |
a124fe3e | 684 | __entry->tx_hard_ack + 1, |
b1d9f7fd DH |
685 | __entry->tx_top - __entry->tx_hard_ack, |
686 | __entry->tx_winsize) | |
687 | ); | |
688 | ||
689 | TRACE_EVENT(rxrpc_rx_data, | |
690 | TP_PROTO(struct rxrpc_call *call, rxrpc_seq_t seq, | |
691 | rxrpc_serial_t serial, u8 flags, u8 anno), | |
692 | ||
693 | TP_ARGS(call, seq, serial, flags, anno), | |
694 | ||
695 | TP_STRUCT__entry( | |
a25e21f0 | 696 | __field(unsigned int, call ) |
b1d9f7fd DH |
697 | __field(rxrpc_seq_t, seq ) |
698 | __field(rxrpc_serial_t, serial ) | |
699 | __field(u8, flags ) | |
700 | __field(u8, anno ) | |
701 | ), | |
702 | ||
703 | TP_fast_assign( | |
a25e21f0 | 704 | __entry->call = call->debug_id; |
b1d9f7fd DH |
705 | __entry->seq = seq; |
706 | __entry->serial = serial; | |
707 | __entry->flags = flags; | |
708 | __entry->anno = anno; | |
709 | ), | |
710 | ||
a25e21f0 | 711 | TP_printk("c=%08x DATA %08x q=%08x fl=%02x a=%02x", |
b1d9f7fd DH |
712 | __entry->call, |
713 | __entry->serial, | |
714 | __entry->seq, | |
715 | __entry->flags, | |
716 | __entry->anno) | |
a124fe3e DH |
717 | ); |
718 | ||
ec71eb9a | 719 | TRACE_EVENT(rxrpc_rx_ack, |
b1d9f7fd DH |
720 | TP_PROTO(struct rxrpc_call *call, |
721 | rxrpc_serial_t serial, rxrpc_serial_t ack_serial, | |
722 | rxrpc_seq_t first, rxrpc_seq_t prev, u8 reason, u8 n_acks), | |
ec71eb9a | 723 | |
b1d9f7fd | 724 | TP_ARGS(call, serial, ack_serial, first, prev, reason, n_acks), |
ec71eb9a DH |
725 | |
726 | TP_STRUCT__entry( | |
a25e21f0 | 727 | __field(unsigned int, call ) |
b1d9f7fd DH |
728 | __field(rxrpc_serial_t, serial ) |
729 | __field(rxrpc_serial_t, ack_serial ) | |
ec71eb9a | 730 | __field(rxrpc_seq_t, first ) |
b1d9f7fd | 731 | __field(rxrpc_seq_t, prev ) |
ec71eb9a DH |
732 | __field(u8, reason ) |
733 | __field(u8, n_acks ) | |
734 | ), | |
735 | ||
736 | TP_fast_assign( | |
a25e21f0 | 737 | __entry->call = call->debug_id; |
b1d9f7fd DH |
738 | __entry->serial = serial; |
739 | __entry->ack_serial = ack_serial; | |
ec71eb9a | 740 | __entry->first = first; |
b1d9f7fd | 741 | __entry->prev = prev; |
ec71eb9a DH |
742 | __entry->reason = reason; |
743 | __entry->n_acks = n_acks; | |
744 | ), | |
745 | ||
a25e21f0 | 746 | TP_printk("c=%08x %08x %s r=%08x f=%08x p=%08x n=%u", |
ec71eb9a | 747 | __entry->call, |
b1d9f7fd | 748 | __entry->serial, |
b54a134a | 749 | __print_symbolic(__entry->reason, rxrpc_ack_names), |
b1d9f7fd | 750 | __entry->ack_serial, |
ec71eb9a | 751 | __entry->first, |
b1d9f7fd | 752 | __entry->prev, |
ec71eb9a DH |
753 | __entry->n_acks) |
754 | ); | |
755 | ||
005ede28 DH |
756 | TRACE_EVENT(rxrpc_rx_abort, |
757 | TP_PROTO(struct rxrpc_call *call, rxrpc_serial_t serial, | |
758 | u32 abort_code), | |
759 | ||
760 | TP_ARGS(call, serial, abort_code), | |
761 | ||
762 | TP_STRUCT__entry( | |
a25e21f0 | 763 | __field(unsigned int, call ) |
005ede28 DH |
764 | __field(rxrpc_serial_t, serial ) |
765 | __field(u32, abort_code ) | |
766 | ), | |
767 | ||
768 | TP_fast_assign( | |
a25e21f0 | 769 | __entry->call = call->debug_id; |
005ede28 DH |
770 | __entry->serial = serial; |
771 | __entry->abort_code = abort_code; | |
772 | ), | |
773 | ||
a25e21f0 | 774 | TP_printk("c=%08x ABORT %08x ac=%d", |
005ede28 DH |
775 | __entry->call, |
776 | __entry->serial, | |
777 | __entry->abort_code) | |
778 | ); | |
779 | ||
740586d2 DH |
780 | TRACE_EVENT(rxrpc_rx_rwind_change, |
781 | TP_PROTO(struct rxrpc_call *call, rxrpc_serial_t serial, | |
782 | u32 rwind, bool wake), | |
783 | ||
784 | TP_ARGS(call, serial, rwind, wake), | |
785 | ||
786 | TP_STRUCT__entry( | |
a25e21f0 | 787 | __field(unsigned int, call ) |
740586d2 DH |
788 | __field(rxrpc_serial_t, serial ) |
789 | __field(u32, rwind ) | |
790 | __field(bool, wake ) | |
791 | ), | |
792 | ||
793 | TP_fast_assign( | |
a25e21f0 | 794 | __entry->call = call->debug_id; |
740586d2 DH |
795 | __entry->serial = serial; |
796 | __entry->rwind = rwind; | |
797 | __entry->wake = wake; | |
798 | ), | |
799 | ||
a25e21f0 | 800 | TP_printk("c=%08x %08x rw=%u%s", |
740586d2 DH |
801 | __entry->call, |
802 | __entry->serial, | |
803 | __entry->rwind, | |
804 | __entry->wake ? " wake" : "") | |
805 | ); | |
806 | ||
be832aec DH |
807 | TRACE_EVENT(rxrpc_tx_data, |
808 | TP_PROTO(struct rxrpc_call *call, rxrpc_seq_t seq, | |
a1767077 | 809 | rxrpc_serial_t serial, u8 flags, bool retrans, bool lose), |
be832aec | 810 | |
a1767077 | 811 | TP_ARGS(call, seq, serial, flags, retrans, lose), |
be832aec DH |
812 | |
813 | TP_STRUCT__entry( | |
a25e21f0 | 814 | __field(unsigned int, call ) |
be832aec DH |
815 | __field(rxrpc_seq_t, seq ) |
816 | __field(rxrpc_serial_t, serial ) | |
817 | __field(u8, flags ) | |
a1767077 | 818 | __field(bool, retrans ) |
be832aec DH |
819 | __field(bool, lose ) |
820 | ), | |
821 | ||
822 | TP_fast_assign( | |
a25e21f0 | 823 | __entry->call = call->debug_id; |
be832aec DH |
824 | __entry->seq = seq; |
825 | __entry->serial = serial; | |
826 | __entry->flags = flags; | |
a1767077 | 827 | __entry->retrans = retrans; |
be832aec DH |
828 | __entry->lose = lose; |
829 | ), | |
830 | ||
a25e21f0 | 831 | TP_printk("c=%08x DATA %08x q=%08x fl=%02x%s%s", |
be832aec DH |
832 | __entry->call, |
833 | __entry->serial, | |
834 | __entry->seq, | |
835 | __entry->flags, | |
265a44bb | 836 | __entry->retrans ? " *RETRANS*" : "", |
be832aec DH |
837 | __entry->lose ? " *LOSE*" : "") |
838 | ); | |
839 | ||
f3639df2 | 840 | TRACE_EVENT(rxrpc_tx_ack, |
be832aec DH |
841 | TP_PROTO(struct rxrpc_call *call, rxrpc_serial_t serial, |
842 | rxrpc_seq_t ack_first, rxrpc_serial_t ack_serial, | |
843 | u8 reason, u8 n_acks), | |
f3639df2 | 844 | |
be832aec | 845 | TP_ARGS(call, serial, ack_first, ack_serial, reason, n_acks), |
f3639df2 DH |
846 | |
847 | TP_STRUCT__entry( | |
a25e21f0 | 848 | __field(unsigned int, call ) |
f3639df2 | 849 | __field(rxrpc_serial_t, serial ) |
be832aec DH |
850 | __field(rxrpc_seq_t, ack_first ) |
851 | __field(rxrpc_serial_t, ack_serial ) | |
f3639df2 DH |
852 | __field(u8, reason ) |
853 | __field(u8, n_acks ) | |
854 | ), | |
855 | ||
856 | TP_fast_assign( | |
a25e21f0 | 857 | __entry->call = call ? call->debug_id : 0; |
f3639df2 | 858 | __entry->serial = serial; |
be832aec DH |
859 | __entry->ack_first = ack_first; |
860 | __entry->ack_serial = ack_serial; | |
f3639df2 DH |
861 | __entry->reason = reason; |
862 | __entry->n_acks = n_acks; | |
863 | ), | |
864 | ||
a25e21f0 | 865 | TP_printk(" c=%08x ACK %08x %s f=%08x r=%08x n=%u", |
f3639df2 | 866 | __entry->call, |
f3639df2 | 867 | __entry->serial, |
b54a134a | 868 | __print_symbolic(__entry->reason, rxrpc_ack_names), |
be832aec DH |
869 | __entry->ack_first, |
870 | __entry->ack_serial, | |
f3639df2 DH |
871 | __entry->n_acks) |
872 | ); | |
873 | ||
58dc63c9 DH |
874 | TRACE_EVENT(rxrpc_receive, |
875 | TP_PROTO(struct rxrpc_call *call, enum rxrpc_receive_trace why, | |
876 | rxrpc_serial_t serial, rxrpc_seq_t seq), | |
877 | ||
878 | TP_ARGS(call, why, serial, seq), | |
879 | ||
880 | TP_STRUCT__entry( | |
a25e21f0 | 881 | __field(unsigned int, call ) |
58dc63c9 DH |
882 | __field(enum rxrpc_receive_trace, why ) |
883 | __field(rxrpc_serial_t, serial ) | |
884 | __field(rxrpc_seq_t, seq ) | |
885 | __field(rxrpc_seq_t, hard_ack ) | |
886 | __field(rxrpc_seq_t, top ) | |
887 | ), | |
888 | ||
889 | TP_fast_assign( | |
a25e21f0 | 890 | __entry->call = call->debug_id; |
58dc63c9 DH |
891 | __entry->why = why; |
892 | __entry->serial = serial; | |
893 | __entry->seq = seq; | |
894 | __entry->hard_ack = call->rx_hard_ack; | |
895 | __entry->top = call->rx_top; | |
896 | ), | |
897 | ||
a25e21f0 | 898 | TP_printk("c=%08x %s r=%08x q=%08x w=%08x-%08x", |
58dc63c9 | 899 | __entry->call, |
b54a134a | 900 | __print_symbolic(__entry->why, rxrpc_receive_traces), |
58dc63c9 DH |
901 | __entry->serial, |
902 | __entry->seq, | |
903 | __entry->hard_ack, | |
904 | __entry->top) | |
905 | ); | |
906 | ||
84997905 DH |
907 | TRACE_EVENT(rxrpc_recvmsg, |
908 | TP_PROTO(struct rxrpc_call *call, enum rxrpc_recvmsg_trace why, | |
909 | rxrpc_seq_t seq, unsigned int offset, unsigned int len, | |
910 | int ret), | |
911 | ||
912 | TP_ARGS(call, why, seq, offset, len, ret), | |
913 | ||
914 | TP_STRUCT__entry( | |
a25e21f0 | 915 | __field(unsigned int, call ) |
84997905 DH |
916 | __field(enum rxrpc_recvmsg_trace, why ) |
917 | __field(rxrpc_seq_t, seq ) | |
918 | __field(unsigned int, offset ) | |
919 | __field(unsigned int, len ) | |
920 | __field(int, ret ) | |
921 | ), | |
922 | ||
923 | TP_fast_assign( | |
a25e21f0 | 924 | __entry->call = call->debug_id; |
84997905 DH |
925 | __entry->why = why; |
926 | __entry->seq = seq; | |
927 | __entry->offset = offset; | |
928 | __entry->len = len; | |
929 | __entry->ret = ret; | |
930 | ), | |
931 | ||
a25e21f0 | 932 | TP_printk("c=%08x %s q=%08x o=%u l=%u ret=%d", |
84997905 | 933 | __entry->call, |
b54a134a | 934 | __print_symbolic(__entry->why, rxrpc_recvmsg_traces), |
84997905 DH |
935 | __entry->seq, |
936 | __entry->offset, | |
937 | __entry->len, | |
938 | __entry->ret) | |
939 | ); | |
940 | ||
cf1a6474 DH |
941 | TRACE_EVENT(rxrpc_rtt_tx, |
942 | TP_PROTO(struct rxrpc_call *call, enum rxrpc_rtt_tx_trace why, | |
943 | rxrpc_serial_t send_serial), | |
944 | ||
945 | TP_ARGS(call, why, send_serial), | |
946 | ||
947 | TP_STRUCT__entry( | |
a25e21f0 | 948 | __field(unsigned int, call ) |
cf1a6474 DH |
949 | __field(enum rxrpc_rtt_tx_trace, why ) |
950 | __field(rxrpc_serial_t, send_serial ) | |
951 | ), | |
952 | ||
953 | TP_fast_assign( | |
a25e21f0 | 954 | __entry->call = call->debug_id; |
cf1a6474 DH |
955 | __entry->why = why; |
956 | __entry->send_serial = send_serial; | |
957 | ), | |
958 | ||
a25e21f0 | 959 | TP_printk("c=%08x %s sr=%08x", |
cf1a6474 | 960 | __entry->call, |
b54a134a | 961 | __print_symbolic(__entry->why, rxrpc_rtt_tx_traces), |
cf1a6474 DH |
962 | __entry->send_serial) |
963 | ); | |
964 | ||
965 | TRACE_EVENT(rxrpc_rtt_rx, | |
966 | TP_PROTO(struct rxrpc_call *call, enum rxrpc_rtt_rx_trace why, | |
967 | rxrpc_serial_t send_serial, rxrpc_serial_t resp_serial, | |
968 | s64 rtt, u8 nr, s64 avg), | |
969 | ||
970 | TP_ARGS(call, why, send_serial, resp_serial, rtt, nr, avg), | |
971 | ||
972 | TP_STRUCT__entry( | |
a25e21f0 | 973 | __field(unsigned int, call ) |
cf1a6474 DH |
974 | __field(enum rxrpc_rtt_rx_trace, why ) |
975 | __field(u8, nr ) | |
976 | __field(rxrpc_serial_t, send_serial ) | |
977 | __field(rxrpc_serial_t, resp_serial ) | |
978 | __field(s64, rtt ) | |
979 | __field(u64, avg ) | |
980 | ), | |
981 | ||
982 | TP_fast_assign( | |
a25e21f0 | 983 | __entry->call = call->debug_id; |
cf1a6474 DH |
984 | __entry->why = why; |
985 | __entry->send_serial = send_serial; | |
986 | __entry->resp_serial = resp_serial; | |
987 | __entry->rtt = rtt; | |
988 | __entry->nr = nr; | |
989 | __entry->avg = avg; | |
990 | ), | |
991 | ||
a25e21f0 | 992 | TP_printk("c=%08x %s sr=%08x rr=%08x rtt=%lld nr=%u avg=%lld", |
cf1a6474 | 993 | __entry->call, |
b54a134a | 994 | __print_symbolic(__entry->why, rxrpc_rtt_rx_traces), |
cf1a6474 DH |
995 | __entry->send_serial, |
996 | __entry->resp_serial, | |
997 | __entry->rtt, | |
998 | __entry->nr, | |
999 | __entry->avg) | |
1000 | ); | |
1001 | ||
fc7ab6d2 DH |
1002 | TRACE_EVENT(rxrpc_timer, |
1003 | TP_PROTO(struct rxrpc_call *call, enum rxrpc_timer_trace why, | |
a158bdd3 | 1004 | unsigned long now), |
fc7ab6d2 | 1005 | |
a158bdd3 | 1006 | TP_ARGS(call, why, now), |
fc7ab6d2 DH |
1007 | |
1008 | TP_STRUCT__entry( | |
a25e21f0 | 1009 | __field(unsigned int, call ) |
fc7ab6d2 | 1010 | __field(enum rxrpc_timer_trace, why ) |
a158bdd3 DH |
1011 | __field(long, now ) |
1012 | __field(long, ack_at ) | |
bd1fdf8c | 1013 | __field(long, ack_lost_at ) |
a158bdd3 DH |
1014 | __field(long, resend_at ) |
1015 | __field(long, ping_at ) | |
1016 | __field(long, expect_rx_by ) | |
1017 | __field(long, expect_req_by ) | |
1018 | __field(long, expect_term_by ) | |
1019 | __field(long, timer ) | |
fc7ab6d2 DH |
1020 | ), |
1021 | ||
1022 | TP_fast_assign( | |
a25e21f0 | 1023 | __entry->call = call->debug_id; |
a158bdd3 DH |
1024 | __entry->why = why; |
1025 | __entry->now = now; | |
1026 | __entry->ack_at = call->ack_at; | |
bd1fdf8c | 1027 | __entry->ack_lost_at = call->ack_lost_at; |
a158bdd3 DH |
1028 | __entry->resend_at = call->resend_at; |
1029 | __entry->expect_rx_by = call->expect_rx_by; | |
1030 | __entry->expect_req_by = call->expect_req_by; | |
1031 | __entry->expect_term_by = call->expect_term_by; | |
1032 | __entry->timer = call->timer.expires; | |
fc7ab6d2 DH |
1033 | ), |
1034 | ||
a25e21f0 | 1035 | TP_printk("c=%08x %s a=%ld la=%ld r=%ld xr=%ld xq=%ld xt=%ld t=%ld", |
fc7ab6d2 | 1036 | __entry->call, |
b54a134a | 1037 | __print_symbolic(__entry->why, rxrpc_timer_traces), |
a158bdd3 | 1038 | __entry->ack_at - __entry->now, |
bd1fdf8c | 1039 | __entry->ack_lost_at - __entry->now, |
a158bdd3 DH |
1040 | __entry->resend_at - __entry->now, |
1041 | __entry->expect_rx_by - __entry->now, | |
1042 | __entry->expect_req_by - __entry->now, | |
1043 | __entry->expect_term_by - __entry->now, | |
1044 | __entry->timer - __entry->now) | |
fc7ab6d2 DH |
1045 | ); |
1046 | ||
89b475ab DH |
1047 | TRACE_EVENT(rxrpc_rx_lose, |
1048 | TP_PROTO(struct rxrpc_skb_priv *sp), | |
1049 | ||
1050 | TP_ARGS(sp), | |
1051 | ||
1052 | TP_STRUCT__entry( | |
1053 | __field_struct(struct rxrpc_host_header, hdr ) | |
1054 | ), | |
1055 | ||
1056 | TP_fast_assign( | |
1057 | memcpy(&__entry->hdr, &sp->hdr, sizeof(__entry->hdr)); | |
1058 | ), | |
1059 | ||
1060 | TP_printk("%08x:%08x:%08x:%04x %08x %08x %02x %02x %s *LOSE*", | |
1061 | __entry->hdr.epoch, __entry->hdr.cid, | |
1062 | __entry->hdr.callNumber, __entry->hdr.serviceId, | |
1063 | __entry->hdr.serial, __entry->hdr.seq, | |
1064 | __entry->hdr.type, __entry->hdr.flags, | |
b54a134a DH |
1065 | __entry->hdr.type <= 15 ? |
1066 | __print_symbolic(__entry->hdr.type, rxrpc_pkts) : "?UNK") | |
89b475ab DH |
1067 | ); |
1068 | ||
9c7ad434 DH |
1069 | TRACE_EVENT(rxrpc_propose_ack, |
1070 | TP_PROTO(struct rxrpc_call *call, enum rxrpc_propose_ack_trace why, | |
1071 | u8 ack_reason, rxrpc_serial_t serial, bool immediate, | |
1072 | bool background, enum rxrpc_propose_ack_outcome outcome), | |
1073 | ||
1074 | TP_ARGS(call, why, ack_reason, serial, immediate, background, | |
1075 | outcome), | |
1076 | ||
1077 | TP_STRUCT__entry( | |
a25e21f0 | 1078 | __field(unsigned int, call ) |
9c7ad434 DH |
1079 | __field(enum rxrpc_propose_ack_trace, why ) |
1080 | __field(rxrpc_serial_t, serial ) | |
1081 | __field(u8, ack_reason ) | |
1082 | __field(bool, immediate ) | |
1083 | __field(bool, background ) | |
1084 | __field(enum rxrpc_propose_ack_outcome, outcome ) | |
1085 | ), | |
1086 | ||
1087 | TP_fast_assign( | |
a25e21f0 | 1088 | __entry->call = call->debug_id; |
9c7ad434 DH |
1089 | __entry->why = why; |
1090 | __entry->serial = serial; | |
1091 | __entry->ack_reason = ack_reason; | |
1092 | __entry->immediate = immediate; | |
1093 | __entry->background = background; | |
1094 | __entry->outcome = outcome; | |
1095 | ), | |
1096 | ||
a25e21f0 | 1097 | TP_printk("c=%08x %s %s r=%08x i=%u b=%u%s", |
9c7ad434 | 1098 | __entry->call, |
b54a134a DH |
1099 | __print_symbolic(__entry->why, rxrpc_propose_ack_traces), |
1100 | __print_symbolic(__entry->ack_reason, rxrpc_ack_names), | |
9c7ad434 DH |
1101 | __entry->serial, |
1102 | __entry->immediate, | |
1103 | __entry->background, | |
b54a134a | 1104 | __print_symbolic(__entry->outcome, rxrpc_propose_ack_outcomes)) |
9c7ad434 DH |
1105 | ); |
1106 | ||
c6672e3f DH |
1107 | TRACE_EVENT(rxrpc_retransmit, |
1108 | TP_PROTO(struct rxrpc_call *call, rxrpc_seq_t seq, u8 annotation, | |
1109 | s64 expiry), | |
1110 | ||
1111 | TP_ARGS(call, seq, annotation, expiry), | |
1112 | ||
1113 | TP_STRUCT__entry( | |
a25e21f0 | 1114 | __field(unsigned int, call ) |
c6672e3f DH |
1115 | __field(rxrpc_seq_t, seq ) |
1116 | __field(u8, annotation ) | |
1117 | __field(s64, expiry ) | |
1118 | ), | |
1119 | ||
1120 | TP_fast_assign( | |
a25e21f0 | 1121 | __entry->call = call->debug_id; |
c6672e3f DH |
1122 | __entry->seq = seq; |
1123 | __entry->annotation = annotation; | |
1124 | __entry->expiry = expiry; | |
1125 | ), | |
1126 | ||
a25e21f0 | 1127 | TP_printk("c=%08x q=%x a=%02x xp=%lld", |
c6672e3f DH |
1128 | __entry->call, |
1129 | __entry->seq, | |
1130 | __entry->annotation, | |
1131 | __entry->expiry) | |
1132 | ); | |
1133 | ||
57494343 DH |
1134 | TRACE_EVENT(rxrpc_congest, |
1135 | TP_PROTO(struct rxrpc_call *call, struct rxrpc_ack_summary *summary, | |
1136 | rxrpc_serial_t ack_serial, enum rxrpc_congest_change change), | |
1137 | ||
1138 | TP_ARGS(call, summary, ack_serial, change), | |
1139 | ||
1140 | TP_STRUCT__entry( | |
a25e21f0 | 1141 | __field(unsigned int, call ) |
57494343 DH |
1142 | __field(enum rxrpc_congest_change, change ) |
1143 | __field(rxrpc_seq_t, hard_ack ) | |
1144 | __field(rxrpc_seq_t, top ) | |
1145 | __field(rxrpc_seq_t, lowest_nak ) | |
1146 | __field(rxrpc_serial_t, ack_serial ) | |
1147 | __field_struct(struct rxrpc_ack_summary, sum ) | |
1148 | ), | |
1149 | ||
1150 | TP_fast_assign( | |
a25e21f0 | 1151 | __entry->call = call->debug_id; |
57494343 DH |
1152 | __entry->change = change; |
1153 | __entry->hard_ack = call->tx_hard_ack; | |
1154 | __entry->top = call->tx_top; | |
1155 | __entry->lowest_nak = call->acks_lowest_nak; | |
1156 | __entry->ack_serial = ack_serial; | |
1157 | memcpy(&__entry->sum, summary, sizeof(__entry->sum)); | |
1158 | ), | |
1159 | ||
a25e21f0 | 1160 | TP_printk("c=%08x r=%08x %s q=%08x %s cw=%u ss=%u nr=%u,%u nw=%u,%u r=%u b=%u u=%u d=%u l=%x%s%s%s", |
57494343 DH |
1161 | __entry->call, |
1162 | __entry->ack_serial, | |
b54a134a | 1163 | __print_symbolic(__entry->sum.ack_reason, rxrpc_ack_names), |
57494343 | 1164 | __entry->hard_ack, |
b54a134a | 1165 | __print_symbolic(__entry->sum.mode, rxrpc_congest_modes), |
57494343 DH |
1166 | __entry->sum.cwnd, |
1167 | __entry->sum.ssthresh, | |
1168 | __entry->sum.nr_acks, __entry->sum.nr_nacks, | |
1169 | __entry->sum.nr_new_acks, __entry->sum.nr_new_nacks, | |
1170 | __entry->sum.nr_rot_new_acks, | |
1171 | __entry->top - __entry->hard_ack, | |
1172 | __entry->sum.cumulative_acks, | |
1173 | __entry->sum.dup_acks, | |
1174 | __entry->lowest_nak, __entry->sum.new_low_nack ? "!" : "", | |
b54a134a | 1175 | __print_symbolic(__entry->change, rxrpc_congest_changes), |
57494343 DH |
1176 | __entry->sum.retrans_timeo ? " rTxTo" : "") |
1177 | ); | |
1178 | ||
b1d9f7fd DH |
1179 | TRACE_EVENT(rxrpc_disconnect_call, |
1180 | TP_PROTO(struct rxrpc_call *call), | |
1181 | ||
1182 | TP_ARGS(call), | |
1183 | ||
1184 | TP_STRUCT__entry( | |
a25e21f0 | 1185 | __field(unsigned int, call ) |
b1d9f7fd DH |
1186 | __field(u32, abort_code ) |
1187 | ), | |
1188 | ||
1189 | TP_fast_assign( | |
a25e21f0 | 1190 | __entry->call = call->debug_id; |
b1d9f7fd DH |
1191 | __entry->abort_code = call->abort_code; |
1192 | ), | |
1193 | ||
a25e21f0 | 1194 | TP_printk("c=%08x ab=%08x", |
b1d9f7fd DH |
1195 | __entry->call, |
1196 | __entry->abort_code) | |
1197 | ); | |
1198 | ||
1199 | TRACE_EVENT(rxrpc_improper_term, | |
1200 | TP_PROTO(struct rxrpc_call *call), | |
1201 | ||
1202 | TP_ARGS(call), | |
1203 | ||
1204 | TP_STRUCT__entry( | |
a25e21f0 | 1205 | __field(unsigned int, call ) |
b1d9f7fd DH |
1206 | __field(u32, abort_code ) |
1207 | ), | |
1208 | ||
1209 | TP_fast_assign( | |
a25e21f0 | 1210 | __entry->call = call->debug_id; |
b1d9f7fd DH |
1211 | __entry->abort_code = call->abort_code; |
1212 | ), | |
1213 | ||
a25e21f0 | 1214 | TP_printk("c=%08x ab=%08x", |
b1d9f7fd DH |
1215 | __entry->call, |
1216 | __entry->abort_code) | |
1217 | ); | |
1218 | ||
fb46f6ee DH |
1219 | TRACE_EVENT(rxrpc_rx_eproto, |
1220 | TP_PROTO(struct rxrpc_call *call, rxrpc_serial_t serial, | |
1221 | const char *why), | |
1222 | ||
1223 | TP_ARGS(call, serial, why), | |
1224 | ||
1225 | TP_STRUCT__entry( | |
a25e21f0 | 1226 | __field(unsigned int, call ) |
fb46f6ee DH |
1227 | __field(rxrpc_serial_t, serial ) |
1228 | __field(const char *, why ) | |
1229 | ), | |
1230 | ||
1231 | TP_fast_assign( | |
a25e21f0 | 1232 | __entry->call = call->debug_id; |
fb46f6ee DH |
1233 | __entry->serial = serial; |
1234 | __entry->why = why; | |
1235 | ), | |
1236 | ||
a25e21f0 | 1237 | TP_printk("c=%08x EPROTO %08x %s", |
fb46f6ee DH |
1238 | __entry->call, |
1239 | __entry->serial, | |
1240 | __entry->why) | |
1241 | ); | |
1242 | ||
89ca6948 DH |
1243 | TRACE_EVENT(rxrpc_connect_call, |
1244 | TP_PROTO(struct rxrpc_call *call), | |
1245 | ||
1246 | TP_ARGS(call), | |
1247 | ||
1248 | TP_STRUCT__entry( | |
a25e21f0 | 1249 | __field(unsigned int, call ) |
89ca6948 DH |
1250 | __field(unsigned long, user_call_ID ) |
1251 | __field(u32, cid ) | |
1252 | __field(u32, call_id ) | |
1253 | ), | |
1254 | ||
1255 | TP_fast_assign( | |
a25e21f0 | 1256 | __entry->call = call->debug_id; |
89ca6948 DH |
1257 | __entry->user_call_ID = call->user_call_ID; |
1258 | __entry->cid = call->cid; | |
1259 | __entry->call_id = call->call_id; | |
1260 | ), | |
1261 | ||
a25e21f0 | 1262 | TP_printk("c=%08x u=%p %08x:%08x", |
89ca6948 DH |
1263 | __entry->call, |
1264 | (void *)__entry->user_call_ID, | |
1265 | __entry->cid, | |
1266 | __entry->call_id) | |
1267 | ); | |
1268 | ||
827efed6 DH |
1269 | TRACE_EVENT(rxrpc_resend, |
1270 | TP_PROTO(struct rxrpc_call *call, int ix), | |
1271 | ||
1272 | TP_ARGS(call, ix), | |
1273 | ||
1274 | TP_STRUCT__entry( | |
a25e21f0 | 1275 | __field(unsigned int, call ) |
827efed6 DH |
1276 | __field(int, ix ) |
1277 | __array(u8, anno, 64 ) | |
1278 | ), | |
1279 | ||
1280 | TP_fast_assign( | |
a25e21f0 | 1281 | __entry->call = call->debug_id; |
827efed6 DH |
1282 | __entry->ix = ix; |
1283 | memcpy(__entry->anno, call->rxtx_annotations, 64); | |
1284 | ), | |
1285 | ||
a25e21f0 | 1286 | TP_printk("c=%08x ix=%u a=%64phN", |
827efed6 DH |
1287 | __entry->call, |
1288 | __entry->ix, | |
1289 | __entry->anno) | |
1290 | ); | |
1291 | ||
df844fd4 DH |
1292 | #endif /* _TRACE_RXRPC_H */ |
1293 | ||
1294 | /* This part must be outside protection */ | |
1295 | #include <trace/define_trace.h> |