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