Thomas Gleixner | b4d0d23 | 2019-05-20 19:08:01 +0200 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-or-later */ |
David Howells | df844fd | 2016-08-23 15:27:24 +0100 | [diff] [blame] | 2 | /* AF_RXRPC tracepoints |
| 3 | * |
| 4 | * Copyright (C) 2016 Red Hat, Inc. All Rights Reserved. |
| 5 | * Written by David Howells (dhowells@redhat.com) |
David Howells | df844fd | 2016-08-23 15:27:24 +0100 | [diff] [blame] | 6 | */ |
| 7 | #undef TRACE_SYSTEM |
| 8 | #define TRACE_SYSTEM rxrpc |
| 9 | |
| 10 | #if !defined(_TRACE_RXRPC_H) || defined(TRACE_HEADER_MULTI_READ) |
| 11 | #define _TRACE_RXRPC_H |
| 12 | |
| 13 | #include <linux/tracepoint.h> |
David Howells | 494337c | 2018-05-10 23:26:01 +0100 | [diff] [blame] | 14 | #include <linux/errqueue.h> |
David Howells | df844fd | 2016-08-23 15:27:24 +0100 | [diff] [blame] | 15 | |
David Howells | b54a134 | 2017-01-05 10:38:33 +0000 | [diff] [blame] | 16 | /* |
| 17 | * Define enums for tracing information. |
| 18 | * |
| 19 | * These should all be kept sorted, making it easier to match the string |
| 20 | * mapping tables further on. |
| 21 | */ |
| 22 | #ifndef __RXRPC_DECLARE_TRACE_ENUMS_ONCE_ONLY |
| 23 | #define __RXRPC_DECLARE_TRACE_ENUMS_ONCE_ONLY |
| 24 | |
| 25 | enum rxrpc_skb_trace { |
David Howells | 987db9f | 2019-08-19 09:25:38 +0100 | [diff] [blame] | 26 | rxrpc_skb_cleaned, |
| 27 | rxrpc_skb_freed, |
| 28 | rxrpc_skb_got, |
| 29 | rxrpc_skb_lost, |
| 30 | rxrpc_skb_new, |
| 31 | rxrpc_skb_purged, |
| 32 | rxrpc_skb_received, |
| 33 | rxrpc_skb_rotated, |
| 34 | rxrpc_skb_seen, |
David Howells | d0d5c0c | 2019-08-27 10:13:46 +0100 | [diff] [blame] | 35 | rxrpc_skb_unshared, |
| 36 | rxrpc_skb_unshared_nomem, |
David Howells | b54a134 | 2017-01-05 10:38:33 +0000 | [diff] [blame] | 37 | }; |
| 38 | |
David Howells | 09d2bf5 | 2018-03-30 21:05:28 +0100 | [diff] [blame] | 39 | enum rxrpc_local_trace { |
| 40 | rxrpc_local_got, |
| 41 | rxrpc_local_new, |
| 42 | rxrpc_local_processing, |
| 43 | rxrpc_local_put, |
| 44 | rxrpc_local_queued, |
| 45 | }; |
| 46 | |
David Howells | 1159d4b | 2018-03-30 21:05:38 +0100 | [diff] [blame] | 47 | enum rxrpc_peer_trace { |
| 48 | rxrpc_peer_got, |
| 49 | rxrpc_peer_new, |
| 50 | rxrpc_peer_processing, |
| 51 | rxrpc_peer_put, |
David Howells | 1159d4b | 2018-03-30 21:05:38 +0100 | [diff] [blame] | 52 | }; |
| 53 | |
David Howells | b54a134 | 2017-01-05 10:38:33 +0000 | [diff] [blame] | 54 | enum rxrpc_conn_trace { |
| 55 | rxrpc_conn_got, |
| 56 | rxrpc_conn_new_client, |
| 57 | rxrpc_conn_new_service, |
| 58 | rxrpc_conn_put_client, |
| 59 | rxrpc_conn_put_service, |
| 60 | rxrpc_conn_queued, |
David Howells | f859ab6 | 2017-11-24 10:18:42 +0000 | [diff] [blame] | 61 | rxrpc_conn_reap_service, |
David Howells | b54a134 | 2017-01-05 10:38:33 +0000 | [diff] [blame] | 62 | rxrpc_conn_seen, |
| 63 | }; |
| 64 | |
| 65 | enum rxrpc_client_trace { |
| 66 | rxrpc_client_activate_chans, |
| 67 | rxrpc_client_alloc, |
| 68 | rxrpc_client_chan_activate, |
| 69 | rxrpc_client_chan_disconnect, |
| 70 | rxrpc_client_chan_pass, |
| 71 | rxrpc_client_chan_unstarted, |
David Howells | 930c9f9 | 2019-03-08 12:48:39 +0000 | [diff] [blame] | 72 | rxrpc_client_chan_wait_failed, |
David Howells | b54a134 | 2017-01-05 10:38:33 +0000 | [diff] [blame] | 73 | rxrpc_client_cleanup, |
| 74 | rxrpc_client_count, |
| 75 | rxrpc_client_discard, |
| 76 | rxrpc_client_duplicate, |
| 77 | rxrpc_client_exposed, |
| 78 | rxrpc_client_replace, |
| 79 | rxrpc_client_to_active, |
| 80 | rxrpc_client_to_culled, |
| 81 | rxrpc_client_to_idle, |
| 82 | rxrpc_client_to_inactive, |
| 83 | rxrpc_client_to_upgrade, |
| 84 | rxrpc_client_to_waiting, |
| 85 | rxrpc_client_uncount, |
| 86 | }; |
| 87 | |
| 88 | enum rxrpc_call_trace { |
| 89 | rxrpc_call_connected, |
| 90 | rxrpc_call_error, |
| 91 | rxrpc_call_got, |
| 92 | rxrpc_call_got_kernel, |
| 93 | rxrpc_call_got_userid, |
| 94 | rxrpc_call_new_client, |
| 95 | rxrpc_call_new_service, |
| 96 | rxrpc_call_put, |
| 97 | rxrpc_call_put_kernel, |
| 98 | rxrpc_call_put_noqueue, |
| 99 | rxrpc_call_put_userid, |
| 100 | rxrpc_call_queued, |
| 101 | rxrpc_call_queued_ref, |
| 102 | rxrpc_call_release, |
| 103 | rxrpc_call_seen, |
| 104 | }; |
| 105 | |
| 106 | enum rxrpc_transmit_trace { |
| 107 | rxrpc_transmit_await_reply, |
| 108 | rxrpc_transmit_end, |
| 109 | rxrpc_transmit_queue, |
| 110 | rxrpc_transmit_queue_last, |
| 111 | rxrpc_transmit_rotate, |
| 112 | rxrpc_transmit_rotate_last, |
| 113 | rxrpc_transmit_wait, |
| 114 | }; |
| 115 | |
| 116 | enum rxrpc_receive_trace { |
| 117 | rxrpc_receive_end, |
| 118 | rxrpc_receive_front, |
| 119 | rxrpc_receive_incoming, |
| 120 | rxrpc_receive_queue, |
| 121 | rxrpc_receive_queue_last, |
| 122 | rxrpc_receive_rotate, |
| 123 | }; |
| 124 | |
| 125 | enum rxrpc_recvmsg_trace { |
| 126 | rxrpc_recvmsg_cont, |
| 127 | rxrpc_recvmsg_data_return, |
| 128 | rxrpc_recvmsg_dequeue, |
| 129 | rxrpc_recvmsg_enter, |
| 130 | rxrpc_recvmsg_full, |
| 131 | rxrpc_recvmsg_hole, |
| 132 | rxrpc_recvmsg_next, |
David Howells | 540b1c4 | 2017-02-27 15:43:06 +0000 | [diff] [blame] | 133 | rxrpc_recvmsg_requeue, |
David Howells | b54a134 | 2017-01-05 10:38:33 +0000 | [diff] [blame] | 134 | rxrpc_recvmsg_return, |
| 135 | rxrpc_recvmsg_terminal, |
| 136 | rxrpc_recvmsg_to_be_accepted, |
| 137 | rxrpc_recvmsg_wait, |
| 138 | }; |
| 139 | |
| 140 | enum rxrpc_rtt_tx_trace { |
| 141 | rxrpc_rtt_tx_data, |
| 142 | rxrpc_rtt_tx_ping, |
| 143 | }; |
| 144 | |
| 145 | enum rxrpc_rtt_rx_trace { |
| 146 | rxrpc_rtt_rx_ping_response, |
| 147 | rxrpc_rtt_rx_requested_ack, |
| 148 | }; |
| 149 | |
| 150 | enum rxrpc_timer_trace { |
| 151 | rxrpc_timer_begin, |
David Howells | a158bdd | 2017-11-24 10:18:41 +0000 | [diff] [blame] | 152 | rxrpc_timer_exp_ack, |
| 153 | rxrpc_timer_exp_hard, |
| 154 | rxrpc_timer_exp_idle, |
David Howells | 415f44e | 2017-11-24 10:18:42 +0000 | [diff] [blame] | 155 | rxrpc_timer_exp_keepalive, |
David Howells | bd1fdf8 | 2017-11-24 10:18:42 +0000 | [diff] [blame] | 156 | rxrpc_timer_exp_lost_ack, |
David Howells | a158bdd | 2017-11-24 10:18:41 +0000 | [diff] [blame] | 157 | rxrpc_timer_exp_normal, |
| 158 | rxrpc_timer_exp_ping, |
| 159 | rxrpc_timer_exp_resend, |
David Howells | b54a134 | 2017-01-05 10:38:33 +0000 | [diff] [blame] | 160 | rxrpc_timer_expired, |
| 161 | rxrpc_timer_init_for_reply, |
| 162 | rxrpc_timer_init_for_send_reply, |
David Howells | a158bdd | 2017-11-24 10:18:41 +0000 | [diff] [blame] | 163 | rxrpc_timer_restart, |
David Howells | b54a134 | 2017-01-05 10:38:33 +0000 | [diff] [blame] | 164 | rxrpc_timer_set_for_ack, |
David Howells | a158bdd | 2017-11-24 10:18:41 +0000 | [diff] [blame] | 165 | rxrpc_timer_set_for_hard, |
| 166 | rxrpc_timer_set_for_idle, |
David Howells | 415f44e | 2017-11-24 10:18:42 +0000 | [diff] [blame] | 167 | rxrpc_timer_set_for_keepalive, |
David Howells | bd1fdf8 | 2017-11-24 10:18:42 +0000 | [diff] [blame] | 168 | rxrpc_timer_set_for_lost_ack, |
David Howells | a158bdd | 2017-11-24 10:18:41 +0000 | [diff] [blame] | 169 | rxrpc_timer_set_for_normal, |
David Howells | b54a134 | 2017-01-05 10:38:33 +0000 | [diff] [blame] | 170 | rxrpc_timer_set_for_ping, |
| 171 | rxrpc_timer_set_for_resend, |
| 172 | rxrpc_timer_set_for_send, |
| 173 | }; |
| 174 | |
| 175 | enum rxrpc_propose_ack_trace { |
| 176 | rxrpc_propose_ack_client_tx_end, |
| 177 | rxrpc_propose_ack_input_data, |
David Howells | 7150cea | 2018-11-12 22:33:22 +0000 | [diff] [blame] | 178 | rxrpc_propose_ack_ping_for_check_life, |
David Howells | 415f44e | 2017-11-24 10:18:42 +0000 | [diff] [blame] | 179 | rxrpc_propose_ack_ping_for_keepalive, |
David Howells | b54a134 | 2017-01-05 10:38:33 +0000 | [diff] [blame] | 180 | rxrpc_propose_ack_ping_for_lost_ack, |
| 181 | rxrpc_propose_ack_ping_for_lost_reply, |
| 182 | rxrpc_propose_ack_ping_for_params, |
| 183 | rxrpc_propose_ack_processing_op, |
| 184 | rxrpc_propose_ack_respond_to_ack, |
| 185 | rxrpc_propose_ack_respond_to_ping, |
| 186 | rxrpc_propose_ack_retry_tx, |
| 187 | rxrpc_propose_ack_rotate_rx, |
| 188 | rxrpc_propose_ack_terminal_ack, |
| 189 | }; |
| 190 | |
| 191 | enum rxrpc_propose_ack_outcome { |
| 192 | rxrpc_propose_ack_subsume, |
| 193 | rxrpc_propose_ack_update, |
| 194 | rxrpc_propose_ack_use, |
| 195 | }; |
| 196 | |
| 197 | enum rxrpc_congest_change { |
| 198 | rxrpc_cong_begin_retransmission, |
| 199 | rxrpc_cong_cleared_nacks, |
| 200 | rxrpc_cong_new_low_nack, |
| 201 | rxrpc_cong_no_change, |
| 202 | rxrpc_cong_progress, |
| 203 | rxrpc_cong_retransmit_again, |
| 204 | rxrpc_cong_rtt_window_end, |
| 205 | rxrpc_cong_saw_nack, |
| 206 | }; |
| 207 | |
David Howells | 4764c0d | 2018-07-23 17:18:37 +0100 | [diff] [blame] | 208 | enum rxrpc_tx_point { |
| 209 | rxrpc_tx_point_call_abort, |
| 210 | rxrpc_tx_point_call_ack, |
| 211 | rxrpc_tx_point_call_data_frag, |
| 212 | rxrpc_tx_point_call_data_nofrag, |
| 213 | rxrpc_tx_point_call_final_resend, |
| 214 | rxrpc_tx_point_conn_abort, |
| 215 | rxrpc_tx_point_rxkad_challenge, |
| 216 | rxrpc_tx_point_rxkad_response, |
| 217 | rxrpc_tx_point_reject, |
| 218 | rxrpc_tx_point_version_keepalive, |
| 219 | rxrpc_tx_point_version_reply, |
David Howells | 6b47fe1 | 2018-05-10 23:26:01 +0100 | [diff] [blame] | 220 | }; |
| 221 | |
David Howells | b54a134 | 2017-01-05 10:38:33 +0000 | [diff] [blame] | 222 | #endif /* end __RXRPC_DECLARE_TRACE_ENUMS_ONCE_ONLY */ |
| 223 | |
| 224 | /* |
| 225 | * Declare tracing information enums and their string mappings for display. |
| 226 | */ |
| 227 | #define rxrpc_skb_traces \ |
David Howells | 987db9f | 2019-08-19 09:25:38 +0100 | [diff] [blame] | 228 | EM(rxrpc_skb_cleaned, "CLN") \ |
| 229 | EM(rxrpc_skb_freed, "FRE") \ |
| 230 | EM(rxrpc_skb_got, "GOT") \ |
| 231 | EM(rxrpc_skb_lost, "*L*") \ |
| 232 | EM(rxrpc_skb_new, "NEW") \ |
| 233 | EM(rxrpc_skb_purged, "PUR") \ |
| 234 | EM(rxrpc_skb_received, "RCV") \ |
| 235 | EM(rxrpc_skb_rotated, "ROT") \ |
David Howells | d0d5c0c | 2019-08-27 10:13:46 +0100 | [diff] [blame] | 236 | EM(rxrpc_skb_seen, "SEE") \ |
| 237 | EM(rxrpc_skb_unshared, "UNS") \ |
| 238 | E_(rxrpc_skb_unshared_nomem, "US0") |
David Howells | b54a134 | 2017-01-05 10:38:33 +0000 | [diff] [blame] | 239 | |
David Howells | 09d2bf5 | 2018-03-30 21:05:28 +0100 | [diff] [blame] | 240 | #define rxrpc_local_traces \ |
| 241 | EM(rxrpc_local_got, "GOT") \ |
| 242 | EM(rxrpc_local_new, "NEW") \ |
| 243 | EM(rxrpc_local_processing, "PRO") \ |
| 244 | EM(rxrpc_local_put, "PUT") \ |
| 245 | E_(rxrpc_local_queued, "QUE") |
| 246 | |
David Howells | 1159d4b | 2018-03-30 21:05:38 +0100 | [diff] [blame] | 247 | #define rxrpc_peer_traces \ |
| 248 | EM(rxrpc_peer_got, "GOT") \ |
| 249 | EM(rxrpc_peer_new, "NEW") \ |
| 250 | EM(rxrpc_peer_processing, "PRO") \ |
David Howells | f334430 | 2018-09-27 15:13:09 +0100 | [diff] [blame] | 251 | E_(rxrpc_peer_put, "PUT") |
David Howells | 1159d4b | 2018-03-30 21:05:38 +0100 | [diff] [blame] | 252 | |
David Howells | b54a134 | 2017-01-05 10:38:33 +0000 | [diff] [blame] | 253 | #define rxrpc_conn_traces \ |
| 254 | EM(rxrpc_conn_got, "GOT") \ |
| 255 | EM(rxrpc_conn_new_client, "NWc") \ |
| 256 | EM(rxrpc_conn_new_service, "NWs") \ |
| 257 | EM(rxrpc_conn_put_client, "PTc") \ |
| 258 | EM(rxrpc_conn_put_service, "PTs") \ |
| 259 | EM(rxrpc_conn_queued, "QUE") \ |
David Howells | f859ab6 | 2017-11-24 10:18:42 +0000 | [diff] [blame] | 260 | EM(rxrpc_conn_reap_service, "RPs") \ |
David Howells | b54a134 | 2017-01-05 10:38:33 +0000 | [diff] [blame] | 261 | E_(rxrpc_conn_seen, "SEE") |
| 262 | |
| 263 | #define rxrpc_client_traces \ |
| 264 | EM(rxrpc_client_activate_chans, "Activa") \ |
| 265 | EM(rxrpc_client_alloc, "Alloc ") \ |
| 266 | EM(rxrpc_client_chan_activate, "ChActv") \ |
| 267 | EM(rxrpc_client_chan_disconnect, "ChDisc") \ |
| 268 | EM(rxrpc_client_chan_pass, "ChPass") \ |
| 269 | EM(rxrpc_client_chan_unstarted, "ChUnst") \ |
David Howells | 930c9f9 | 2019-03-08 12:48:39 +0000 | [diff] [blame] | 270 | EM(rxrpc_client_chan_wait_failed, "ChWtFl") \ |
David Howells | b54a134 | 2017-01-05 10:38:33 +0000 | [diff] [blame] | 271 | EM(rxrpc_client_cleanup, "Clean ") \ |
| 272 | EM(rxrpc_client_count, "Count ") \ |
| 273 | EM(rxrpc_client_discard, "Discar") \ |
| 274 | EM(rxrpc_client_duplicate, "Duplic") \ |
| 275 | EM(rxrpc_client_exposed, "Expose") \ |
| 276 | EM(rxrpc_client_replace, "Replac") \ |
| 277 | EM(rxrpc_client_to_active, "->Actv") \ |
| 278 | EM(rxrpc_client_to_culled, "->Cull") \ |
| 279 | EM(rxrpc_client_to_idle, "->Idle") \ |
| 280 | EM(rxrpc_client_to_inactive, "->Inac") \ |
| 281 | EM(rxrpc_client_to_upgrade, "->Upgd") \ |
| 282 | EM(rxrpc_client_to_waiting, "->Wait") \ |
| 283 | E_(rxrpc_client_uncount, "Uncoun") |
| 284 | |
| 285 | #define rxrpc_conn_cache_states \ |
| 286 | EM(RXRPC_CONN_CLIENT_INACTIVE, "Inac") \ |
| 287 | EM(RXRPC_CONN_CLIENT_WAITING, "Wait") \ |
| 288 | EM(RXRPC_CONN_CLIENT_ACTIVE, "Actv") \ |
David Howells | 4e25572 | 2017-06-05 14:30:49 +0100 | [diff] [blame] | 289 | EM(RXRPC_CONN_CLIENT_UPGRADE, "Upgd") \ |
David Howells | b54a134 | 2017-01-05 10:38:33 +0000 | [diff] [blame] | 290 | EM(RXRPC_CONN_CLIENT_CULLED, "Cull") \ |
| 291 | E_(RXRPC_CONN_CLIENT_IDLE, "Idle") \ |
| 292 | |
| 293 | #define rxrpc_call_traces \ |
| 294 | EM(rxrpc_call_connected, "CON") \ |
| 295 | EM(rxrpc_call_error, "*E*") \ |
| 296 | EM(rxrpc_call_got, "GOT") \ |
| 297 | EM(rxrpc_call_got_kernel, "Gke") \ |
| 298 | EM(rxrpc_call_got_userid, "Gus") \ |
| 299 | EM(rxrpc_call_new_client, "NWc") \ |
| 300 | EM(rxrpc_call_new_service, "NWs") \ |
| 301 | EM(rxrpc_call_put, "PUT") \ |
| 302 | EM(rxrpc_call_put_kernel, "Pke") \ |
| 303 | EM(rxrpc_call_put_noqueue, "PNQ") \ |
| 304 | EM(rxrpc_call_put_userid, "Pus") \ |
| 305 | EM(rxrpc_call_queued, "QUE") \ |
| 306 | EM(rxrpc_call_queued_ref, "QUR") \ |
| 307 | EM(rxrpc_call_release, "RLS") \ |
| 308 | E_(rxrpc_call_seen, "SEE") |
| 309 | |
| 310 | #define rxrpc_transmit_traces \ |
| 311 | EM(rxrpc_transmit_await_reply, "AWR") \ |
| 312 | EM(rxrpc_transmit_end, "END") \ |
| 313 | EM(rxrpc_transmit_queue, "QUE") \ |
| 314 | EM(rxrpc_transmit_queue_last, "QLS") \ |
| 315 | EM(rxrpc_transmit_rotate, "ROT") \ |
| 316 | EM(rxrpc_transmit_rotate_last, "RLS") \ |
| 317 | E_(rxrpc_transmit_wait, "WAI") |
| 318 | |
| 319 | #define rxrpc_receive_traces \ |
| 320 | EM(rxrpc_receive_end, "END") \ |
| 321 | EM(rxrpc_receive_front, "FRN") \ |
| 322 | EM(rxrpc_receive_incoming, "INC") \ |
| 323 | EM(rxrpc_receive_queue, "QUE") \ |
| 324 | EM(rxrpc_receive_queue_last, "QLS") \ |
| 325 | E_(rxrpc_receive_rotate, "ROT") |
| 326 | |
| 327 | #define rxrpc_recvmsg_traces \ |
| 328 | EM(rxrpc_recvmsg_cont, "CONT") \ |
| 329 | EM(rxrpc_recvmsg_data_return, "DATA") \ |
| 330 | EM(rxrpc_recvmsg_dequeue, "DEQU") \ |
| 331 | EM(rxrpc_recvmsg_enter, "ENTR") \ |
| 332 | EM(rxrpc_recvmsg_full, "FULL") \ |
| 333 | EM(rxrpc_recvmsg_hole, "HOLE") \ |
| 334 | EM(rxrpc_recvmsg_next, "NEXT") \ |
David Howells | 540b1c4 | 2017-02-27 15:43:06 +0000 | [diff] [blame] | 335 | EM(rxrpc_recvmsg_requeue, "REQU") \ |
David Howells | b54a134 | 2017-01-05 10:38:33 +0000 | [diff] [blame] | 336 | EM(rxrpc_recvmsg_return, "RETN") \ |
| 337 | EM(rxrpc_recvmsg_terminal, "TERM") \ |
| 338 | EM(rxrpc_recvmsg_to_be_accepted, "TBAC") \ |
| 339 | E_(rxrpc_recvmsg_wait, "WAIT") |
| 340 | |
| 341 | #define rxrpc_rtt_tx_traces \ |
| 342 | EM(rxrpc_rtt_tx_data, "DATA") \ |
| 343 | E_(rxrpc_rtt_tx_ping, "PING") |
| 344 | |
| 345 | #define rxrpc_rtt_rx_traces \ |
| 346 | EM(rxrpc_rtt_rx_ping_response, "PONG") \ |
| 347 | E_(rxrpc_rtt_rx_requested_ack, "RACK") |
| 348 | |
| 349 | #define rxrpc_timer_traces \ |
| 350 | EM(rxrpc_timer_begin, "Begin ") \ |
| 351 | EM(rxrpc_timer_expired, "*EXPR*") \ |
David Howells | a158bdd | 2017-11-24 10:18:41 +0000 | [diff] [blame] | 352 | EM(rxrpc_timer_exp_ack, "ExpAck") \ |
| 353 | EM(rxrpc_timer_exp_hard, "ExpHrd") \ |
| 354 | EM(rxrpc_timer_exp_idle, "ExpIdl") \ |
David Howells | 415f44e | 2017-11-24 10:18:42 +0000 | [diff] [blame] | 355 | EM(rxrpc_timer_exp_keepalive, "ExpKA ") \ |
David Howells | bd1fdf8 | 2017-11-24 10:18:42 +0000 | [diff] [blame] | 356 | EM(rxrpc_timer_exp_lost_ack, "ExpLoA") \ |
David Howells | a158bdd | 2017-11-24 10:18:41 +0000 | [diff] [blame] | 357 | EM(rxrpc_timer_exp_normal, "ExpNml") \ |
| 358 | EM(rxrpc_timer_exp_ping, "ExpPng") \ |
| 359 | EM(rxrpc_timer_exp_resend, "ExpRsn") \ |
David Howells | b54a134 | 2017-01-05 10:38:33 +0000 | [diff] [blame] | 360 | EM(rxrpc_timer_init_for_reply, "IniRpl") \ |
| 361 | EM(rxrpc_timer_init_for_send_reply, "SndRpl") \ |
David Howells | a158bdd | 2017-11-24 10:18:41 +0000 | [diff] [blame] | 362 | EM(rxrpc_timer_restart, "Restrt") \ |
David Howells | b54a134 | 2017-01-05 10:38:33 +0000 | [diff] [blame] | 363 | EM(rxrpc_timer_set_for_ack, "SetAck") \ |
David Howells | a158bdd | 2017-11-24 10:18:41 +0000 | [diff] [blame] | 364 | EM(rxrpc_timer_set_for_hard, "SetHrd") \ |
| 365 | EM(rxrpc_timer_set_for_idle, "SetIdl") \ |
David Howells | 415f44e | 2017-11-24 10:18:42 +0000 | [diff] [blame] | 366 | EM(rxrpc_timer_set_for_keepalive, "KeepAl") \ |
David Howells | bd1fdf8 | 2017-11-24 10:18:42 +0000 | [diff] [blame] | 367 | EM(rxrpc_timer_set_for_lost_ack, "SetLoA") \ |
David Howells | a158bdd | 2017-11-24 10:18:41 +0000 | [diff] [blame] | 368 | EM(rxrpc_timer_set_for_normal, "SetNml") \ |
David Howells | b54a134 | 2017-01-05 10:38:33 +0000 | [diff] [blame] | 369 | EM(rxrpc_timer_set_for_ping, "SetPng") \ |
| 370 | EM(rxrpc_timer_set_for_resend, "SetRTx") \ |
David Howells | a158bdd | 2017-11-24 10:18:41 +0000 | [diff] [blame] | 371 | E_(rxrpc_timer_set_for_send, "SetSnd") |
David Howells | b54a134 | 2017-01-05 10:38:33 +0000 | [diff] [blame] | 372 | |
| 373 | #define rxrpc_propose_ack_traces \ |
| 374 | EM(rxrpc_propose_ack_client_tx_end, "ClTxEnd") \ |
| 375 | EM(rxrpc_propose_ack_input_data, "DataIn ") \ |
David Howells | 7150cea | 2018-11-12 22:33:22 +0000 | [diff] [blame] | 376 | EM(rxrpc_propose_ack_ping_for_check_life, "ChkLife") \ |
David Howells | 415f44e | 2017-11-24 10:18:42 +0000 | [diff] [blame] | 377 | EM(rxrpc_propose_ack_ping_for_keepalive, "KeepAlv") \ |
David Howells | b54a134 | 2017-01-05 10:38:33 +0000 | [diff] [blame] | 378 | EM(rxrpc_propose_ack_ping_for_lost_ack, "LostAck") \ |
| 379 | EM(rxrpc_propose_ack_ping_for_lost_reply, "LostRpl") \ |
| 380 | EM(rxrpc_propose_ack_ping_for_params, "Params ") \ |
| 381 | EM(rxrpc_propose_ack_processing_op, "ProcOp ") \ |
| 382 | EM(rxrpc_propose_ack_respond_to_ack, "Rsp2Ack") \ |
| 383 | EM(rxrpc_propose_ack_respond_to_ping, "Rsp2Png") \ |
| 384 | EM(rxrpc_propose_ack_retry_tx, "RetryTx") \ |
| 385 | EM(rxrpc_propose_ack_rotate_rx, "RxAck ") \ |
| 386 | E_(rxrpc_propose_ack_terminal_ack, "ClTerm ") |
| 387 | |
| 388 | #define rxrpc_propose_ack_outcomes \ |
| 389 | EM(rxrpc_propose_ack_subsume, " Subsume") \ |
| 390 | EM(rxrpc_propose_ack_update, " Update") \ |
David Howells | 197445a | 2018-07-23 17:18:37 +0100 | [diff] [blame] | 391 | E_(rxrpc_propose_ack_use, " New") |
David Howells | b54a134 | 2017-01-05 10:38:33 +0000 | [diff] [blame] | 392 | |
| 393 | #define rxrpc_congest_modes \ |
| 394 | EM(RXRPC_CALL_CONGEST_AVOIDANCE, "CongAvoid") \ |
| 395 | EM(RXRPC_CALL_FAST_RETRANSMIT, "FastReTx ") \ |
| 396 | EM(RXRPC_CALL_PACKET_LOSS, "PktLoss ") \ |
| 397 | E_(RXRPC_CALL_SLOW_START, "SlowStart") |
| 398 | |
| 399 | #define rxrpc_congest_changes \ |
| 400 | EM(rxrpc_cong_begin_retransmission, " Retrans") \ |
| 401 | EM(rxrpc_cong_cleared_nacks, " Cleared") \ |
| 402 | EM(rxrpc_cong_new_low_nack, " NewLowN") \ |
| 403 | EM(rxrpc_cong_no_change, "") \ |
| 404 | EM(rxrpc_cong_progress, " Progres") \ |
| 405 | EM(rxrpc_cong_retransmit_again, " ReTxAgn") \ |
| 406 | EM(rxrpc_cong_rtt_window_end, " RttWinE") \ |
| 407 | E_(rxrpc_cong_saw_nack, " SawNack") |
| 408 | |
| 409 | #define rxrpc_pkts \ |
| 410 | EM(0, "?00") \ |
| 411 | EM(RXRPC_PACKET_TYPE_DATA, "DATA") \ |
| 412 | EM(RXRPC_PACKET_TYPE_ACK, "ACK") \ |
| 413 | EM(RXRPC_PACKET_TYPE_BUSY, "BUSY") \ |
| 414 | EM(RXRPC_PACKET_TYPE_ABORT, "ABORT") \ |
| 415 | EM(RXRPC_PACKET_TYPE_ACKALL, "ACKALL") \ |
| 416 | EM(RXRPC_PACKET_TYPE_CHALLENGE, "CHALL") \ |
| 417 | EM(RXRPC_PACKET_TYPE_RESPONSE, "RESP") \ |
| 418 | EM(RXRPC_PACKET_TYPE_DEBUG, "DEBUG") \ |
| 419 | EM(9, "?09") \ |
| 420 | EM(10, "?10") \ |
| 421 | EM(11, "?11") \ |
| 422 | EM(12, "?12") \ |
| 423 | EM(RXRPC_PACKET_TYPE_VERSION, "VERSION") \ |
| 424 | EM(14, "?14") \ |
| 425 | E_(15, "?15") |
| 426 | |
| 427 | #define rxrpc_ack_names \ |
| 428 | EM(0, "-0-") \ |
| 429 | EM(RXRPC_ACK_REQUESTED, "REQ") \ |
| 430 | EM(RXRPC_ACK_DUPLICATE, "DUP") \ |
| 431 | EM(RXRPC_ACK_OUT_OF_SEQUENCE, "OOS") \ |
| 432 | EM(RXRPC_ACK_EXCEEDS_WINDOW, "WIN") \ |
| 433 | EM(RXRPC_ACK_NOSPACE, "MEM") \ |
| 434 | EM(RXRPC_ACK_PING, "PNG") \ |
| 435 | EM(RXRPC_ACK_PING_RESPONSE, "PNR") \ |
| 436 | EM(RXRPC_ACK_DELAY, "DLY") \ |
| 437 | EM(RXRPC_ACK_IDLE, "IDL") \ |
| 438 | E_(RXRPC_ACK__INVALID, "-?-") |
| 439 | |
David Howells | 1bae5d2 | 2018-03-27 23:08:20 +0100 | [diff] [blame] | 440 | #define rxrpc_completions \ |
| 441 | EM(RXRPC_CALL_SUCCEEDED, "Succeeded") \ |
| 442 | EM(RXRPC_CALL_REMOTELY_ABORTED, "RemoteAbort") \ |
| 443 | EM(RXRPC_CALL_LOCALLY_ABORTED, "LocalAbort") \ |
| 444 | EM(RXRPC_CALL_LOCAL_ERROR, "LocalError") \ |
| 445 | E_(RXRPC_CALL_NETWORK_ERROR, "NetError") |
| 446 | |
David Howells | 4764c0d | 2018-07-23 17:18:37 +0100 | [diff] [blame] | 447 | #define rxrpc_tx_points \ |
| 448 | EM(rxrpc_tx_point_call_abort, "CallAbort") \ |
| 449 | EM(rxrpc_tx_point_call_ack, "CallAck") \ |
| 450 | EM(rxrpc_tx_point_call_data_frag, "CallDataFrag") \ |
| 451 | EM(rxrpc_tx_point_call_data_nofrag, "CallDataNofrag") \ |
| 452 | EM(rxrpc_tx_point_call_final_resend, "CallFinalResend") \ |
| 453 | EM(rxrpc_tx_point_conn_abort, "ConnAbort") \ |
| 454 | EM(rxrpc_tx_point_reject, "Reject") \ |
| 455 | EM(rxrpc_tx_point_rxkad_challenge, "RxkadChall") \ |
| 456 | EM(rxrpc_tx_point_rxkad_response, "RxkadResp") \ |
| 457 | EM(rxrpc_tx_point_version_keepalive, "VerKeepalive") \ |
| 458 | E_(rxrpc_tx_point_version_reply, "VerReply") |
David Howells | 6b47fe1 | 2018-05-10 23:26:01 +0100 | [diff] [blame] | 459 | |
David Howells | b54a134 | 2017-01-05 10:38:33 +0000 | [diff] [blame] | 460 | /* |
| 461 | * Export enum symbols via userspace. |
| 462 | */ |
| 463 | #undef EM |
| 464 | #undef E_ |
| 465 | #define EM(a, b) TRACE_DEFINE_ENUM(a); |
| 466 | #define E_(a, b) TRACE_DEFINE_ENUM(a); |
| 467 | |
| 468 | rxrpc_skb_traces; |
David Howells | 09d2bf5 | 2018-03-30 21:05:28 +0100 | [diff] [blame] | 469 | rxrpc_local_traces; |
David Howells | b54a134 | 2017-01-05 10:38:33 +0000 | [diff] [blame] | 470 | rxrpc_conn_traces; |
| 471 | rxrpc_client_traces; |
| 472 | rxrpc_call_traces; |
| 473 | rxrpc_transmit_traces; |
| 474 | rxrpc_receive_traces; |
| 475 | rxrpc_recvmsg_traces; |
| 476 | rxrpc_rtt_tx_traces; |
| 477 | rxrpc_rtt_rx_traces; |
| 478 | rxrpc_timer_traces; |
| 479 | rxrpc_propose_ack_traces; |
| 480 | rxrpc_propose_ack_outcomes; |
David Howells | 827efed | 2018-03-27 23:02:47 +0100 | [diff] [blame] | 481 | rxrpc_congest_modes; |
David Howells | b54a134 | 2017-01-05 10:38:33 +0000 | [diff] [blame] | 482 | rxrpc_congest_changes; |
David Howells | 4764c0d | 2018-07-23 17:18:37 +0100 | [diff] [blame] | 483 | rxrpc_tx_points; |
David Howells | b54a134 | 2017-01-05 10:38:33 +0000 | [diff] [blame] | 484 | |
| 485 | /* |
| 486 | * Now redefine the EM() and E_() macros to map the enums to the strings that |
| 487 | * will be printed in the output. |
| 488 | */ |
| 489 | #undef EM |
| 490 | #undef E_ |
| 491 | #define EM(a, b) { a, b }, |
| 492 | #define E_(a, b) { a, b } |
| 493 | |
David Howells | 09d2bf5 | 2018-03-30 21:05:28 +0100 | [diff] [blame] | 494 | TRACE_EVENT(rxrpc_local, |
David Howells | 06d9532 | 2019-08-13 22:26:36 +0100 | [diff] [blame] | 495 | TP_PROTO(unsigned int local_debug_id, enum rxrpc_local_trace op, |
David Howells | 09d2bf5 | 2018-03-30 21:05:28 +0100 | [diff] [blame] | 496 | int usage, const void *where), |
| 497 | |
David Howells | 06d9532 | 2019-08-13 22:26:36 +0100 | [diff] [blame] | 498 | TP_ARGS(local_debug_id, op, usage, where), |
David Howells | 09d2bf5 | 2018-03-30 21:05:28 +0100 | [diff] [blame] | 499 | |
| 500 | TP_STRUCT__entry( |
| 501 | __field(unsigned int, local ) |
| 502 | __field(int, op ) |
| 503 | __field(int, usage ) |
| 504 | __field(const void *, where ) |
| 505 | ), |
| 506 | |
| 507 | TP_fast_assign( |
David Howells | 06d9532 | 2019-08-13 22:26:36 +0100 | [diff] [blame] | 508 | __entry->local = local_debug_id; |
David Howells | 09d2bf5 | 2018-03-30 21:05:28 +0100 | [diff] [blame] | 509 | __entry->op = op; |
| 510 | __entry->usage = usage; |
| 511 | __entry->where = where; |
| 512 | ), |
| 513 | |
| 514 | TP_printk("L=%08x %s u=%d sp=%pSR", |
| 515 | __entry->local, |
| 516 | __print_symbolic(__entry->op, rxrpc_local_traces), |
| 517 | __entry->usage, |
| 518 | __entry->where) |
| 519 | ); |
| 520 | |
David Howells | 1159d4b | 2018-03-30 21:05:38 +0100 | [diff] [blame] | 521 | TRACE_EVENT(rxrpc_peer, |
| 522 | TP_PROTO(struct rxrpc_peer *peer, enum rxrpc_peer_trace op, |
| 523 | int usage, const void *where), |
| 524 | |
| 525 | TP_ARGS(peer, op, usage, where), |
| 526 | |
| 527 | TP_STRUCT__entry( |
| 528 | __field(unsigned int, peer ) |
| 529 | __field(int, op ) |
| 530 | __field(int, usage ) |
| 531 | __field(const void *, where ) |
| 532 | ), |
| 533 | |
| 534 | TP_fast_assign( |
| 535 | __entry->peer = peer->debug_id; |
| 536 | __entry->op = op; |
| 537 | __entry->usage = usage; |
| 538 | __entry->where = where; |
| 539 | ), |
| 540 | |
| 541 | TP_printk("P=%08x %s u=%d sp=%pSR", |
| 542 | __entry->peer, |
| 543 | __print_symbolic(__entry->op, rxrpc_peer_traces), |
| 544 | __entry->usage, |
| 545 | __entry->where) |
| 546 | ); |
| 547 | |
David Howells | 363deea | 2016-09-17 10:49:14 +0100 | [diff] [blame] | 548 | TRACE_EVENT(rxrpc_conn, |
| 549 | TP_PROTO(struct rxrpc_connection *conn, enum rxrpc_conn_trace op, |
| 550 | int usage, const void *where), |
| 551 | |
| 552 | TP_ARGS(conn, op, usage, where), |
| 553 | |
| 554 | TP_STRUCT__entry( |
David Howells | a25e21f | 2018-03-27 23:03:00 +0100 | [diff] [blame] | 555 | __field(unsigned int, conn ) |
| 556 | __field(int, op ) |
| 557 | __field(int, usage ) |
| 558 | __field(const void *, where ) |
David Howells | 363deea | 2016-09-17 10:49:14 +0100 | [diff] [blame] | 559 | ), |
| 560 | |
| 561 | TP_fast_assign( |
David Howells | a25e21f | 2018-03-27 23:03:00 +0100 | [diff] [blame] | 562 | __entry->conn = conn->debug_id; |
David Howells | 363deea | 2016-09-17 10:49:14 +0100 | [diff] [blame] | 563 | __entry->op = op; |
| 564 | __entry->usage = usage; |
| 565 | __entry->where = where; |
| 566 | ), |
| 567 | |
David Howells | a25e21f | 2018-03-27 23:03:00 +0100 | [diff] [blame] | 568 | TP_printk("C=%08x %s u=%d sp=%pSR", |
David Howells | 363deea | 2016-09-17 10:49:14 +0100 | [diff] [blame] | 569 | __entry->conn, |
David Howells | b54a134 | 2017-01-05 10:38:33 +0000 | [diff] [blame] | 570 | __print_symbolic(__entry->op, rxrpc_conn_traces), |
David Howells | 363deea | 2016-09-17 10:49:14 +0100 | [diff] [blame] | 571 | __entry->usage, |
| 572 | __entry->where) |
| 573 | ); |
| 574 | |
| 575 | TRACE_EVENT(rxrpc_client, |
| 576 | TP_PROTO(struct rxrpc_connection *conn, int channel, |
| 577 | enum rxrpc_client_trace op), |
| 578 | |
| 579 | TP_ARGS(conn, channel, op), |
| 580 | |
| 581 | TP_STRUCT__entry( |
David Howells | a25e21f | 2018-03-27 23:03:00 +0100 | [diff] [blame] | 582 | __field(unsigned int, conn ) |
David Howells | 363deea | 2016-09-17 10:49:14 +0100 | [diff] [blame] | 583 | __field(u32, cid ) |
| 584 | __field(int, channel ) |
| 585 | __field(int, usage ) |
| 586 | __field(enum rxrpc_client_trace, op ) |
| 587 | __field(enum rxrpc_conn_cache_state, cs ) |
| 588 | ), |
| 589 | |
| 590 | TP_fast_assign( |
David Howells | a25e21f | 2018-03-27 23:03:00 +0100 | [diff] [blame] | 591 | __entry->conn = conn->debug_id; |
David Howells | 363deea | 2016-09-17 10:49:14 +0100 | [diff] [blame] | 592 | __entry->channel = channel; |
| 593 | __entry->usage = atomic_read(&conn->usage); |
| 594 | __entry->op = op; |
| 595 | __entry->cid = conn->proto.cid; |
| 596 | __entry->cs = conn->cache_state; |
| 597 | ), |
| 598 | |
David Howells | a25e21f | 2018-03-27 23:03:00 +0100 | [diff] [blame] | 599 | TP_printk("C=%08x h=%2d %s %s i=%08x u=%d", |
David Howells | 363deea | 2016-09-17 10:49:14 +0100 | [diff] [blame] | 600 | __entry->conn, |
| 601 | __entry->channel, |
David Howells | b54a134 | 2017-01-05 10:38:33 +0000 | [diff] [blame] | 602 | __print_symbolic(__entry->op, rxrpc_client_traces), |
| 603 | __print_symbolic(__entry->cs, rxrpc_conn_cache_states), |
David Howells | 363deea | 2016-09-17 10:49:14 +0100 | [diff] [blame] | 604 | __entry->cid, |
| 605 | __entry->usage) |
| 606 | ); |
| 607 | |
David Howells | e34d423 | 2016-08-30 09:49:29 +0100 | [diff] [blame] | 608 | TRACE_EVENT(rxrpc_call, |
David Howells | fff72429 | 2016-09-07 14:34:21 +0100 | [diff] [blame] | 609 | TP_PROTO(struct rxrpc_call *call, enum rxrpc_call_trace op, |
David Howells | 2ab2721 | 2016-09-08 11:10:12 +0100 | [diff] [blame] | 610 | int usage, const void *where, const void *aux), |
David Howells | e34d423 | 2016-08-30 09:49:29 +0100 | [diff] [blame] | 611 | |
David Howells | 2ab2721 | 2016-09-08 11:10:12 +0100 | [diff] [blame] | 612 | TP_ARGS(call, op, usage, where, aux), |
David Howells | e34d423 | 2016-08-30 09:49:29 +0100 | [diff] [blame] | 613 | |
| 614 | TP_STRUCT__entry( |
David Howells | a25e21f | 2018-03-27 23:03:00 +0100 | [diff] [blame] | 615 | __field(unsigned int, call ) |
David Howells | e34d423 | 2016-08-30 09:49:29 +0100 | [diff] [blame] | 616 | __field(int, op ) |
| 617 | __field(int, usage ) |
David Howells | e34d423 | 2016-08-30 09:49:29 +0100 | [diff] [blame] | 618 | __field(const void *, where ) |
| 619 | __field(const void *, aux ) |
| 620 | ), |
| 621 | |
| 622 | TP_fast_assign( |
David Howells | a25e21f | 2018-03-27 23:03:00 +0100 | [diff] [blame] | 623 | __entry->call = call->debug_id; |
David Howells | e34d423 | 2016-08-30 09:49:29 +0100 | [diff] [blame] | 624 | __entry->op = op; |
| 625 | __entry->usage = usage; |
David Howells | e34d423 | 2016-08-30 09:49:29 +0100 | [diff] [blame] | 626 | __entry->where = where; |
| 627 | __entry->aux = aux; |
| 628 | ), |
| 629 | |
David Howells | a25e21f | 2018-03-27 23:03:00 +0100 | [diff] [blame] | 630 | TP_printk("c=%08x %s u=%d sp=%pSR a=%p", |
David Howells | e34d423 | 2016-08-30 09:49:29 +0100 | [diff] [blame] | 631 | __entry->call, |
David Howells | b54a134 | 2017-01-05 10:38:33 +0000 | [diff] [blame] | 632 | __print_symbolic(__entry->op, rxrpc_call_traces), |
David Howells | e34d423 | 2016-08-30 09:49:29 +0100 | [diff] [blame] | 633 | __entry->usage, |
David Howells | e34d423 | 2016-08-30 09:49:29 +0100 | [diff] [blame] | 634 | __entry->where, |
| 635 | __entry->aux) |
| 636 | ); |
| 637 | |
David Howells | df844fd | 2016-08-23 15:27:24 +0100 | [diff] [blame] | 638 | TRACE_EVENT(rxrpc_skb, |
David Howells | 71f3ca4 | 2016-09-17 10:49:14 +0100 | [diff] [blame] | 639 | TP_PROTO(struct sk_buff *skb, enum rxrpc_skb_trace op, |
David Howells | d0d5c0c | 2019-08-27 10:13:46 +0100 | [diff] [blame] | 640 | int usage, int mod_count, u8 flags, const void *where), |
David Howells | df844fd | 2016-08-23 15:27:24 +0100 | [diff] [blame] | 641 | |
David Howells | d0d5c0c | 2019-08-27 10:13:46 +0100 | [diff] [blame] | 642 | TP_ARGS(skb, op, usage, mod_count, flags, where), |
David Howells | df844fd | 2016-08-23 15:27:24 +0100 | [diff] [blame] | 643 | |
| 644 | TP_STRUCT__entry( |
| 645 | __field(struct sk_buff *, skb ) |
David Howells | 71f3ca4 | 2016-09-17 10:49:14 +0100 | [diff] [blame] | 646 | __field(enum rxrpc_skb_trace, op ) |
David Howells | 987db9f | 2019-08-19 09:25:38 +0100 | [diff] [blame] | 647 | __field(u8, flags ) |
David Howells | df844fd | 2016-08-23 15:27:24 +0100 | [diff] [blame] | 648 | __field(int, usage ) |
| 649 | __field(int, mod_count ) |
| 650 | __field(const void *, where ) |
| 651 | ), |
| 652 | |
| 653 | TP_fast_assign( |
| 654 | __entry->skb = skb; |
David Howells | d0d5c0c | 2019-08-27 10:13:46 +0100 | [diff] [blame] | 655 | __entry->flags = flags; |
David Howells | df844fd | 2016-08-23 15:27:24 +0100 | [diff] [blame] | 656 | __entry->op = op; |
| 657 | __entry->usage = usage; |
| 658 | __entry->mod_count = mod_count; |
| 659 | __entry->where = where; |
| 660 | ), |
| 661 | |
David Howells | 987db9f | 2019-08-19 09:25:38 +0100 | [diff] [blame] | 662 | TP_printk("s=%p %cx %s u=%d m=%d p=%pSR", |
David Howells | df844fd | 2016-08-23 15:27:24 +0100 | [diff] [blame] | 663 | __entry->skb, |
David Howells | 987db9f | 2019-08-19 09:25:38 +0100 | [diff] [blame] | 664 | __entry->flags & RXRPC_SKB_TX_BUFFER ? 'T' : 'R', |
David Howells | b54a134 | 2017-01-05 10:38:33 +0000 | [diff] [blame] | 665 | __print_symbolic(__entry->op, rxrpc_skb_traces), |
David Howells | df844fd | 2016-08-23 15:27:24 +0100 | [diff] [blame] | 666 | __entry->usage, |
| 667 | __entry->mod_count, |
| 668 | __entry->where) |
| 669 | ); |
| 670 | |
David Howells | 49e19ec | 2016-09-08 11:10:12 +0100 | [diff] [blame] | 671 | TRACE_EVENT(rxrpc_rx_packet, |
| 672 | TP_PROTO(struct rxrpc_skb_priv *sp), |
| 673 | |
| 674 | TP_ARGS(sp), |
| 675 | |
| 676 | TP_STRUCT__entry( |
| 677 | __field_struct(struct rxrpc_host_header, hdr ) |
| 678 | ), |
| 679 | |
| 680 | TP_fast_assign( |
| 681 | memcpy(&__entry->hdr, &sp->hdr, sizeof(__entry->hdr)); |
| 682 | ), |
| 683 | |
David Howells | a3868bf | 2016-09-17 10:49:13 +0100 | [diff] [blame] | 684 | TP_printk("%08x:%08x:%08x:%04x %08x %08x %02x %02x %s", |
David Howells | 49e19ec | 2016-09-08 11:10:12 +0100 | [diff] [blame] | 685 | __entry->hdr.epoch, __entry->hdr.cid, |
| 686 | __entry->hdr.callNumber, __entry->hdr.serviceId, |
| 687 | __entry->hdr.serial, __entry->hdr.seq, |
David Howells | a3868bf | 2016-09-17 10:49:13 +0100 | [diff] [blame] | 688 | __entry->hdr.type, __entry->hdr.flags, |
David Howells | b54a134 | 2017-01-05 10:38:33 +0000 | [diff] [blame] | 689 | __entry->hdr.type <= 15 ? |
| 690 | __print_symbolic(__entry->hdr.type, rxrpc_pkts) : "?UNK") |
David Howells | 49e19ec | 2016-09-08 11:10:12 +0100 | [diff] [blame] | 691 | ); |
| 692 | |
| 693 | TRACE_EVENT(rxrpc_rx_done, |
| 694 | TP_PROTO(int result, int abort_code), |
| 695 | |
| 696 | TP_ARGS(result, abort_code), |
| 697 | |
| 698 | TP_STRUCT__entry( |
| 699 | __field(int, result ) |
| 700 | __field(int, abort_code ) |
| 701 | ), |
| 702 | |
| 703 | TP_fast_assign( |
| 704 | __entry->result = result; |
| 705 | __entry->abort_code = abort_code; |
| 706 | ), |
| 707 | |
| 708 | TP_printk("r=%d a=%d", __entry->result, __entry->abort_code) |
| 709 | ); |
| 710 | |
David Howells | 5a42976 | 2016-09-06 22:19:51 +0100 | [diff] [blame] | 711 | TRACE_EVENT(rxrpc_abort, |
David Howells | a25e21f | 2018-03-27 23:03:00 +0100 | [diff] [blame] | 712 | TP_PROTO(unsigned int call_nr, const char *why, u32 cid, u32 call_id, |
| 713 | rxrpc_seq_t seq, int abort_code, int error), |
David Howells | 5a42976 | 2016-09-06 22:19:51 +0100 | [diff] [blame] | 714 | |
David Howells | a25e21f | 2018-03-27 23:03:00 +0100 | [diff] [blame] | 715 | TP_ARGS(call_nr, why, cid, call_id, seq, abort_code, error), |
David Howells | 5a42976 | 2016-09-06 22:19:51 +0100 | [diff] [blame] | 716 | |
| 717 | TP_STRUCT__entry( |
David Howells | a25e21f | 2018-03-27 23:03:00 +0100 | [diff] [blame] | 718 | __field(unsigned int, call_nr ) |
David Howells | 5a42976 | 2016-09-06 22:19:51 +0100 | [diff] [blame] | 719 | __array(char, why, 4 ) |
| 720 | __field(u32, cid ) |
| 721 | __field(u32, call_id ) |
| 722 | __field(rxrpc_seq_t, seq ) |
| 723 | __field(int, abort_code ) |
| 724 | __field(int, error ) |
| 725 | ), |
| 726 | |
| 727 | TP_fast_assign( |
| 728 | memcpy(__entry->why, why, 4); |
David Howells | a25e21f | 2018-03-27 23:03:00 +0100 | [diff] [blame] | 729 | __entry->call_nr = call_nr; |
David Howells | 5a42976 | 2016-09-06 22:19:51 +0100 | [diff] [blame] | 730 | __entry->cid = cid; |
| 731 | __entry->call_id = call_id; |
| 732 | __entry->abort_code = abort_code; |
| 733 | __entry->error = error; |
| 734 | __entry->seq = seq; |
| 735 | ), |
| 736 | |
David Howells | a25e21f | 2018-03-27 23:03:00 +0100 | [diff] [blame] | 737 | TP_printk("c=%08x %08x:%08x s=%u a=%d e=%d %s", |
| 738 | __entry->call_nr, |
David Howells | 5a42976 | 2016-09-06 22:19:51 +0100 | [diff] [blame] | 739 | __entry->cid, __entry->call_id, __entry->seq, |
| 740 | __entry->abort_code, __entry->error, __entry->why) |
| 741 | ); |
| 742 | |
David Howells | 1bae5d2 | 2018-03-27 23:08:20 +0100 | [diff] [blame] | 743 | TRACE_EVENT(rxrpc_call_complete, |
| 744 | TP_PROTO(struct rxrpc_call *call), |
| 745 | |
| 746 | TP_ARGS(call), |
| 747 | |
| 748 | TP_STRUCT__entry( |
| 749 | __field(unsigned int, call ) |
| 750 | __field(enum rxrpc_call_completion, compl ) |
| 751 | __field(int, error ) |
| 752 | __field(u32, abort_code ) |
| 753 | ), |
| 754 | |
| 755 | TP_fast_assign( |
| 756 | __entry->call = call->debug_id; |
| 757 | __entry->compl = call->completion; |
| 758 | __entry->error = call->error; |
| 759 | __entry->abort_code = call->abort_code; |
| 760 | ), |
| 761 | |
| 762 | TP_printk("c=%08x %s r=%d ac=%d", |
| 763 | __entry->call, |
| 764 | __print_symbolic(__entry->compl, rxrpc_completions), |
| 765 | __entry->error, |
| 766 | __entry->abort_code) |
| 767 | ); |
| 768 | |
David Howells | a124fe3 | 2016-09-17 10:49:13 +0100 | [diff] [blame] | 769 | TRACE_EVENT(rxrpc_transmit, |
| 770 | TP_PROTO(struct rxrpc_call *call, enum rxrpc_transmit_trace why), |
| 771 | |
| 772 | TP_ARGS(call, why), |
| 773 | |
| 774 | TP_STRUCT__entry( |
David Howells | a25e21f | 2018-03-27 23:03:00 +0100 | [diff] [blame] | 775 | __field(unsigned int, call ) |
David Howells | a124fe3 | 2016-09-17 10:49:13 +0100 | [diff] [blame] | 776 | __field(enum rxrpc_transmit_trace, why ) |
| 777 | __field(rxrpc_seq_t, tx_hard_ack ) |
| 778 | __field(rxrpc_seq_t, tx_top ) |
David Howells | b1d9f7fd | 2017-01-05 10:38:34 +0000 | [diff] [blame] | 779 | __field(int, tx_winsize ) |
David Howells | a124fe3 | 2016-09-17 10:49:13 +0100 | [diff] [blame] | 780 | ), |
| 781 | |
| 782 | TP_fast_assign( |
David Howells | a25e21f | 2018-03-27 23:03:00 +0100 | [diff] [blame] | 783 | __entry->call = call->debug_id; |
David Howells | a124fe3 | 2016-09-17 10:49:13 +0100 | [diff] [blame] | 784 | __entry->why = why; |
| 785 | __entry->tx_hard_ack = call->tx_hard_ack; |
| 786 | __entry->tx_top = call->tx_top; |
David Howells | b1d9f7fd | 2017-01-05 10:38:34 +0000 | [diff] [blame] | 787 | __entry->tx_winsize = call->tx_winsize; |
David Howells | a124fe3 | 2016-09-17 10:49:13 +0100 | [diff] [blame] | 788 | ), |
| 789 | |
David Howells | a25e21f | 2018-03-27 23:03:00 +0100 | [diff] [blame] | 790 | TP_printk("c=%08x %s f=%08x n=%u/%u", |
David Howells | a124fe3 | 2016-09-17 10:49:13 +0100 | [diff] [blame] | 791 | __entry->call, |
David Howells | b54a134 | 2017-01-05 10:38:33 +0000 | [diff] [blame] | 792 | __print_symbolic(__entry->why, rxrpc_transmit_traces), |
David Howells | a124fe3 | 2016-09-17 10:49:13 +0100 | [diff] [blame] | 793 | __entry->tx_hard_ack + 1, |
David Howells | b1d9f7fd | 2017-01-05 10:38:34 +0000 | [diff] [blame] | 794 | __entry->tx_top - __entry->tx_hard_ack, |
| 795 | __entry->tx_winsize) |
David Howells | a124fe3 | 2016-09-17 10:49:13 +0100 | [diff] [blame] | 796 | ); |
| 797 | |
David Howells | b1d9f7fd | 2017-01-05 10:38:34 +0000 | [diff] [blame] | 798 | TRACE_EVENT(rxrpc_rx_data, |
David Howells | 4764c0d | 2018-07-23 17:18:37 +0100 | [diff] [blame] | 799 | TP_PROTO(unsigned int call, rxrpc_seq_t seq, |
David Howells | b1d9f7fd | 2017-01-05 10:38:34 +0000 | [diff] [blame] | 800 | rxrpc_serial_t serial, u8 flags, u8 anno), |
David Howells | ec71eb9 | 2016-09-17 10:49:13 +0100 | [diff] [blame] | 801 | |
David Howells | b1d9f7fd | 2017-01-05 10:38:34 +0000 | [diff] [blame] | 802 | TP_ARGS(call, seq, serial, flags, anno), |
David Howells | ec71eb9 | 2016-09-17 10:49:13 +0100 | [diff] [blame] | 803 | |
| 804 | TP_STRUCT__entry( |
David Howells | a25e21f | 2018-03-27 23:03:00 +0100 | [diff] [blame] | 805 | __field(unsigned int, call ) |
David Howells | b1d9f7fd | 2017-01-05 10:38:34 +0000 | [diff] [blame] | 806 | __field(rxrpc_seq_t, seq ) |
| 807 | __field(rxrpc_serial_t, serial ) |
| 808 | __field(u8, flags ) |
| 809 | __field(u8, anno ) |
| 810 | ), |
| 811 | |
| 812 | TP_fast_assign( |
David Howells | 4764c0d | 2018-07-23 17:18:37 +0100 | [diff] [blame] | 813 | __entry->call = call; |
David Howells | b1d9f7fd | 2017-01-05 10:38:34 +0000 | [diff] [blame] | 814 | __entry->seq = seq; |
| 815 | __entry->serial = serial; |
| 816 | __entry->flags = flags; |
| 817 | __entry->anno = anno; |
| 818 | ), |
| 819 | |
David Howells | a25e21f | 2018-03-27 23:03:00 +0100 | [diff] [blame] | 820 | TP_printk("c=%08x DATA %08x q=%08x fl=%02x a=%02x", |
David Howells | b1d9f7fd | 2017-01-05 10:38:34 +0000 | [diff] [blame] | 821 | __entry->call, |
| 822 | __entry->serial, |
| 823 | __entry->seq, |
| 824 | __entry->flags, |
| 825 | __entry->anno) |
| 826 | ); |
| 827 | |
| 828 | TRACE_EVENT(rxrpc_rx_ack, |
| 829 | TP_PROTO(struct rxrpc_call *call, |
| 830 | rxrpc_serial_t serial, rxrpc_serial_t ack_serial, |
| 831 | rxrpc_seq_t first, rxrpc_seq_t prev, u8 reason, u8 n_acks), |
| 832 | |
| 833 | TP_ARGS(call, serial, ack_serial, first, prev, reason, n_acks), |
| 834 | |
| 835 | TP_STRUCT__entry( |
David Howells | a25e21f | 2018-03-27 23:03:00 +0100 | [diff] [blame] | 836 | __field(unsigned int, call ) |
David Howells | b1d9f7fd | 2017-01-05 10:38:34 +0000 | [diff] [blame] | 837 | __field(rxrpc_serial_t, serial ) |
| 838 | __field(rxrpc_serial_t, ack_serial ) |
David Howells | ec71eb9 | 2016-09-17 10:49:13 +0100 | [diff] [blame] | 839 | __field(rxrpc_seq_t, first ) |
David Howells | b1d9f7fd | 2017-01-05 10:38:34 +0000 | [diff] [blame] | 840 | __field(rxrpc_seq_t, prev ) |
David Howells | ec71eb9 | 2016-09-17 10:49:13 +0100 | [diff] [blame] | 841 | __field(u8, reason ) |
| 842 | __field(u8, n_acks ) |
| 843 | ), |
| 844 | |
| 845 | TP_fast_assign( |
David Howells | a25e21f | 2018-03-27 23:03:00 +0100 | [diff] [blame] | 846 | __entry->call = call->debug_id; |
David Howells | b1d9f7fd | 2017-01-05 10:38:34 +0000 | [diff] [blame] | 847 | __entry->serial = serial; |
| 848 | __entry->ack_serial = ack_serial; |
David Howells | ec71eb9 | 2016-09-17 10:49:13 +0100 | [diff] [blame] | 849 | __entry->first = first; |
David Howells | b1d9f7fd | 2017-01-05 10:38:34 +0000 | [diff] [blame] | 850 | __entry->prev = prev; |
David Howells | ec71eb9 | 2016-09-17 10:49:13 +0100 | [diff] [blame] | 851 | __entry->reason = reason; |
| 852 | __entry->n_acks = n_acks; |
| 853 | ), |
| 854 | |
David Howells | a25e21f | 2018-03-27 23:03:00 +0100 | [diff] [blame] | 855 | TP_printk("c=%08x %08x %s r=%08x f=%08x p=%08x n=%u", |
David Howells | ec71eb9 | 2016-09-17 10:49:13 +0100 | [diff] [blame] | 856 | __entry->call, |
David Howells | b1d9f7fd | 2017-01-05 10:38:34 +0000 | [diff] [blame] | 857 | __entry->serial, |
David Howells | b54a134 | 2017-01-05 10:38:33 +0000 | [diff] [blame] | 858 | __print_symbolic(__entry->reason, rxrpc_ack_names), |
David Howells | b1d9f7fd | 2017-01-05 10:38:34 +0000 | [diff] [blame] | 859 | __entry->ack_serial, |
David Howells | ec71eb9 | 2016-09-17 10:49:13 +0100 | [diff] [blame] | 860 | __entry->first, |
David Howells | b1d9f7fd | 2017-01-05 10:38:34 +0000 | [diff] [blame] | 861 | __entry->prev, |
David Howells | ec71eb9 | 2016-09-17 10:49:13 +0100 | [diff] [blame] | 862 | __entry->n_acks) |
| 863 | ); |
| 864 | |
David Howells | 005ede2 | 2017-04-06 10:12:00 +0100 | [diff] [blame] | 865 | TRACE_EVENT(rxrpc_rx_abort, |
| 866 | TP_PROTO(struct rxrpc_call *call, rxrpc_serial_t serial, |
| 867 | u32 abort_code), |
| 868 | |
| 869 | TP_ARGS(call, serial, abort_code), |
| 870 | |
| 871 | TP_STRUCT__entry( |
David Howells | a25e21f | 2018-03-27 23:03:00 +0100 | [diff] [blame] | 872 | __field(unsigned int, call ) |
David Howells | 005ede2 | 2017-04-06 10:12:00 +0100 | [diff] [blame] | 873 | __field(rxrpc_serial_t, serial ) |
| 874 | __field(u32, abort_code ) |
| 875 | ), |
| 876 | |
| 877 | TP_fast_assign( |
David Howells | a25e21f | 2018-03-27 23:03:00 +0100 | [diff] [blame] | 878 | __entry->call = call->debug_id; |
David Howells | 005ede2 | 2017-04-06 10:12:00 +0100 | [diff] [blame] | 879 | __entry->serial = serial; |
| 880 | __entry->abort_code = abort_code; |
| 881 | ), |
| 882 | |
David Howells | a25e21f | 2018-03-27 23:03:00 +0100 | [diff] [blame] | 883 | TP_printk("c=%08x ABORT %08x ac=%d", |
David Howells | 005ede2 | 2017-04-06 10:12:00 +0100 | [diff] [blame] | 884 | __entry->call, |
| 885 | __entry->serial, |
| 886 | __entry->abort_code) |
| 887 | ); |
| 888 | |
David Howells | 740586d | 2017-04-06 10:12:00 +0100 | [diff] [blame] | 889 | TRACE_EVENT(rxrpc_rx_rwind_change, |
| 890 | TP_PROTO(struct rxrpc_call *call, rxrpc_serial_t serial, |
| 891 | u32 rwind, bool wake), |
| 892 | |
| 893 | TP_ARGS(call, serial, rwind, wake), |
| 894 | |
| 895 | TP_STRUCT__entry( |
David Howells | a25e21f | 2018-03-27 23:03:00 +0100 | [diff] [blame] | 896 | __field(unsigned int, call ) |
David Howells | 740586d | 2017-04-06 10:12:00 +0100 | [diff] [blame] | 897 | __field(rxrpc_serial_t, serial ) |
| 898 | __field(u32, rwind ) |
| 899 | __field(bool, wake ) |
| 900 | ), |
| 901 | |
| 902 | TP_fast_assign( |
David Howells | a25e21f | 2018-03-27 23:03:00 +0100 | [diff] [blame] | 903 | __entry->call = call->debug_id; |
David Howells | 740586d | 2017-04-06 10:12:00 +0100 | [diff] [blame] | 904 | __entry->serial = serial; |
| 905 | __entry->rwind = rwind; |
| 906 | __entry->wake = wake; |
| 907 | ), |
| 908 | |
David Howells | a25e21f | 2018-03-27 23:03:00 +0100 | [diff] [blame] | 909 | TP_printk("c=%08x %08x rw=%u%s", |
David Howells | 740586d | 2017-04-06 10:12:00 +0100 | [diff] [blame] | 910 | __entry->call, |
| 911 | __entry->serial, |
| 912 | __entry->rwind, |
| 913 | __entry->wake ? " wake" : "") |
| 914 | ); |
| 915 | |
David Howells | 4764c0d | 2018-07-23 17:18:37 +0100 | [diff] [blame] | 916 | TRACE_EVENT(rxrpc_tx_packet, |
| 917 | TP_PROTO(unsigned int call_id, struct rxrpc_wire_header *whdr, |
| 918 | enum rxrpc_tx_point where), |
| 919 | |
| 920 | TP_ARGS(call_id, whdr, where), |
| 921 | |
| 922 | TP_STRUCT__entry( |
| 923 | __field(unsigned int, call ) |
| 924 | __field(enum rxrpc_tx_point, where ) |
| 925 | __field_struct(struct rxrpc_wire_header, whdr ) |
| 926 | ), |
| 927 | |
| 928 | TP_fast_assign( |
| 929 | __entry->call = call_id; |
| 930 | memcpy(&__entry->whdr, whdr, sizeof(__entry->whdr)); |
David Howells | 4e2abd3 | 2018-10-08 19:44:39 +0100 | [diff] [blame] | 931 | __entry->where = where; |
David Howells | 4764c0d | 2018-07-23 17:18:37 +0100 | [diff] [blame] | 932 | ), |
| 933 | |
| 934 | TP_printk("c=%08x %08x:%08x:%08x:%04x %08x %08x %02x %02x %s %s", |
| 935 | __entry->call, |
| 936 | ntohl(__entry->whdr.epoch), |
| 937 | ntohl(__entry->whdr.cid), |
| 938 | ntohl(__entry->whdr.callNumber), |
| 939 | ntohs(__entry->whdr.serviceId), |
| 940 | ntohl(__entry->whdr.serial), |
| 941 | ntohl(__entry->whdr.seq), |
| 942 | __entry->whdr.type, __entry->whdr.flags, |
| 943 | __entry->whdr.type <= 15 ? |
| 944 | __print_symbolic(__entry->whdr.type, rxrpc_pkts) : "?UNK", |
| 945 | __print_symbolic(__entry->where, rxrpc_tx_points)) |
| 946 | ); |
| 947 | |
David Howells | be832ae | 2016-09-23 12:39:22 +0100 | [diff] [blame] | 948 | TRACE_EVENT(rxrpc_tx_data, |
| 949 | TP_PROTO(struct rxrpc_call *call, rxrpc_seq_t seq, |
David Howells | a176707 | 2016-09-29 22:37:15 +0100 | [diff] [blame] | 950 | rxrpc_serial_t serial, u8 flags, bool retrans, bool lose), |
David Howells | f3639df | 2016-09-17 10:49:13 +0100 | [diff] [blame] | 951 | |
David Howells | a176707 | 2016-09-29 22:37:15 +0100 | [diff] [blame] | 952 | TP_ARGS(call, seq, serial, flags, retrans, lose), |
David Howells | f3639df | 2016-09-17 10:49:13 +0100 | [diff] [blame] | 953 | |
| 954 | TP_STRUCT__entry( |
David Howells | a25e21f | 2018-03-27 23:03:00 +0100 | [diff] [blame] | 955 | __field(unsigned int, call ) |
David Howells | be832ae | 2016-09-23 12:39:22 +0100 | [diff] [blame] | 956 | __field(rxrpc_seq_t, seq ) |
David Howells | f3639df | 2016-09-17 10:49:13 +0100 | [diff] [blame] | 957 | __field(rxrpc_serial_t, serial ) |
David Howells | 4764c0d | 2018-07-23 17:18:37 +0100 | [diff] [blame] | 958 | __field(u32, cid ) |
| 959 | __field(u32, call_id ) |
David Howells | be832ae | 2016-09-23 12:39:22 +0100 | [diff] [blame] | 960 | __field(u8, flags ) |
David Howells | a176707 | 2016-09-29 22:37:15 +0100 | [diff] [blame] | 961 | __field(bool, retrans ) |
David Howells | be832ae | 2016-09-23 12:39:22 +0100 | [diff] [blame] | 962 | __field(bool, lose ) |
| 963 | ), |
| 964 | |
| 965 | TP_fast_assign( |
David Howells | a25e21f | 2018-03-27 23:03:00 +0100 | [diff] [blame] | 966 | __entry->call = call->debug_id; |
David Howells | 4764c0d | 2018-07-23 17:18:37 +0100 | [diff] [blame] | 967 | __entry->cid = call->cid; |
| 968 | __entry->call_id = call->call_id; |
David Howells | be832ae | 2016-09-23 12:39:22 +0100 | [diff] [blame] | 969 | __entry->seq = seq; |
| 970 | __entry->serial = serial; |
| 971 | __entry->flags = flags; |
David Howells | a176707 | 2016-09-29 22:37:15 +0100 | [diff] [blame] | 972 | __entry->retrans = retrans; |
David Howells | be832ae | 2016-09-23 12:39:22 +0100 | [diff] [blame] | 973 | __entry->lose = lose; |
| 974 | ), |
| 975 | |
David Howells | 4764c0d | 2018-07-23 17:18:37 +0100 | [diff] [blame] | 976 | TP_printk("c=%08x DATA %08x:%08x %08x q=%08x fl=%02x%s%s", |
David Howells | be832ae | 2016-09-23 12:39:22 +0100 | [diff] [blame] | 977 | __entry->call, |
David Howells | 4764c0d | 2018-07-23 17:18:37 +0100 | [diff] [blame] | 978 | __entry->cid, |
| 979 | __entry->call_id, |
David Howells | be832ae | 2016-09-23 12:39:22 +0100 | [diff] [blame] | 980 | __entry->serial, |
| 981 | __entry->seq, |
| 982 | __entry->flags, |
David Howells | 265a44b | 2016-09-30 08:50:42 +0100 | [diff] [blame] | 983 | __entry->retrans ? " *RETRANS*" : "", |
David Howells | be832ae | 2016-09-23 12:39:22 +0100 | [diff] [blame] | 984 | __entry->lose ? " *LOSE*" : "") |
| 985 | ); |
| 986 | |
| 987 | TRACE_EVENT(rxrpc_tx_ack, |
David Howells | 4764c0d | 2018-07-23 17:18:37 +0100 | [diff] [blame] | 988 | TP_PROTO(unsigned int call, rxrpc_serial_t serial, |
David Howells | be832ae | 2016-09-23 12:39:22 +0100 | [diff] [blame] | 989 | rxrpc_seq_t ack_first, rxrpc_serial_t ack_serial, |
| 990 | u8 reason, u8 n_acks), |
| 991 | |
| 992 | TP_ARGS(call, serial, ack_first, ack_serial, reason, n_acks), |
| 993 | |
| 994 | TP_STRUCT__entry( |
David Howells | a25e21f | 2018-03-27 23:03:00 +0100 | [diff] [blame] | 995 | __field(unsigned int, call ) |
David Howells | be832ae | 2016-09-23 12:39:22 +0100 | [diff] [blame] | 996 | __field(rxrpc_serial_t, serial ) |
| 997 | __field(rxrpc_seq_t, ack_first ) |
| 998 | __field(rxrpc_serial_t, ack_serial ) |
David Howells | f3639df | 2016-09-17 10:49:13 +0100 | [diff] [blame] | 999 | __field(u8, reason ) |
| 1000 | __field(u8, n_acks ) |
| 1001 | ), |
| 1002 | |
| 1003 | TP_fast_assign( |
David Howells | 4764c0d | 2018-07-23 17:18:37 +0100 | [diff] [blame] | 1004 | __entry->call = call; |
David Howells | f3639df | 2016-09-17 10:49:13 +0100 | [diff] [blame] | 1005 | __entry->serial = serial; |
David Howells | be832ae | 2016-09-23 12:39:22 +0100 | [diff] [blame] | 1006 | __entry->ack_first = ack_first; |
| 1007 | __entry->ack_serial = ack_serial; |
David Howells | f3639df | 2016-09-17 10:49:13 +0100 | [diff] [blame] | 1008 | __entry->reason = reason; |
| 1009 | __entry->n_acks = n_acks; |
| 1010 | ), |
| 1011 | |
David Howells | a25e21f | 2018-03-27 23:03:00 +0100 | [diff] [blame] | 1012 | TP_printk(" c=%08x ACK %08x %s f=%08x r=%08x n=%u", |
David Howells | f3639df | 2016-09-17 10:49:13 +0100 | [diff] [blame] | 1013 | __entry->call, |
David Howells | f3639df | 2016-09-17 10:49:13 +0100 | [diff] [blame] | 1014 | __entry->serial, |
David Howells | b54a134 | 2017-01-05 10:38:33 +0000 | [diff] [blame] | 1015 | __print_symbolic(__entry->reason, rxrpc_ack_names), |
David Howells | be832ae | 2016-09-23 12:39:22 +0100 | [diff] [blame] | 1016 | __entry->ack_first, |
| 1017 | __entry->ack_serial, |
David Howells | f3639df | 2016-09-17 10:49:13 +0100 | [diff] [blame] | 1018 | __entry->n_acks) |
| 1019 | ); |
| 1020 | |
David Howells | 58dc63c | 2016-09-17 10:49:13 +0100 | [diff] [blame] | 1021 | TRACE_EVENT(rxrpc_receive, |
| 1022 | TP_PROTO(struct rxrpc_call *call, enum rxrpc_receive_trace why, |
| 1023 | rxrpc_serial_t serial, rxrpc_seq_t seq), |
| 1024 | |
| 1025 | TP_ARGS(call, why, serial, seq), |
| 1026 | |
| 1027 | TP_STRUCT__entry( |
David Howells | a25e21f | 2018-03-27 23:03:00 +0100 | [diff] [blame] | 1028 | __field(unsigned int, call ) |
David Howells | 58dc63c | 2016-09-17 10:49:13 +0100 | [diff] [blame] | 1029 | __field(enum rxrpc_receive_trace, why ) |
| 1030 | __field(rxrpc_serial_t, serial ) |
| 1031 | __field(rxrpc_seq_t, seq ) |
| 1032 | __field(rxrpc_seq_t, hard_ack ) |
| 1033 | __field(rxrpc_seq_t, top ) |
| 1034 | ), |
| 1035 | |
| 1036 | TP_fast_assign( |
David Howells | a25e21f | 2018-03-27 23:03:00 +0100 | [diff] [blame] | 1037 | __entry->call = call->debug_id; |
David Howells | 58dc63c | 2016-09-17 10:49:13 +0100 | [diff] [blame] | 1038 | __entry->why = why; |
| 1039 | __entry->serial = serial; |
| 1040 | __entry->seq = seq; |
| 1041 | __entry->hard_ack = call->rx_hard_ack; |
| 1042 | __entry->top = call->rx_top; |
| 1043 | ), |
| 1044 | |
David Howells | a25e21f | 2018-03-27 23:03:00 +0100 | [diff] [blame] | 1045 | TP_printk("c=%08x %s r=%08x q=%08x w=%08x-%08x", |
David Howells | 58dc63c | 2016-09-17 10:49:13 +0100 | [diff] [blame] | 1046 | __entry->call, |
David Howells | b54a134 | 2017-01-05 10:38:33 +0000 | [diff] [blame] | 1047 | __print_symbolic(__entry->why, rxrpc_receive_traces), |
David Howells | 58dc63c | 2016-09-17 10:49:13 +0100 | [diff] [blame] | 1048 | __entry->serial, |
| 1049 | __entry->seq, |
| 1050 | __entry->hard_ack, |
| 1051 | __entry->top) |
| 1052 | ); |
| 1053 | |
David Howells | 8499790 | 2016-09-17 11:13:31 +0100 | [diff] [blame] | 1054 | TRACE_EVENT(rxrpc_recvmsg, |
| 1055 | TP_PROTO(struct rxrpc_call *call, enum rxrpc_recvmsg_trace why, |
| 1056 | rxrpc_seq_t seq, unsigned int offset, unsigned int len, |
| 1057 | int ret), |
| 1058 | |
| 1059 | TP_ARGS(call, why, seq, offset, len, ret), |
| 1060 | |
| 1061 | TP_STRUCT__entry( |
David Howells | a25e21f | 2018-03-27 23:03:00 +0100 | [diff] [blame] | 1062 | __field(unsigned int, call ) |
David Howells | 8499790 | 2016-09-17 11:13:31 +0100 | [diff] [blame] | 1063 | __field(enum rxrpc_recvmsg_trace, why ) |
| 1064 | __field(rxrpc_seq_t, seq ) |
| 1065 | __field(unsigned int, offset ) |
| 1066 | __field(unsigned int, len ) |
| 1067 | __field(int, ret ) |
| 1068 | ), |
| 1069 | |
| 1070 | TP_fast_assign( |
David Howells | a25e21f | 2018-03-27 23:03:00 +0100 | [diff] [blame] | 1071 | __entry->call = call->debug_id; |
David Howells | 8499790 | 2016-09-17 11:13:31 +0100 | [diff] [blame] | 1072 | __entry->why = why; |
| 1073 | __entry->seq = seq; |
| 1074 | __entry->offset = offset; |
| 1075 | __entry->len = len; |
| 1076 | __entry->ret = ret; |
| 1077 | ), |
| 1078 | |
David Howells | a25e21f | 2018-03-27 23:03:00 +0100 | [diff] [blame] | 1079 | TP_printk("c=%08x %s q=%08x o=%u l=%u ret=%d", |
David Howells | 8499790 | 2016-09-17 11:13:31 +0100 | [diff] [blame] | 1080 | __entry->call, |
David Howells | b54a134 | 2017-01-05 10:38:33 +0000 | [diff] [blame] | 1081 | __print_symbolic(__entry->why, rxrpc_recvmsg_traces), |
David Howells | 8499790 | 2016-09-17 11:13:31 +0100 | [diff] [blame] | 1082 | __entry->seq, |
| 1083 | __entry->offset, |
| 1084 | __entry->len, |
| 1085 | __entry->ret) |
| 1086 | ); |
| 1087 | |
David Howells | cf1a647 | 2016-09-22 00:41:53 +0100 | [diff] [blame] | 1088 | TRACE_EVENT(rxrpc_rtt_tx, |
| 1089 | TP_PROTO(struct rxrpc_call *call, enum rxrpc_rtt_tx_trace why, |
| 1090 | rxrpc_serial_t send_serial), |
| 1091 | |
| 1092 | TP_ARGS(call, why, send_serial), |
| 1093 | |
| 1094 | TP_STRUCT__entry( |
David Howells | a25e21f | 2018-03-27 23:03:00 +0100 | [diff] [blame] | 1095 | __field(unsigned int, call ) |
David Howells | cf1a647 | 2016-09-22 00:41:53 +0100 | [diff] [blame] | 1096 | __field(enum rxrpc_rtt_tx_trace, why ) |
| 1097 | __field(rxrpc_serial_t, send_serial ) |
| 1098 | ), |
| 1099 | |
| 1100 | TP_fast_assign( |
David Howells | a25e21f | 2018-03-27 23:03:00 +0100 | [diff] [blame] | 1101 | __entry->call = call->debug_id; |
David Howells | cf1a647 | 2016-09-22 00:41:53 +0100 | [diff] [blame] | 1102 | __entry->why = why; |
| 1103 | __entry->send_serial = send_serial; |
| 1104 | ), |
| 1105 | |
David Howells | a25e21f | 2018-03-27 23:03:00 +0100 | [diff] [blame] | 1106 | TP_printk("c=%08x %s sr=%08x", |
David Howells | cf1a647 | 2016-09-22 00:41:53 +0100 | [diff] [blame] | 1107 | __entry->call, |
David Howells | b54a134 | 2017-01-05 10:38:33 +0000 | [diff] [blame] | 1108 | __print_symbolic(__entry->why, rxrpc_rtt_tx_traces), |
David Howells | cf1a647 | 2016-09-22 00:41:53 +0100 | [diff] [blame] | 1109 | __entry->send_serial) |
| 1110 | ); |
| 1111 | |
| 1112 | TRACE_EVENT(rxrpc_rtt_rx, |
| 1113 | TP_PROTO(struct rxrpc_call *call, enum rxrpc_rtt_rx_trace why, |
| 1114 | rxrpc_serial_t send_serial, rxrpc_serial_t resp_serial, |
| 1115 | s64 rtt, u8 nr, s64 avg), |
| 1116 | |
| 1117 | TP_ARGS(call, why, send_serial, resp_serial, rtt, nr, avg), |
| 1118 | |
| 1119 | TP_STRUCT__entry( |
David Howells | a25e21f | 2018-03-27 23:03:00 +0100 | [diff] [blame] | 1120 | __field(unsigned int, call ) |
David Howells | cf1a647 | 2016-09-22 00:41:53 +0100 | [diff] [blame] | 1121 | __field(enum rxrpc_rtt_rx_trace, why ) |
| 1122 | __field(u8, nr ) |
| 1123 | __field(rxrpc_serial_t, send_serial ) |
| 1124 | __field(rxrpc_serial_t, resp_serial ) |
| 1125 | __field(s64, rtt ) |
| 1126 | __field(u64, avg ) |
| 1127 | ), |
| 1128 | |
| 1129 | TP_fast_assign( |
David Howells | a25e21f | 2018-03-27 23:03:00 +0100 | [diff] [blame] | 1130 | __entry->call = call->debug_id; |
David Howells | cf1a647 | 2016-09-22 00:41:53 +0100 | [diff] [blame] | 1131 | __entry->why = why; |
| 1132 | __entry->send_serial = send_serial; |
| 1133 | __entry->resp_serial = resp_serial; |
| 1134 | __entry->rtt = rtt; |
| 1135 | __entry->nr = nr; |
| 1136 | __entry->avg = avg; |
| 1137 | ), |
| 1138 | |
David Howells | a25e21f | 2018-03-27 23:03:00 +0100 | [diff] [blame] | 1139 | TP_printk("c=%08x %s sr=%08x rr=%08x rtt=%lld nr=%u avg=%lld", |
David Howells | cf1a647 | 2016-09-22 00:41:53 +0100 | [diff] [blame] | 1140 | __entry->call, |
David Howells | b54a134 | 2017-01-05 10:38:33 +0000 | [diff] [blame] | 1141 | __print_symbolic(__entry->why, rxrpc_rtt_rx_traces), |
David Howells | cf1a647 | 2016-09-22 00:41:53 +0100 | [diff] [blame] | 1142 | __entry->send_serial, |
| 1143 | __entry->resp_serial, |
| 1144 | __entry->rtt, |
| 1145 | __entry->nr, |
| 1146 | __entry->avg) |
| 1147 | ); |
| 1148 | |
David Howells | fc7ab6d | 2016-09-23 15:22:36 +0100 | [diff] [blame] | 1149 | TRACE_EVENT(rxrpc_timer, |
| 1150 | TP_PROTO(struct rxrpc_call *call, enum rxrpc_timer_trace why, |
David Howells | a158bdd | 2017-11-24 10:18:41 +0000 | [diff] [blame] | 1151 | unsigned long now), |
David Howells | fc7ab6d | 2016-09-23 15:22:36 +0100 | [diff] [blame] | 1152 | |
David Howells | a158bdd | 2017-11-24 10:18:41 +0000 | [diff] [blame] | 1153 | TP_ARGS(call, why, now), |
David Howells | fc7ab6d | 2016-09-23 15:22:36 +0100 | [diff] [blame] | 1154 | |
| 1155 | TP_STRUCT__entry( |
David Howells | a25e21f | 2018-03-27 23:03:00 +0100 | [diff] [blame] | 1156 | __field(unsigned int, call ) |
David Howells | fc7ab6d | 2016-09-23 15:22:36 +0100 | [diff] [blame] | 1157 | __field(enum rxrpc_timer_trace, why ) |
David Howells | a158bdd | 2017-11-24 10:18:41 +0000 | [diff] [blame] | 1158 | __field(long, now ) |
| 1159 | __field(long, ack_at ) |
David Howells | bd1fdf8 | 2017-11-24 10:18:42 +0000 | [diff] [blame] | 1160 | __field(long, ack_lost_at ) |
David Howells | a158bdd | 2017-11-24 10:18:41 +0000 | [diff] [blame] | 1161 | __field(long, resend_at ) |
| 1162 | __field(long, ping_at ) |
| 1163 | __field(long, expect_rx_by ) |
| 1164 | __field(long, expect_req_by ) |
| 1165 | __field(long, expect_term_by ) |
| 1166 | __field(long, timer ) |
David Howells | fc7ab6d | 2016-09-23 15:22:36 +0100 | [diff] [blame] | 1167 | ), |
| 1168 | |
| 1169 | TP_fast_assign( |
David Howells | a25e21f | 2018-03-27 23:03:00 +0100 | [diff] [blame] | 1170 | __entry->call = call->debug_id; |
David Howells | a158bdd | 2017-11-24 10:18:41 +0000 | [diff] [blame] | 1171 | __entry->why = why; |
| 1172 | __entry->now = now; |
| 1173 | __entry->ack_at = call->ack_at; |
David Howells | bd1fdf8 | 2017-11-24 10:18:42 +0000 | [diff] [blame] | 1174 | __entry->ack_lost_at = call->ack_lost_at; |
David Howells | a158bdd | 2017-11-24 10:18:41 +0000 | [diff] [blame] | 1175 | __entry->resend_at = call->resend_at; |
| 1176 | __entry->expect_rx_by = call->expect_rx_by; |
| 1177 | __entry->expect_req_by = call->expect_req_by; |
| 1178 | __entry->expect_term_by = call->expect_term_by; |
| 1179 | __entry->timer = call->timer.expires; |
David Howells | fc7ab6d | 2016-09-23 15:22:36 +0100 | [diff] [blame] | 1180 | ), |
| 1181 | |
David Howells | a25e21f | 2018-03-27 23:03:00 +0100 | [diff] [blame] | 1182 | TP_printk("c=%08x %s a=%ld la=%ld r=%ld xr=%ld xq=%ld xt=%ld t=%ld", |
David Howells | fc7ab6d | 2016-09-23 15:22:36 +0100 | [diff] [blame] | 1183 | __entry->call, |
David Howells | b54a134 | 2017-01-05 10:38:33 +0000 | [diff] [blame] | 1184 | __print_symbolic(__entry->why, rxrpc_timer_traces), |
David Howells | a158bdd | 2017-11-24 10:18:41 +0000 | [diff] [blame] | 1185 | __entry->ack_at - __entry->now, |
David Howells | bd1fdf8 | 2017-11-24 10:18:42 +0000 | [diff] [blame] | 1186 | __entry->ack_lost_at - __entry->now, |
David Howells | a158bdd | 2017-11-24 10:18:41 +0000 | [diff] [blame] | 1187 | __entry->resend_at - __entry->now, |
| 1188 | __entry->expect_rx_by - __entry->now, |
| 1189 | __entry->expect_req_by - __entry->now, |
| 1190 | __entry->expect_term_by - __entry->now, |
| 1191 | __entry->timer - __entry->now) |
David Howells | fc7ab6d | 2016-09-23 15:22:36 +0100 | [diff] [blame] | 1192 | ); |
| 1193 | |
David Howells | 89b475a | 2016-09-23 12:39:22 +0100 | [diff] [blame] | 1194 | TRACE_EVENT(rxrpc_rx_lose, |
| 1195 | TP_PROTO(struct rxrpc_skb_priv *sp), |
| 1196 | |
| 1197 | TP_ARGS(sp), |
| 1198 | |
| 1199 | TP_STRUCT__entry( |
| 1200 | __field_struct(struct rxrpc_host_header, hdr ) |
| 1201 | ), |
| 1202 | |
| 1203 | TP_fast_assign( |
| 1204 | memcpy(&__entry->hdr, &sp->hdr, sizeof(__entry->hdr)); |
| 1205 | ), |
| 1206 | |
| 1207 | TP_printk("%08x:%08x:%08x:%04x %08x %08x %02x %02x %s *LOSE*", |
| 1208 | __entry->hdr.epoch, __entry->hdr.cid, |
| 1209 | __entry->hdr.callNumber, __entry->hdr.serviceId, |
| 1210 | __entry->hdr.serial, __entry->hdr.seq, |
| 1211 | __entry->hdr.type, __entry->hdr.flags, |
David Howells | b54a134 | 2017-01-05 10:38:33 +0000 | [diff] [blame] | 1212 | __entry->hdr.type <= 15 ? |
| 1213 | __print_symbolic(__entry->hdr.type, rxrpc_pkts) : "?UNK") |
David Howells | 89b475a | 2016-09-23 12:39:22 +0100 | [diff] [blame] | 1214 | ); |
| 1215 | |
David Howells | 9c7ad43 | 2016-09-23 13:50:40 +0100 | [diff] [blame] | 1216 | TRACE_EVENT(rxrpc_propose_ack, |
| 1217 | TP_PROTO(struct rxrpc_call *call, enum rxrpc_propose_ack_trace why, |
| 1218 | u8 ack_reason, rxrpc_serial_t serial, bool immediate, |
| 1219 | bool background, enum rxrpc_propose_ack_outcome outcome), |
| 1220 | |
| 1221 | TP_ARGS(call, why, ack_reason, serial, immediate, background, |
| 1222 | outcome), |
| 1223 | |
| 1224 | TP_STRUCT__entry( |
David Howells | a25e21f | 2018-03-27 23:03:00 +0100 | [diff] [blame] | 1225 | __field(unsigned int, call ) |
David Howells | 9c7ad43 | 2016-09-23 13:50:40 +0100 | [diff] [blame] | 1226 | __field(enum rxrpc_propose_ack_trace, why ) |
| 1227 | __field(rxrpc_serial_t, serial ) |
| 1228 | __field(u8, ack_reason ) |
| 1229 | __field(bool, immediate ) |
| 1230 | __field(bool, background ) |
| 1231 | __field(enum rxrpc_propose_ack_outcome, outcome ) |
| 1232 | ), |
| 1233 | |
| 1234 | TP_fast_assign( |
David Howells | a25e21f | 2018-03-27 23:03:00 +0100 | [diff] [blame] | 1235 | __entry->call = call->debug_id; |
David Howells | 9c7ad43 | 2016-09-23 13:50:40 +0100 | [diff] [blame] | 1236 | __entry->why = why; |
| 1237 | __entry->serial = serial; |
| 1238 | __entry->ack_reason = ack_reason; |
| 1239 | __entry->immediate = immediate; |
| 1240 | __entry->background = background; |
| 1241 | __entry->outcome = outcome; |
| 1242 | ), |
| 1243 | |
David Howells | a25e21f | 2018-03-27 23:03:00 +0100 | [diff] [blame] | 1244 | TP_printk("c=%08x %s %s r=%08x i=%u b=%u%s", |
David Howells | 9c7ad43 | 2016-09-23 13:50:40 +0100 | [diff] [blame] | 1245 | __entry->call, |
David Howells | b54a134 | 2017-01-05 10:38:33 +0000 | [diff] [blame] | 1246 | __print_symbolic(__entry->why, rxrpc_propose_ack_traces), |
| 1247 | __print_symbolic(__entry->ack_reason, rxrpc_ack_names), |
David Howells | 9c7ad43 | 2016-09-23 13:50:40 +0100 | [diff] [blame] | 1248 | __entry->serial, |
| 1249 | __entry->immediate, |
| 1250 | __entry->background, |
David Howells | b54a134 | 2017-01-05 10:38:33 +0000 | [diff] [blame] | 1251 | __print_symbolic(__entry->outcome, rxrpc_propose_ack_outcomes)) |
David Howells | 9c7ad43 | 2016-09-23 13:50:40 +0100 | [diff] [blame] | 1252 | ); |
| 1253 | |
David Howells | c6672e3 | 2016-09-23 13:58:55 +0100 | [diff] [blame] | 1254 | TRACE_EVENT(rxrpc_retransmit, |
| 1255 | TP_PROTO(struct rxrpc_call *call, rxrpc_seq_t seq, u8 annotation, |
| 1256 | s64 expiry), |
| 1257 | |
| 1258 | TP_ARGS(call, seq, annotation, expiry), |
| 1259 | |
| 1260 | TP_STRUCT__entry( |
David Howells | a25e21f | 2018-03-27 23:03:00 +0100 | [diff] [blame] | 1261 | __field(unsigned int, call ) |
David Howells | c6672e3 | 2016-09-23 13:58:55 +0100 | [diff] [blame] | 1262 | __field(rxrpc_seq_t, seq ) |
| 1263 | __field(u8, annotation ) |
| 1264 | __field(s64, expiry ) |
| 1265 | ), |
| 1266 | |
| 1267 | TP_fast_assign( |
David Howells | a25e21f | 2018-03-27 23:03:00 +0100 | [diff] [blame] | 1268 | __entry->call = call->debug_id; |
David Howells | c6672e3 | 2016-09-23 13:58:55 +0100 | [diff] [blame] | 1269 | __entry->seq = seq; |
| 1270 | __entry->annotation = annotation; |
| 1271 | __entry->expiry = expiry; |
| 1272 | ), |
| 1273 | |
David Howells | a25e21f | 2018-03-27 23:03:00 +0100 | [diff] [blame] | 1274 | TP_printk("c=%08x q=%x a=%02x xp=%lld", |
David Howells | c6672e3 | 2016-09-23 13:58:55 +0100 | [diff] [blame] | 1275 | __entry->call, |
| 1276 | __entry->seq, |
| 1277 | __entry->annotation, |
| 1278 | __entry->expiry) |
| 1279 | ); |
| 1280 | |
David Howells | 5749434 | 2016-09-24 18:05:27 +0100 | [diff] [blame] | 1281 | TRACE_EVENT(rxrpc_congest, |
| 1282 | TP_PROTO(struct rxrpc_call *call, struct rxrpc_ack_summary *summary, |
| 1283 | rxrpc_serial_t ack_serial, enum rxrpc_congest_change change), |
| 1284 | |
| 1285 | TP_ARGS(call, summary, ack_serial, change), |
| 1286 | |
| 1287 | TP_STRUCT__entry( |
David Howells | a25e21f | 2018-03-27 23:03:00 +0100 | [diff] [blame] | 1288 | __field(unsigned int, call ) |
David Howells | 5749434 | 2016-09-24 18:05:27 +0100 | [diff] [blame] | 1289 | __field(enum rxrpc_congest_change, change ) |
| 1290 | __field(rxrpc_seq_t, hard_ack ) |
| 1291 | __field(rxrpc_seq_t, top ) |
| 1292 | __field(rxrpc_seq_t, lowest_nak ) |
| 1293 | __field(rxrpc_serial_t, ack_serial ) |
| 1294 | __field_struct(struct rxrpc_ack_summary, sum ) |
| 1295 | ), |
| 1296 | |
| 1297 | TP_fast_assign( |
David Howells | a25e21f | 2018-03-27 23:03:00 +0100 | [diff] [blame] | 1298 | __entry->call = call->debug_id; |
David Howells | 5749434 | 2016-09-24 18:05:27 +0100 | [diff] [blame] | 1299 | __entry->change = change; |
| 1300 | __entry->hard_ack = call->tx_hard_ack; |
| 1301 | __entry->top = call->tx_top; |
| 1302 | __entry->lowest_nak = call->acks_lowest_nak; |
| 1303 | __entry->ack_serial = ack_serial; |
| 1304 | memcpy(&__entry->sum, summary, sizeof(__entry->sum)); |
| 1305 | ), |
| 1306 | |
David Howells | a25e21f | 2018-03-27 23:03:00 +0100 | [diff] [blame] | 1307 | 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", |
David Howells | 5749434 | 2016-09-24 18:05:27 +0100 | [diff] [blame] | 1308 | __entry->call, |
| 1309 | __entry->ack_serial, |
David Howells | b54a134 | 2017-01-05 10:38:33 +0000 | [diff] [blame] | 1310 | __print_symbolic(__entry->sum.ack_reason, rxrpc_ack_names), |
David Howells | 5749434 | 2016-09-24 18:05:27 +0100 | [diff] [blame] | 1311 | __entry->hard_ack, |
David Howells | b54a134 | 2017-01-05 10:38:33 +0000 | [diff] [blame] | 1312 | __print_symbolic(__entry->sum.mode, rxrpc_congest_modes), |
David Howells | 5749434 | 2016-09-24 18:05:27 +0100 | [diff] [blame] | 1313 | __entry->sum.cwnd, |
| 1314 | __entry->sum.ssthresh, |
| 1315 | __entry->sum.nr_acks, __entry->sum.nr_nacks, |
| 1316 | __entry->sum.nr_new_acks, __entry->sum.nr_new_nacks, |
| 1317 | __entry->sum.nr_rot_new_acks, |
| 1318 | __entry->top - __entry->hard_ack, |
| 1319 | __entry->sum.cumulative_acks, |
| 1320 | __entry->sum.dup_acks, |
| 1321 | __entry->lowest_nak, __entry->sum.new_low_nack ? "!" : "", |
David Howells | b54a134 | 2017-01-05 10:38:33 +0000 | [diff] [blame] | 1322 | __print_symbolic(__entry->change, rxrpc_congest_changes), |
David Howells | 5749434 | 2016-09-24 18:05:27 +0100 | [diff] [blame] | 1323 | __entry->sum.retrans_timeo ? " rTxTo" : "") |
| 1324 | ); |
| 1325 | |
David Howells | b1d9f7fd | 2017-01-05 10:38:34 +0000 | [diff] [blame] | 1326 | TRACE_EVENT(rxrpc_disconnect_call, |
| 1327 | TP_PROTO(struct rxrpc_call *call), |
| 1328 | |
| 1329 | TP_ARGS(call), |
| 1330 | |
| 1331 | TP_STRUCT__entry( |
David Howells | a25e21f | 2018-03-27 23:03:00 +0100 | [diff] [blame] | 1332 | __field(unsigned int, call ) |
David Howells | b1d9f7fd | 2017-01-05 10:38:34 +0000 | [diff] [blame] | 1333 | __field(u32, abort_code ) |
| 1334 | ), |
| 1335 | |
| 1336 | TP_fast_assign( |
David Howells | a25e21f | 2018-03-27 23:03:00 +0100 | [diff] [blame] | 1337 | __entry->call = call->debug_id; |
David Howells | b1d9f7fd | 2017-01-05 10:38:34 +0000 | [diff] [blame] | 1338 | __entry->abort_code = call->abort_code; |
| 1339 | ), |
| 1340 | |
David Howells | a25e21f | 2018-03-27 23:03:00 +0100 | [diff] [blame] | 1341 | TP_printk("c=%08x ab=%08x", |
David Howells | b1d9f7fd | 2017-01-05 10:38:34 +0000 | [diff] [blame] | 1342 | __entry->call, |
| 1343 | __entry->abort_code) |
| 1344 | ); |
| 1345 | |
| 1346 | TRACE_EVENT(rxrpc_improper_term, |
| 1347 | TP_PROTO(struct rxrpc_call *call), |
| 1348 | |
| 1349 | TP_ARGS(call), |
| 1350 | |
| 1351 | TP_STRUCT__entry( |
David Howells | a25e21f | 2018-03-27 23:03:00 +0100 | [diff] [blame] | 1352 | __field(unsigned int, call ) |
David Howells | b1d9f7fd | 2017-01-05 10:38:34 +0000 | [diff] [blame] | 1353 | __field(u32, abort_code ) |
| 1354 | ), |
| 1355 | |
| 1356 | TP_fast_assign( |
David Howells | a25e21f | 2018-03-27 23:03:00 +0100 | [diff] [blame] | 1357 | __entry->call = call->debug_id; |
David Howells | b1d9f7fd | 2017-01-05 10:38:34 +0000 | [diff] [blame] | 1358 | __entry->abort_code = call->abort_code; |
| 1359 | ), |
| 1360 | |
David Howells | a25e21f | 2018-03-27 23:03:00 +0100 | [diff] [blame] | 1361 | TP_printk("c=%08x ab=%08x", |
David Howells | b1d9f7fd | 2017-01-05 10:38:34 +0000 | [diff] [blame] | 1362 | __entry->call, |
| 1363 | __entry->abort_code) |
| 1364 | ); |
| 1365 | |
David Howells | fb46f6e | 2017-04-06 10:12:00 +0100 | [diff] [blame] | 1366 | TRACE_EVENT(rxrpc_rx_eproto, |
| 1367 | TP_PROTO(struct rxrpc_call *call, rxrpc_serial_t serial, |
| 1368 | const char *why), |
| 1369 | |
| 1370 | TP_ARGS(call, serial, why), |
| 1371 | |
| 1372 | TP_STRUCT__entry( |
David Howells | a25e21f | 2018-03-27 23:03:00 +0100 | [diff] [blame] | 1373 | __field(unsigned int, call ) |
David Howells | fb46f6e | 2017-04-06 10:12:00 +0100 | [diff] [blame] | 1374 | __field(rxrpc_serial_t, serial ) |
| 1375 | __field(const char *, why ) |
| 1376 | ), |
| 1377 | |
| 1378 | TP_fast_assign( |
David Howells | 99f0eae6 | 2019-07-02 16:04:19 +0100 | [diff] [blame] | 1379 | __entry->call = call ? call->debug_id : 0; |
David Howells | fb46f6e | 2017-04-06 10:12:00 +0100 | [diff] [blame] | 1380 | __entry->serial = serial; |
| 1381 | __entry->why = why; |
| 1382 | ), |
| 1383 | |
David Howells | a25e21f | 2018-03-27 23:03:00 +0100 | [diff] [blame] | 1384 | TP_printk("c=%08x EPROTO %08x %s", |
David Howells | fb46f6e | 2017-04-06 10:12:00 +0100 | [diff] [blame] | 1385 | __entry->call, |
| 1386 | __entry->serial, |
| 1387 | __entry->why) |
| 1388 | ); |
| 1389 | |
David Howells | 89ca694 | 2017-04-06 10:12:00 +0100 | [diff] [blame] | 1390 | TRACE_EVENT(rxrpc_connect_call, |
| 1391 | TP_PROTO(struct rxrpc_call *call), |
| 1392 | |
| 1393 | TP_ARGS(call), |
| 1394 | |
| 1395 | TP_STRUCT__entry( |
David Howells | a25e21f | 2018-03-27 23:03:00 +0100 | [diff] [blame] | 1396 | __field(unsigned int, call ) |
David Howells | 89ca694 | 2017-04-06 10:12:00 +0100 | [diff] [blame] | 1397 | __field(unsigned long, user_call_ID ) |
| 1398 | __field(u32, cid ) |
| 1399 | __field(u32, call_id ) |
| 1400 | ), |
| 1401 | |
| 1402 | TP_fast_assign( |
David Howells | a25e21f | 2018-03-27 23:03:00 +0100 | [diff] [blame] | 1403 | __entry->call = call->debug_id; |
David Howells | 89ca694 | 2017-04-06 10:12:00 +0100 | [diff] [blame] | 1404 | __entry->user_call_ID = call->user_call_ID; |
| 1405 | __entry->cid = call->cid; |
| 1406 | __entry->call_id = call->call_id; |
| 1407 | ), |
| 1408 | |
David Howells | a25e21f | 2018-03-27 23:03:00 +0100 | [diff] [blame] | 1409 | TP_printk("c=%08x u=%p %08x:%08x", |
David Howells | 89ca694 | 2017-04-06 10:12:00 +0100 | [diff] [blame] | 1410 | __entry->call, |
| 1411 | (void *)__entry->user_call_ID, |
| 1412 | __entry->cid, |
| 1413 | __entry->call_id) |
| 1414 | ); |
| 1415 | |
David Howells | 827efed | 2018-03-27 23:02:47 +0100 | [diff] [blame] | 1416 | TRACE_EVENT(rxrpc_resend, |
| 1417 | TP_PROTO(struct rxrpc_call *call, int ix), |
| 1418 | |
| 1419 | TP_ARGS(call, ix), |
| 1420 | |
| 1421 | TP_STRUCT__entry( |
David Howells | a25e21f | 2018-03-27 23:03:00 +0100 | [diff] [blame] | 1422 | __field(unsigned int, call ) |
David Howells | 827efed | 2018-03-27 23:02:47 +0100 | [diff] [blame] | 1423 | __field(int, ix ) |
| 1424 | __array(u8, anno, 64 ) |
| 1425 | ), |
| 1426 | |
| 1427 | TP_fast_assign( |
David Howells | a25e21f | 2018-03-27 23:03:00 +0100 | [diff] [blame] | 1428 | __entry->call = call->debug_id; |
David Howells | 827efed | 2018-03-27 23:02:47 +0100 | [diff] [blame] | 1429 | __entry->ix = ix; |
| 1430 | memcpy(__entry->anno, call->rxtx_annotations, 64); |
| 1431 | ), |
| 1432 | |
David Howells | a25e21f | 2018-03-27 23:03:00 +0100 | [diff] [blame] | 1433 | TP_printk("c=%08x ix=%u a=%64phN", |
David Howells | 827efed | 2018-03-27 23:02:47 +0100 | [diff] [blame] | 1434 | __entry->call, |
| 1435 | __entry->ix, |
| 1436 | __entry->anno) |
| 1437 | ); |
| 1438 | |
David Howells | 494337c | 2018-05-10 23:26:01 +0100 | [diff] [blame] | 1439 | TRACE_EVENT(rxrpc_rx_icmp, |
| 1440 | TP_PROTO(struct rxrpc_peer *peer, struct sock_extended_err *ee, |
| 1441 | struct sockaddr_rxrpc *srx), |
| 1442 | |
| 1443 | TP_ARGS(peer, ee, srx), |
| 1444 | |
| 1445 | TP_STRUCT__entry( |
| 1446 | __field(unsigned int, peer ) |
| 1447 | __field_struct(struct sock_extended_err, ee ) |
| 1448 | __field_struct(struct sockaddr_rxrpc, srx ) |
| 1449 | ), |
| 1450 | |
| 1451 | TP_fast_assign( |
| 1452 | __entry->peer = peer->debug_id; |
| 1453 | memcpy(&__entry->ee, ee, sizeof(__entry->ee)); |
| 1454 | memcpy(&__entry->srx, srx, sizeof(__entry->srx)); |
| 1455 | ), |
| 1456 | |
| 1457 | TP_printk("P=%08x o=%u t=%u c=%u i=%u d=%u e=%d %pISp", |
| 1458 | __entry->peer, |
| 1459 | __entry->ee.ee_origin, |
| 1460 | __entry->ee.ee_type, |
| 1461 | __entry->ee.ee_code, |
| 1462 | __entry->ee.ee_info, |
| 1463 | __entry->ee.ee_data, |
| 1464 | __entry->ee.ee_errno, |
| 1465 | &__entry->srx.transport) |
| 1466 | ); |
| 1467 | |
David Howells | 6b47fe1 | 2018-05-10 23:26:01 +0100 | [diff] [blame] | 1468 | TRACE_EVENT(rxrpc_tx_fail, |
| 1469 | TP_PROTO(unsigned int debug_id, rxrpc_serial_t serial, int ret, |
David Howells | 4764c0d | 2018-07-23 17:18:37 +0100 | [diff] [blame] | 1470 | enum rxrpc_tx_point where), |
David Howells | 6b47fe1 | 2018-05-10 23:26:01 +0100 | [diff] [blame] | 1471 | |
David Howells | 4764c0d | 2018-07-23 17:18:37 +0100 | [diff] [blame] | 1472 | TP_ARGS(debug_id, serial, ret, where), |
David Howells | 6b47fe1 | 2018-05-10 23:26:01 +0100 | [diff] [blame] | 1473 | |
| 1474 | TP_STRUCT__entry( |
| 1475 | __field(unsigned int, debug_id ) |
| 1476 | __field(rxrpc_serial_t, serial ) |
| 1477 | __field(int, ret ) |
David Howells | 4764c0d | 2018-07-23 17:18:37 +0100 | [diff] [blame] | 1478 | __field(enum rxrpc_tx_point, where ) |
David Howells | 6b47fe1 | 2018-05-10 23:26:01 +0100 | [diff] [blame] | 1479 | ), |
| 1480 | |
| 1481 | TP_fast_assign( |
| 1482 | __entry->debug_id = debug_id; |
| 1483 | __entry->serial = serial; |
| 1484 | __entry->ret = ret; |
David Howells | 4764c0d | 2018-07-23 17:18:37 +0100 | [diff] [blame] | 1485 | __entry->where = where; |
David Howells | 6b47fe1 | 2018-05-10 23:26:01 +0100 | [diff] [blame] | 1486 | ), |
| 1487 | |
| 1488 | TP_printk("c=%08x r=%x ret=%d %s", |
| 1489 | __entry->debug_id, |
| 1490 | __entry->serial, |
| 1491 | __entry->ret, |
David Howells | 4764c0d | 2018-07-23 17:18:37 +0100 | [diff] [blame] | 1492 | __print_symbolic(__entry->where, rxrpc_tx_points)) |
David Howells | 6b47fe1 | 2018-05-10 23:26:01 +0100 | [diff] [blame] | 1493 | ); |
| 1494 | |
David Howells | 1a02502 | 2018-06-03 02:17:39 +0100 | [diff] [blame] | 1495 | TRACE_EVENT(rxrpc_call_reset, |
| 1496 | TP_PROTO(struct rxrpc_call *call), |
| 1497 | |
| 1498 | TP_ARGS(call), |
| 1499 | |
| 1500 | TP_STRUCT__entry( |
| 1501 | __field(unsigned int, debug_id ) |
| 1502 | __field(u32, cid ) |
| 1503 | __field(u32, call_id ) |
| 1504 | __field(rxrpc_serial_t, call_serial ) |
| 1505 | __field(rxrpc_serial_t, conn_serial ) |
| 1506 | __field(rxrpc_seq_t, tx_seq ) |
| 1507 | __field(rxrpc_seq_t, rx_seq ) |
| 1508 | ), |
| 1509 | |
| 1510 | TP_fast_assign( |
| 1511 | __entry->debug_id = call->debug_id; |
| 1512 | __entry->cid = call->cid; |
| 1513 | __entry->call_id = call->call_id; |
| 1514 | __entry->call_serial = call->rx_serial; |
| 1515 | __entry->conn_serial = call->conn->hi_serial; |
| 1516 | __entry->tx_seq = call->tx_hard_ack; |
| 1517 | __entry->rx_seq = call->ackr_seen; |
| 1518 | ), |
| 1519 | |
| 1520 | TP_printk("c=%08x %08x:%08x r=%08x/%08x tx=%08x rx=%08x", |
| 1521 | __entry->debug_id, |
| 1522 | __entry->cid, __entry->call_id, |
| 1523 | __entry->call_serial, __entry->conn_serial, |
| 1524 | __entry->tx_seq, __entry->rx_seq) |
| 1525 | ); |
| 1526 | |
David Howells | 4272d30 | 2018-07-23 17:18:37 +0100 | [diff] [blame] | 1527 | TRACE_EVENT(rxrpc_notify_socket, |
| 1528 | TP_PROTO(unsigned int debug_id, rxrpc_serial_t serial), |
| 1529 | |
| 1530 | TP_ARGS(debug_id, serial), |
| 1531 | |
| 1532 | TP_STRUCT__entry( |
| 1533 | __field(unsigned int, debug_id ) |
| 1534 | __field(rxrpc_serial_t, serial ) |
| 1535 | ), |
| 1536 | |
| 1537 | TP_fast_assign( |
| 1538 | __entry->debug_id = debug_id; |
| 1539 | __entry->serial = serial; |
| 1540 | ), |
| 1541 | |
| 1542 | TP_printk("c=%08x r=%08x", |
| 1543 | __entry->debug_id, |
| 1544 | __entry->serial) |
| 1545 | ); |
| 1546 | |
David Howells | df844fd | 2016-08-23 15:27:24 +0100 | [diff] [blame] | 1547 | #endif /* _TRACE_RXRPC_H */ |
| 1548 | |
| 1549 | /* This part must be outside protection */ |
| 1550 | #include <trace/define_trace.h> |