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