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 | |
| 403 | /* |
| 404 | * Export enum symbols via userspace. |
| 405 | */ |
| 406 | #undef EM |
| 407 | #undef E_ |
| 408 | #define EM(a, b) TRACE_DEFINE_ENUM(a); |
| 409 | #define E_(a, b) TRACE_DEFINE_ENUM(a); |
| 410 | |
| 411 | rxrpc_skb_traces; |
| 412 | rxrpc_conn_traces; |
| 413 | rxrpc_client_traces; |
| 414 | rxrpc_call_traces; |
| 415 | rxrpc_transmit_traces; |
| 416 | rxrpc_receive_traces; |
| 417 | rxrpc_recvmsg_traces; |
| 418 | rxrpc_rtt_tx_traces; |
| 419 | rxrpc_rtt_rx_traces; |
| 420 | rxrpc_timer_traces; |
| 421 | rxrpc_propose_ack_traces; |
| 422 | rxrpc_propose_ack_outcomes; |
David Howells | 827efed | 2018-03-27 23:02:47 +0100 | [diff] [blame^] | 423 | rxrpc_congest_modes; |
David Howells | b54a134 | 2017-01-05 10:38:33 +0000 | [diff] [blame] | 424 | rxrpc_congest_changes; |
| 425 | |
| 426 | /* |
| 427 | * Now redefine the EM() and E_() macros to map the enums to the strings that |
| 428 | * will be printed in the output. |
| 429 | */ |
| 430 | #undef EM |
| 431 | #undef E_ |
| 432 | #define EM(a, b) { a, b }, |
| 433 | #define E_(a, b) { a, b } |
| 434 | |
David Howells | 363deea | 2016-09-17 10:49:14 +0100 | [diff] [blame] | 435 | TRACE_EVENT(rxrpc_conn, |
| 436 | TP_PROTO(struct rxrpc_connection *conn, enum rxrpc_conn_trace op, |
| 437 | int usage, const void *where), |
| 438 | |
| 439 | TP_ARGS(conn, op, usage, where), |
| 440 | |
| 441 | TP_STRUCT__entry( |
| 442 | __field(struct rxrpc_connection *, conn ) |
| 443 | __field(int, op ) |
| 444 | __field(int, usage ) |
| 445 | __field(const void *, where ) |
| 446 | ), |
| 447 | |
| 448 | TP_fast_assign( |
| 449 | __entry->conn = conn; |
| 450 | __entry->op = op; |
| 451 | __entry->usage = usage; |
| 452 | __entry->where = where; |
| 453 | ), |
| 454 | |
| 455 | TP_printk("C=%p %s u=%d sp=%pSR", |
| 456 | __entry->conn, |
David Howells | b54a134 | 2017-01-05 10:38:33 +0000 | [diff] [blame] | 457 | __print_symbolic(__entry->op, rxrpc_conn_traces), |
David Howells | 363deea | 2016-09-17 10:49:14 +0100 | [diff] [blame] | 458 | __entry->usage, |
| 459 | __entry->where) |
| 460 | ); |
| 461 | |
| 462 | TRACE_EVENT(rxrpc_client, |
| 463 | TP_PROTO(struct rxrpc_connection *conn, int channel, |
| 464 | enum rxrpc_client_trace op), |
| 465 | |
| 466 | TP_ARGS(conn, channel, op), |
| 467 | |
| 468 | TP_STRUCT__entry( |
| 469 | __field(struct rxrpc_connection *, conn ) |
| 470 | __field(u32, cid ) |
| 471 | __field(int, channel ) |
| 472 | __field(int, usage ) |
| 473 | __field(enum rxrpc_client_trace, op ) |
| 474 | __field(enum rxrpc_conn_cache_state, cs ) |
| 475 | ), |
| 476 | |
| 477 | TP_fast_assign( |
| 478 | __entry->conn = conn; |
| 479 | __entry->channel = channel; |
| 480 | __entry->usage = atomic_read(&conn->usage); |
| 481 | __entry->op = op; |
| 482 | __entry->cid = conn->proto.cid; |
| 483 | __entry->cs = conn->cache_state; |
| 484 | ), |
| 485 | |
| 486 | TP_printk("C=%p h=%2d %s %s i=%08x u=%d", |
| 487 | __entry->conn, |
| 488 | __entry->channel, |
David Howells | b54a134 | 2017-01-05 10:38:33 +0000 | [diff] [blame] | 489 | __print_symbolic(__entry->op, rxrpc_client_traces), |
| 490 | __print_symbolic(__entry->cs, rxrpc_conn_cache_states), |
David Howells | 363deea | 2016-09-17 10:49:14 +0100 | [diff] [blame] | 491 | __entry->cid, |
| 492 | __entry->usage) |
| 493 | ); |
| 494 | |
David Howells | e34d423 | 2016-08-30 09:49:29 +0100 | [diff] [blame] | 495 | TRACE_EVENT(rxrpc_call, |
David Howells | fff72429 | 2016-09-07 14:34:21 +0100 | [diff] [blame] | 496 | TP_PROTO(struct rxrpc_call *call, enum rxrpc_call_trace op, |
David Howells | 2ab2721 | 2016-09-08 11:10:12 +0100 | [diff] [blame] | 497 | int usage, const void *where, const void *aux), |
David Howells | e34d423 | 2016-08-30 09:49:29 +0100 | [diff] [blame] | 498 | |
David Howells | 2ab2721 | 2016-09-08 11:10:12 +0100 | [diff] [blame] | 499 | TP_ARGS(call, op, usage, where, aux), |
David Howells | e34d423 | 2016-08-30 09:49:29 +0100 | [diff] [blame] | 500 | |
| 501 | TP_STRUCT__entry( |
| 502 | __field(struct rxrpc_call *, call ) |
| 503 | __field(int, op ) |
| 504 | __field(int, usage ) |
David Howells | e34d423 | 2016-08-30 09:49:29 +0100 | [diff] [blame] | 505 | __field(const void *, where ) |
| 506 | __field(const void *, aux ) |
| 507 | ), |
| 508 | |
| 509 | TP_fast_assign( |
| 510 | __entry->call = call; |
| 511 | __entry->op = op; |
| 512 | __entry->usage = usage; |
David Howells | e34d423 | 2016-08-30 09:49:29 +0100 | [diff] [blame] | 513 | __entry->where = where; |
| 514 | __entry->aux = aux; |
| 515 | ), |
| 516 | |
David Howells | 2ab2721 | 2016-09-08 11:10:12 +0100 | [diff] [blame] | 517 | TP_printk("c=%p %s u=%d sp=%pSR a=%p", |
David Howells | e34d423 | 2016-08-30 09:49:29 +0100 | [diff] [blame] | 518 | __entry->call, |
David Howells | b54a134 | 2017-01-05 10:38:33 +0000 | [diff] [blame] | 519 | __print_symbolic(__entry->op, rxrpc_call_traces), |
David Howells | e34d423 | 2016-08-30 09:49:29 +0100 | [diff] [blame] | 520 | __entry->usage, |
David Howells | e34d423 | 2016-08-30 09:49:29 +0100 | [diff] [blame] | 521 | __entry->where, |
| 522 | __entry->aux) |
| 523 | ); |
| 524 | |
David Howells | df844fd | 2016-08-23 15:27:24 +0100 | [diff] [blame] | 525 | TRACE_EVENT(rxrpc_skb, |
David Howells | 71f3ca4 | 2016-09-17 10:49:14 +0100 | [diff] [blame] | 526 | TP_PROTO(struct sk_buff *skb, enum rxrpc_skb_trace op, |
| 527 | int usage, int mod_count, const void *where), |
David Howells | df844fd | 2016-08-23 15:27:24 +0100 | [diff] [blame] | 528 | |
| 529 | TP_ARGS(skb, op, usage, mod_count, where), |
| 530 | |
| 531 | TP_STRUCT__entry( |
| 532 | __field(struct sk_buff *, skb ) |
David Howells | 71f3ca4 | 2016-09-17 10:49:14 +0100 | [diff] [blame] | 533 | __field(enum rxrpc_skb_trace, op ) |
David Howells | df844fd | 2016-08-23 15:27:24 +0100 | [diff] [blame] | 534 | __field(int, usage ) |
| 535 | __field(int, mod_count ) |
| 536 | __field(const void *, where ) |
| 537 | ), |
| 538 | |
| 539 | TP_fast_assign( |
| 540 | __entry->skb = skb; |
| 541 | __entry->op = op; |
| 542 | __entry->usage = usage; |
| 543 | __entry->mod_count = mod_count; |
| 544 | __entry->where = where; |
| 545 | ), |
| 546 | |
| 547 | TP_printk("s=%p %s u=%d m=%d p=%pSR", |
| 548 | __entry->skb, |
David Howells | b54a134 | 2017-01-05 10:38:33 +0000 | [diff] [blame] | 549 | __print_symbolic(__entry->op, rxrpc_skb_traces), |
David Howells | df844fd | 2016-08-23 15:27:24 +0100 | [diff] [blame] | 550 | __entry->usage, |
| 551 | __entry->mod_count, |
| 552 | __entry->where) |
| 553 | ); |
| 554 | |
David Howells | 49e19ec | 2016-09-08 11:10:12 +0100 | [diff] [blame] | 555 | TRACE_EVENT(rxrpc_rx_packet, |
| 556 | TP_PROTO(struct rxrpc_skb_priv *sp), |
| 557 | |
| 558 | TP_ARGS(sp), |
| 559 | |
| 560 | TP_STRUCT__entry( |
| 561 | __field_struct(struct rxrpc_host_header, hdr ) |
| 562 | ), |
| 563 | |
| 564 | TP_fast_assign( |
| 565 | memcpy(&__entry->hdr, &sp->hdr, sizeof(__entry->hdr)); |
| 566 | ), |
| 567 | |
David Howells | a3868bf | 2016-09-17 10:49:13 +0100 | [diff] [blame] | 568 | TP_printk("%08x:%08x:%08x:%04x %08x %08x %02x %02x %s", |
David Howells | 49e19ec | 2016-09-08 11:10:12 +0100 | [diff] [blame] | 569 | __entry->hdr.epoch, __entry->hdr.cid, |
| 570 | __entry->hdr.callNumber, __entry->hdr.serviceId, |
| 571 | __entry->hdr.serial, __entry->hdr.seq, |
David Howells | a3868bf | 2016-09-17 10:49:13 +0100 | [diff] [blame] | 572 | __entry->hdr.type, __entry->hdr.flags, |
David Howells | b54a134 | 2017-01-05 10:38:33 +0000 | [diff] [blame] | 573 | __entry->hdr.type <= 15 ? |
| 574 | __print_symbolic(__entry->hdr.type, rxrpc_pkts) : "?UNK") |
David Howells | 49e19ec | 2016-09-08 11:10:12 +0100 | [diff] [blame] | 575 | ); |
| 576 | |
| 577 | TRACE_EVENT(rxrpc_rx_done, |
| 578 | TP_PROTO(int result, int abort_code), |
| 579 | |
| 580 | TP_ARGS(result, abort_code), |
| 581 | |
| 582 | TP_STRUCT__entry( |
| 583 | __field(int, result ) |
| 584 | __field(int, abort_code ) |
| 585 | ), |
| 586 | |
| 587 | TP_fast_assign( |
| 588 | __entry->result = result; |
| 589 | __entry->abort_code = abort_code; |
| 590 | ), |
| 591 | |
| 592 | TP_printk("r=%d a=%d", __entry->result, __entry->abort_code) |
| 593 | ); |
| 594 | |
David Howells | 5a42976 | 2016-09-06 22:19:51 +0100 | [diff] [blame] | 595 | TRACE_EVENT(rxrpc_abort, |
| 596 | TP_PROTO(const char *why, u32 cid, u32 call_id, rxrpc_seq_t seq, |
| 597 | int abort_code, int error), |
| 598 | |
| 599 | TP_ARGS(why, cid, call_id, seq, abort_code, error), |
| 600 | |
| 601 | TP_STRUCT__entry( |
| 602 | __array(char, why, 4 ) |
| 603 | __field(u32, cid ) |
| 604 | __field(u32, call_id ) |
| 605 | __field(rxrpc_seq_t, seq ) |
| 606 | __field(int, abort_code ) |
| 607 | __field(int, error ) |
| 608 | ), |
| 609 | |
| 610 | TP_fast_assign( |
| 611 | memcpy(__entry->why, why, 4); |
| 612 | __entry->cid = cid; |
| 613 | __entry->call_id = call_id; |
| 614 | __entry->abort_code = abort_code; |
| 615 | __entry->error = error; |
| 616 | __entry->seq = seq; |
| 617 | ), |
| 618 | |
| 619 | TP_printk("%08x:%08x s=%u a=%d e=%d %s", |
| 620 | __entry->cid, __entry->call_id, __entry->seq, |
| 621 | __entry->abort_code, __entry->error, __entry->why) |
| 622 | ); |
| 623 | |
David Howells | a124fe3 | 2016-09-17 10:49:13 +0100 | [diff] [blame] | 624 | TRACE_EVENT(rxrpc_transmit, |
| 625 | TP_PROTO(struct rxrpc_call *call, enum rxrpc_transmit_trace why), |
| 626 | |
| 627 | TP_ARGS(call, why), |
| 628 | |
| 629 | TP_STRUCT__entry( |
| 630 | __field(struct rxrpc_call *, call ) |
| 631 | __field(enum rxrpc_transmit_trace, why ) |
| 632 | __field(rxrpc_seq_t, tx_hard_ack ) |
| 633 | __field(rxrpc_seq_t, tx_top ) |
David Howells | b1d9f7fd | 2017-01-05 10:38:34 +0000 | [diff] [blame] | 634 | __field(int, tx_winsize ) |
David Howells | a124fe3 | 2016-09-17 10:49:13 +0100 | [diff] [blame] | 635 | ), |
| 636 | |
| 637 | TP_fast_assign( |
| 638 | __entry->call = call; |
| 639 | __entry->why = why; |
| 640 | __entry->tx_hard_ack = call->tx_hard_ack; |
| 641 | __entry->tx_top = call->tx_top; |
David Howells | b1d9f7fd | 2017-01-05 10:38:34 +0000 | [diff] [blame] | 642 | __entry->tx_winsize = call->tx_winsize; |
David Howells | a124fe3 | 2016-09-17 10:49:13 +0100 | [diff] [blame] | 643 | ), |
| 644 | |
David Howells | b1d9f7fd | 2017-01-05 10:38:34 +0000 | [diff] [blame] | 645 | TP_printk("c=%p %s f=%08x n=%u/%u", |
David Howells | a124fe3 | 2016-09-17 10:49:13 +0100 | [diff] [blame] | 646 | __entry->call, |
David Howells | b54a134 | 2017-01-05 10:38:33 +0000 | [diff] [blame] | 647 | __print_symbolic(__entry->why, rxrpc_transmit_traces), |
David Howells | a124fe3 | 2016-09-17 10:49:13 +0100 | [diff] [blame] | 648 | __entry->tx_hard_ack + 1, |
David Howells | b1d9f7fd | 2017-01-05 10:38:34 +0000 | [diff] [blame] | 649 | __entry->tx_top - __entry->tx_hard_ack, |
| 650 | __entry->tx_winsize) |
David Howells | a124fe3 | 2016-09-17 10:49:13 +0100 | [diff] [blame] | 651 | ); |
| 652 | |
David Howells | b1d9f7fd | 2017-01-05 10:38:34 +0000 | [diff] [blame] | 653 | TRACE_EVENT(rxrpc_rx_data, |
| 654 | TP_PROTO(struct rxrpc_call *call, rxrpc_seq_t seq, |
| 655 | rxrpc_serial_t serial, u8 flags, u8 anno), |
David Howells | ec71eb9 | 2016-09-17 10:49:13 +0100 | [diff] [blame] | 656 | |
David Howells | b1d9f7fd | 2017-01-05 10:38:34 +0000 | [diff] [blame] | 657 | TP_ARGS(call, seq, serial, flags, anno), |
David Howells | ec71eb9 | 2016-09-17 10:49:13 +0100 | [diff] [blame] | 658 | |
| 659 | TP_STRUCT__entry( |
| 660 | __field(struct rxrpc_call *, call ) |
David Howells | b1d9f7fd | 2017-01-05 10:38:34 +0000 | [diff] [blame] | 661 | __field(rxrpc_seq_t, seq ) |
| 662 | __field(rxrpc_serial_t, serial ) |
| 663 | __field(u8, flags ) |
| 664 | __field(u8, anno ) |
| 665 | ), |
| 666 | |
| 667 | TP_fast_assign( |
| 668 | __entry->call = call; |
| 669 | __entry->seq = seq; |
| 670 | __entry->serial = serial; |
| 671 | __entry->flags = flags; |
| 672 | __entry->anno = anno; |
| 673 | ), |
| 674 | |
| 675 | TP_printk("c=%p DATA %08x q=%08x fl=%02x a=%02x", |
| 676 | __entry->call, |
| 677 | __entry->serial, |
| 678 | __entry->seq, |
| 679 | __entry->flags, |
| 680 | __entry->anno) |
| 681 | ); |
| 682 | |
| 683 | TRACE_EVENT(rxrpc_rx_ack, |
| 684 | TP_PROTO(struct rxrpc_call *call, |
| 685 | rxrpc_serial_t serial, rxrpc_serial_t ack_serial, |
| 686 | rxrpc_seq_t first, rxrpc_seq_t prev, u8 reason, u8 n_acks), |
| 687 | |
| 688 | TP_ARGS(call, serial, ack_serial, first, prev, reason, n_acks), |
| 689 | |
| 690 | TP_STRUCT__entry( |
| 691 | __field(struct rxrpc_call *, call ) |
| 692 | __field(rxrpc_serial_t, serial ) |
| 693 | __field(rxrpc_serial_t, ack_serial ) |
David Howells | ec71eb9 | 2016-09-17 10:49:13 +0100 | [diff] [blame] | 694 | __field(rxrpc_seq_t, first ) |
David Howells | b1d9f7fd | 2017-01-05 10:38:34 +0000 | [diff] [blame] | 695 | __field(rxrpc_seq_t, prev ) |
David Howells | ec71eb9 | 2016-09-17 10:49:13 +0100 | [diff] [blame] | 696 | __field(u8, reason ) |
| 697 | __field(u8, n_acks ) |
| 698 | ), |
| 699 | |
| 700 | TP_fast_assign( |
| 701 | __entry->call = call; |
David Howells | b1d9f7fd | 2017-01-05 10:38:34 +0000 | [diff] [blame] | 702 | __entry->serial = serial; |
| 703 | __entry->ack_serial = ack_serial; |
David Howells | ec71eb9 | 2016-09-17 10:49:13 +0100 | [diff] [blame] | 704 | __entry->first = first; |
David Howells | b1d9f7fd | 2017-01-05 10:38:34 +0000 | [diff] [blame] | 705 | __entry->prev = prev; |
David Howells | ec71eb9 | 2016-09-17 10:49:13 +0100 | [diff] [blame] | 706 | __entry->reason = reason; |
| 707 | __entry->n_acks = n_acks; |
| 708 | ), |
| 709 | |
David Howells | b1d9f7fd | 2017-01-05 10:38:34 +0000 | [diff] [blame] | 710 | TP_printk("c=%p %08x %s r=%08x f=%08x p=%08x n=%u", |
David Howells | ec71eb9 | 2016-09-17 10:49:13 +0100 | [diff] [blame] | 711 | __entry->call, |
David Howells | b1d9f7fd | 2017-01-05 10:38:34 +0000 | [diff] [blame] | 712 | __entry->serial, |
David Howells | b54a134 | 2017-01-05 10:38:33 +0000 | [diff] [blame] | 713 | __print_symbolic(__entry->reason, rxrpc_ack_names), |
David Howells | b1d9f7fd | 2017-01-05 10:38:34 +0000 | [diff] [blame] | 714 | __entry->ack_serial, |
David Howells | ec71eb9 | 2016-09-17 10:49:13 +0100 | [diff] [blame] | 715 | __entry->first, |
David Howells | b1d9f7fd | 2017-01-05 10:38:34 +0000 | [diff] [blame] | 716 | __entry->prev, |
David Howells | ec71eb9 | 2016-09-17 10:49:13 +0100 | [diff] [blame] | 717 | __entry->n_acks) |
| 718 | ); |
| 719 | |
David Howells | 005ede2 | 2017-04-06 10:12:00 +0100 | [diff] [blame] | 720 | TRACE_EVENT(rxrpc_rx_abort, |
| 721 | TP_PROTO(struct rxrpc_call *call, rxrpc_serial_t serial, |
| 722 | u32 abort_code), |
| 723 | |
| 724 | TP_ARGS(call, serial, abort_code), |
| 725 | |
| 726 | TP_STRUCT__entry( |
| 727 | __field(struct rxrpc_call *, call ) |
| 728 | __field(rxrpc_serial_t, serial ) |
| 729 | __field(u32, abort_code ) |
| 730 | ), |
| 731 | |
| 732 | TP_fast_assign( |
| 733 | __entry->call = call; |
| 734 | __entry->serial = serial; |
| 735 | __entry->abort_code = abort_code; |
| 736 | ), |
| 737 | |
| 738 | TP_printk("c=%p ABORT %08x ac=%d", |
| 739 | __entry->call, |
| 740 | __entry->serial, |
| 741 | __entry->abort_code) |
| 742 | ); |
| 743 | |
David Howells | 740586d | 2017-04-06 10:12:00 +0100 | [diff] [blame] | 744 | TRACE_EVENT(rxrpc_rx_rwind_change, |
| 745 | TP_PROTO(struct rxrpc_call *call, rxrpc_serial_t serial, |
| 746 | u32 rwind, bool wake), |
| 747 | |
| 748 | TP_ARGS(call, serial, rwind, wake), |
| 749 | |
| 750 | TP_STRUCT__entry( |
| 751 | __field(struct rxrpc_call *, call ) |
| 752 | __field(rxrpc_serial_t, serial ) |
| 753 | __field(u32, rwind ) |
| 754 | __field(bool, wake ) |
| 755 | ), |
| 756 | |
| 757 | TP_fast_assign( |
| 758 | __entry->call = call; |
| 759 | __entry->serial = serial; |
| 760 | __entry->rwind = rwind; |
| 761 | __entry->wake = wake; |
| 762 | ), |
| 763 | |
| 764 | TP_printk("c=%p %08x rw=%u%s", |
| 765 | __entry->call, |
| 766 | __entry->serial, |
| 767 | __entry->rwind, |
| 768 | __entry->wake ? " wake" : "") |
| 769 | ); |
| 770 | |
David Howells | be832ae | 2016-09-23 12:39:22 +0100 | [diff] [blame] | 771 | TRACE_EVENT(rxrpc_tx_data, |
| 772 | TP_PROTO(struct rxrpc_call *call, rxrpc_seq_t seq, |
David Howells | a176707 | 2016-09-29 22:37:15 +0100 | [diff] [blame] | 773 | rxrpc_serial_t serial, u8 flags, bool retrans, bool lose), |
David Howells | f3639df | 2016-09-17 10:49:13 +0100 | [diff] [blame] | 774 | |
David Howells | a176707 | 2016-09-29 22:37:15 +0100 | [diff] [blame] | 775 | TP_ARGS(call, seq, serial, flags, retrans, lose), |
David Howells | f3639df | 2016-09-17 10:49:13 +0100 | [diff] [blame] | 776 | |
| 777 | TP_STRUCT__entry( |
| 778 | __field(struct rxrpc_call *, call ) |
David Howells | be832ae | 2016-09-23 12:39:22 +0100 | [diff] [blame] | 779 | __field(rxrpc_seq_t, seq ) |
David Howells | f3639df | 2016-09-17 10:49:13 +0100 | [diff] [blame] | 780 | __field(rxrpc_serial_t, serial ) |
David Howells | be832ae | 2016-09-23 12:39:22 +0100 | [diff] [blame] | 781 | __field(u8, flags ) |
David Howells | a176707 | 2016-09-29 22:37:15 +0100 | [diff] [blame] | 782 | __field(bool, retrans ) |
David Howells | be832ae | 2016-09-23 12:39:22 +0100 | [diff] [blame] | 783 | __field(bool, lose ) |
| 784 | ), |
| 785 | |
| 786 | TP_fast_assign( |
| 787 | __entry->call = call; |
| 788 | __entry->seq = seq; |
| 789 | __entry->serial = serial; |
| 790 | __entry->flags = flags; |
David Howells | a176707 | 2016-09-29 22:37:15 +0100 | [diff] [blame] | 791 | __entry->retrans = retrans; |
David Howells | be832ae | 2016-09-23 12:39:22 +0100 | [diff] [blame] | 792 | __entry->lose = lose; |
| 793 | ), |
| 794 | |
David Howells | 265a44b | 2016-09-30 08:50:42 +0100 | [diff] [blame] | 795 | TP_printk("c=%p DATA %08x q=%08x fl=%02x%s%s", |
David Howells | be832ae | 2016-09-23 12:39:22 +0100 | [diff] [blame] | 796 | __entry->call, |
| 797 | __entry->serial, |
| 798 | __entry->seq, |
| 799 | __entry->flags, |
David Howells | 265a44b | 2016-09-30 08:50:42 +0100 | [diff] [blame] | 800 | __entry->retrans ? " *RETRANS*" : "", |
David Howells | be832ae | 2016-09-23 12:39:22 +0100 | [diff] [blame] | 801 | __entry->lose ? " *LOSE*" : "") |
| 802 | ); |
| 803 | |
| 804 | TRACE_EVENT(rxrpc_tx_ack, |
| 805 | TP_PROTO(struct rxrpc_call *call, rxrpc_serial_t serial, |
| 806 | rxrpc_seq_t ack_first, rxrpc_serial_t ack_serial, |
| 807 | u8 reason, u8 n_acks), |
| 808 | |
| 809 | TP_ARGS(call, serial, ack_first, ack_serial, reason, n_acks), |
| 810 | |
| 811 | TP_STRUCT__entry( |
| 812 | __field(struct rxrpc_call *, call ) |
| 813 | __field(rxrpc_serial_t, serial ) |
| 814 | __field(rxrpc_seq_t, ack_first ) |
| 815 | __field(rxrpc_serial_t, ack_serial ) |
David Howells | f3639df | 2016-09-17 10:49:13 +0100 | [diff] [blame] | 816 | __field(u8, reason ) |
| 817 | __field(u8, n_acks ) |
| 818 | ), |
| 819 | |
| 820 | TP_fast_assign( |
| 821 | __entry->call = call; |
David Howells | f3639df | 2016-09-17 10:49:13 +0100 | [diff] [blame] | 822 | __entry->serial = serial; |
David Howells | be832ae | 2016-09-23 12:39:22 +0100 | [diff] [blame] | 823 | __entry->ack_first = ack_first; |
| 824 | __entry->ack_serial = ack_serial; |
David Howells | f3639df | 2016-09-17 10:49:13 +0100 | [diff] [blame] | 825 | __entry->reason = reason; |
| 826 | __entry->n_acks = n_acks; |
| 827 | ), |
| 828 | |
David Howells | be832ae | 2016-09-23 12:39:22 +0100 | [diff] [blame] | 829 | TP_printk(" c=%p ACK %08x %s f=%08x r=%08x n=%u", |
David Howells | f3639df | 2016-09-17 10:49:13 +0100 | [diff] [blame] | 830 | __entry->call, |
David Howells | f3639df | 2016-09-17 10:49:13 +0100 | [diff] [blame] | 831 | __entry->serial, |
David Howells | b54a134 | 2017-01-05 10:38:33 +0000 | [diff] [blame] | 832 | __print_symbolic(__entry->reason, rxrpc_ack_names), |
David Howells | be832ae | 2016-09-23 12:39:22 +0100 | [diff] [blame] | 833 | __entry->ack_first, |
| 834 | __entry->ack_serial, |
David Howells | f3639df | 2016-09-17 10:49:13 +0100 | [diff] [blame] | 835 | __entry->n_acks) |
| 836 | ); |
| 837 | |
David Howells | 58dc63c | 2016-09-17 10:49:13 +0100 | [diff] [blame] | 838 | TRACE_EVENT(rxrpc_receive, |
| 839 | TP_PROTO(struct rxrpc_call *call, enum rxrpc_receive_trace why, |
| 840 | rxrpc_serial_t serial, rxrpc_seq_t seq), |
| 841 | |
| 842 | TP_ARGS(call, why, serial, seq), |
| 843 | |
| 844 | TP_STRUCT__entry( |
| 845 | __field(struct rxrpc_call *, call ) |
| 846 | __field(enum rxrpc_receive_trace, why ) |
| 847 | __field(rxrpc_serial_t, serial ) |
| 848 | __field(rxrpc_seq_t, seq ) |
| 849 | __field(rxrpc_seq_t, hard_ack ) |
| 850 | __field(rxrpc_seq_t, top ) |
| 851 | ), |
| 852 | |
| 853 | TP_fast_assign( |
| 854 | __entry->call = call; |
| 855 | __entry->why = why; |
| 856 | __entry->serial = serial; |
| 857 | __entry->seq = seq; |
| 858 | __entry->hard_ack = call->rx_hard_ack; |
| 859 | __entry->top = call->rx_top; |
| 860 | ), |
| 861 | |
| 862 | TP_printk("c=%p %s r=%08x q=%08x w=%08x-%08x", |
| 863 | __entry->call, |
David Howells | b54a134 | 2017-01-05 10:38:33 +0000 | [diff] [blame] | 864 | __print_symbolic(__entry->why, rxrpc_receive_traces), |
David Howells | 58dc63c | 2016-09-17 10:49:13 +0100 | [diff] [blame] | 865 | __entry->serial, |
| 866 | __entry->seq, |
| 867 | __entry->hard_ack, |
| 868 | __entry->top) |
| 869 | ); |
| 870 | |
David Howells | 8499790 | 2016-09-17 11:13:31 +0100 | [diff] [blame] | 871 | TRACE_EVENT(rxrpc_recvmsg, |
| 872 | TP_PROTO(struct rxrpc_call *call, enum rxrpc_recvmsg_trace why, |
| 873 | rxrpc_seq_t seq, unsigned int offset, unsigned int len, |
| 874 | int ret), |
| 875 | |
| 876 | TP_ARGS(call, why, seq, offset, len, ret), |
| 877 | |
| 878 | TP_STRUCT__entry( |
| 879 | __field(struct rxrpc_call *, call ) |
| 880 | __field(enum rxrpc_recvmsg_trace, why ) |
| 881 | __field(rxrpc_seq_t, seq ) |
| 882 | __field(unsigned int, offset ) |
| 883 | __field(unsigned int, len ) |
| 884 | __field(int, ret ) |
| 885 | ), |
| 886 | |
| 887 | TP_fast_assign( |
| 888 | __entry->call = call; |
| 889 | __entry->why = why; |
| 890 | __entry->seq = seq; |
| 891 | __entry->offset = offset; |
| 892 | __entry->len = len; |
| 893 | __entry->ret = ret; |
| 894 | ), |
| 895 | |
| 896 | TP_printk("c=%p %s q=%08x o=%u l=%u ret=%d", |
| 897 | __entry->call, |
David Howells | b54a134 | 2017-01-05 10:38:33 +0000 | [diff] [blame] | 898 | __print_symbolic(__entry->why, rxrpc_recvmsg_traces), |
David Howells | 8499790 | 2016-09-17 11:13:31 +0100 | [diff] [blame] | 899 | __entry->seq, |
| 900 | __entry->offset, |
| 901 | __entry->len, |
| 902 | __entry->ret) |
| 903 | ); |
| 904 | |
David Howells | cf1a647 | 2016-09-22 00:41:53 +0100 | [diff] [blame] | 905 | TRACE_EVENT(rxrpc_rtt_tx, |
| 906 | TP_PROTO(struct rxrpc_call *call, enum rxrpc_rtt_tx_trace why, |
| 907 | rxrpc_serial_t send_serial), |
| 908 | |
| 909 | TP_ARGS(call, why, send_serial), |
| 910 | |
| 911 | TP_STRUCT__entry( |
| 912 | __field(struct rxrpc_call *, call ) |
| 913 | __field(enum rxrpc_rtt_tx_trace, why ) |
| 914 | __field(rxrpc_serial_t, send_serial ) |
| 915 | ), |
| 916 | |
| 917 | TP_fast_assign( |
| 918 | __entry->call = call; |
| 919 | __entry->why = why; |
| 920 | __entry->send_serial = send_serial; |
| 921 | ), |
| 922 | |
| 923 | TP_printk("c=%p %s sr=%08x", |
| 924 | __entry->call, |
David Howells | b54a134 | 2017-01-05 10:38:33 +0000 | [diff] [blame] | 925 | __print_symbolic(__entry->why, rxrpc_rtt_tx_traces), |
David Howells | cf1a647 | 2016-09-22 00:41:53 +0100 | [diff] [blame] | 926 | __entry->send_serial) |
| 927 | ); |
| 928 | |
| 929 | TRACE_EVENT(rxrpc_rtt_rx, |
| 930 | TP_PROTO(struct rxrpc_call *call, enum rxrpc_rtt_rx_trace why, |
| 931 | rxrpc_serial_t send_serial, rxrpc_serial_t resp_serial, |
| 932 | s64 rtt, u8 nr, s64 avg), |
| 933 | |
| 934 | TP_ARGS(call, why, send_serial, resp_serial, rtt, nr, avg), |
| 935 | |
| 936 | TP_STRUCT__entry( |
| 937 | __field(struct rxrpc_call *, call ) |
| 938 | __field(enum rxrpc_rtt_rx_trace, why ) |
| 939 | __field(u8, nr ) |
| 940 | __field(rxrpc_serial_t, send_serial ) |
| 941 | __field(rxrpc_serial_t, resp_serial ) |
| 942 | __field(s64, rtt ) |
| 943 | __field(u64, avg ) |
| 944 | ), |
| 945 | |
| 946 | TP_fast_assign( |
| 947 | __entry->call = call; |
| 948 | __entry->why = why; |
| 949 | __entry->send_serial = send_serial; |
| 950 | __entry->resp_serial = resp_serial; |
| 951 | __entry->rtt = rtt; |
| 952 | __entry->nr = nr; |
| 953 | __entry->avg = avg; |
| 954 | ), |
| 955 | |
| 956 | TP_printk("c=%p %s sr=%08x rr=%08x rtt=%lld nr=%u avg=%lld", |
| 957 | __entry->call, |
David Howells | b54a134 | 2017-01-05 10:38:33 +0000 | [diff] [blame] | 958 | __print_symbolic(__entry->why, rxrpc_rtt_rx_traces), |
David Howells | cf1a647 | 2016-09-22 00:41:53 +0100 | [diff] [blame] | 959 | __entry->send_serial, |
| 960 | __entry->resp_serial, |
| 961 | __entry->rtt, |
| 962 | __entry->nr, |
| 963 | __entry->avg) |
| 964 | ); |
| 965 | |
David Howells | fc7ab6d | 2016-09-23 15:22:36 +0100 | [diff] [blame] | 966 | TRACE_EVENT(rxrpc_timer, |
| 967 | TP_PROTO(struct rxrpc_call *call, enum rxrpc_timer_trace why, |
David Howells | a158bdd | 2017-11-24 10:18:41 +0000 | [diff] [blame] | 968 | unsigned long now), |
David Howells | fc7ab6d | 2016-09-23 15:22:36 +0100 | [diff] [blame] | 969 | |
David Howells | a158bdd | 2017-11-24 10:18:41 +0000 | [diff] [blame] | 970 | TP_ARGS(call, why, now), |
David Howells | fc7ab6d | 2016-09-23 15:22:36 +0100 | [diff] [blame] | 971 | |
| 972 | TP_STRUCT__entry( |
| 973 | __field(struct rxrpc_call *, call ) |
| 974 | __field(enum rxrpc_timer_trace, why ) |
David Howells | a158bdd | 2017-11-24 10:18:41 +0000 | [diff] [blame] | 975 | __field(long, now ) |
| 976 | __field(long, ack_at ) |
David Howells | bd1fdf8 | 2017-11-24 10:18:42 +0000 | [diff] [blame] | 977 | __field(long, ack_lost_at ) |
David Howells | a158bdd | 2017-11-24 10:18:41 +0000 | [diff] [blame] | 978 | __field(long, resend_at ) |
| 979 | __field(long, ping_at ) |
| 980 | __field(long, expect_rx_by ) |
| 981 | __field(long, expect_req_by ) |
| 982 | __field(long, expect_term_by ) |
| 983 | __field(long, timer ) |
David Howells | fc7ab6d | 2016-09-23 15:22:36 +0100 | [diff] [blame] | 984 | ), |
| 985 | |
| 986 | TP_fast_assign( |
David Howells | a158bdd | 2017-11-24 10:18:41 +0000 | [diff] [blame] | 987 | __entry->call = call; |
| 988 | __entry->why = why; |
| 989 | __entry->now = now; |
| 990 | __entry->ack_at = call->ack_at; |
David Howells | bd1fdf8 | 2017-11-24 10:18:42 +0000 | [diff] [blame] | 991 | __entry->ack_lost_at = call->ack_lost_at; |
David Howells | a158bdd | 2017-11-24 10:18:41 +0000 | [diff] [blame] | 992 | __entry->resend_at = call->resend_at; |
| 993 | __entry->expect_rx_by = call->expect_rx_by; |
| 994 | __entry->expect_req_by = call->expect_req_by; |
| 995 | __entry->expect_term_by = call->expect_term_by; |
| 996 | __entry->timer = call->timer.expires; |
David Howells | fc7ab6d | 2016-09-23 15:22:36 +0100 | [diff] [blame] | 997 | ), |
| 998 | |
David Howells | bd1fdf8 | 2017-11-24 10:18:42 +0000 | [diff] [blame] | 999 | TP_printk("c=%p %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] | 1000 | __entry->call, |
David Howells | b54a134 | 2017-01-05 10:38:33 +0000 | [diff] [blame] | 1001 | __print_symbolic(__entry->why, rxrpc_timer_traces), |
David Howells | a158bdd | 2017-11-24 10:18:41 +0000 | [diff] [blame] | 1002 | __entry->ack_at - __entry->now, |
David Howells | bd1fdf8 | 2017-11-24 10:18:42 +0000 | [diff] [blame] | 1003 | __entry->ack_lost_at - __entry->now, |
David Howells | a158bdd | 2017-11-24 10:18:41 +0000 | [diff] [blame] | 1004 | __entry->resend_at - __entry->now, |
| 1005 | __entry->expect_rx_by - __entry->now, |
| 1006 | __entry->expect_req_by - __entry->now, |
| 1007 | __entry->expect_term_by - __entry->now, |
| 1008 | __entry->timer - __entry->now) |
David Howells | fc7ab6d | 2016-09-23 15:22:36 +0100 | [diff] [blame] | 1009 | ); |
| 1010 | |
David Howells | 89b475a | 2016-09-23 12:39:22 +0100 | [diff] [blame] | 1011 | TRACE_EVENT(rxrpc_rx_lose, |
| 1012 | TP_PROTO(struct rxrpc_skb_priv *sp), |
| 1013 | |
| 1014 | TP_ARGS(sp), |
| 1015 | |
| 1016 | TP_STRUCT__entry( |
| 1017 | __field_struct(struct rxrpc_host_header, hdr ) |
| 1018 | ), |
| 1019 | |
| 1020 | TP_fast_assign( |
| 1021 | memcpy(&__entry->hdr, &sp->hdr, sizeof(__entry->hdr)); |
| 1022 | ), |
| 1023 | |
| 1024 | TP_printk("%08x:%08x:%08x:%04x %08x %08x %02x %02x %s *LOSE*", |
| 1025 | __entry->hdr.epoch, __entry->hdr.cid, |
| 1026 | __entry->hdr.callNumber, __entry->hdr.serviceId, |
| 1027 | __entry->hdr.serial, __entry->hdr.seq, |
| 1028 | __entry->hdr.type, __entry->hdr.flags, |
David Howells | b54a134 | 2017-01-05 10:38:33 +0000 | [diff] [blame] | 1029 | __entry->hdr.type <= 15 ? |
| 1030 | __print_symbolic(__entry->hdr.type, rxrpc_pkts) : "?UNK") |
David Howells | 89b475a | 2016-09-23 12:39:22 +0100 | [diff] [blame] | 1031 | ); |
| 1032 | |
David Howells | 9c7ad43 | 2016-09-23 13:50:40 +0100 | [diff] [blame] | 1033 | TRACE_EVENT(rxrpc_propose_ack, |
| 1034 | TP_PROTO(struct rxrpc_call *call, enum rxrpc_propose_ack_trace why, |
| 1035 | u8 ack_reason, rxrpc_serial_t serial, bool immediate, |
| 1036 | bool background, enum rxrpc_propose_ack_outcome outcome), |
| 1037 | |
| 1038 | TP_ARGS(call, why, ack_reason, serial, immediate, background, |
| 1039 | outcome), |
| 1040 | |
| 1041 | TP_STRUCT__entry( |
| 1042 | __field(struct rxrpc_call *, call ) |
| 1043 | __field(enum rxrpc_propose_ack_trace, why ) |
| 1044 | __field(rxrpc_serial_t, serial ) |
| 1045 | __field(u8, ack_reason ) |
| 1046 | __field(bool, immediate ) |
| 1047 | __field(bool, background ) |
| 1048 | __field(enum rxrpc_propose_ack_outcome, outcome ) |
| 1049 | ), |
| 1050 | |
| 1051 | TP_fast_assign( |
| 1052 | __entry->call = call; |
| 1053 | __entry->why = why; |
| 1054 | __entry->serial = serial; |
| 1055 | __entry->ack_reason = ack_reason; |
| 1056 | __entry->immediate = immediate; |
| 1057 | __entry->background = background; |
| 1058 | __entry->outcome = outcome; |
| 1059 | ), |
| 1060 | |
| 1061 | TP_printk("c=%p %s %s r=%08x i=%u b=%u%s", |
| 1062 | __entry->call, |
David Howells | b54a134 | 2017-01-05 10:38:33 +0000 | [diff] [blame] | 1063 | __print_symbolic(__entry->why, rxrpc_propose_ack_traces), |
| 1064 | __print_symbolic(__entry->ack_reason, rxrpc_ack_names), |
David Howells | 9c7ad43 | 2016-09-23 13:50:40 +0100 | [diff] [blame] | 1065 | __entry->serial, |
| 1066 | __entry->immediate, |
| 1067 | __entry->background, |
David Howells | b54a134 | 2017-01-05 10:38:33 +0000 | [diff] [blame] | 1068 | __print_symbolic(__entry->outcome, rxrpc_propose_ack_outcomes)) |
David Howells | 9c7ad43 | 2016-09-23 13:50:40 +0100 | [diff] [blame] | 1069 | ); |
| 1070 | |
David Howells | c6672e3 | 2016-09-23 13:58:55 +0100 | [diff] [blame] | 1071 | TRACE_EVENT(rxrpc_retransmit, |
| 1072 | TP_PROTO(struct rxrpc_call *call, rxrpc_seq_t seq, u8 annotation, |
| 1073 | s64 expiry), |
| 1074 | |
| 1075 | TP_ARGS(call, seq, annotation, expiry), |
| 1076 | |
| 1077 | TP_STRUCT__entry( |
| 1078 | __field(struct rxrpc_call *, call ) |
| 1079 | __field(rxrpc_seq_t, seq ) |
| 1080 | __field(u8, annotation ) |
| 1081 | __field(s64, expiry ) |
| 1082 | ), |
| 1083 | |
| 1084 | TP_fast_assign( |
| 1085 | __entry->call = call; |
| 1086 | __entry->seq = seq; |
| 1087 | __entry->annotation = annotation; |
| 1088 | __entry->expiry = expiry; |
| 1089 | ), |
| 1090 | |
| 1091 | TP_printk("c=%p q=%x a=%02x xp=%lld", |
| 1092 | __entry->call, |
| 1093 | __entry->seq, |
| 1094 | __entry->annotation, |
| 1095 | __entry->expiry) |
| 1096 | ); |
| 1097 | |
David Howells | 5749434 | 2016-09-24 18:05:27 +0100 | [diff] [blame] | 1098 | TRACE_EVENT(rxrpc_congest, |
| 1099 | TP_PROTO(struct rxrpc_call *call, struct rxrpc_ack_summary *summary, |
| 1100 | rxrpc_serial_t ack_serial, enum rxrpc_congest_change change), |
| 1101 | |
| 1102 | TP_ARGS(call, summary, ack_serial, change), |
| 1103 | |
| 1104 | TP_STRUCT__entry( |
| 1105 | __field(struct rxrpc_call *, call ) |
| 1106 | __field(enum rxrpc_congest_change, change ) |
| 1107 | __field(rxrpc_seq_t, hard_ack ) |
| 1108 | __field(rxrpc_seq_t, top ) |
| 1109 | __field(rxrpc_seq_t, lowest_nak ) |
| 1110 | __field(rxrpc_serial_t, ack_serial ) |
| 1111 | __field_struct(struct rxrpc_ack_summary, sum ) |
| 1112 | ), |
| 1113 | |
| 1114 | TP_fast_assign( |
| 1115 | __entry->call = call; |
| 1116 | __entry->change = change; |
| 1117 | __entry->hard_ack = call->tx_hard_ack; |
| 1118 | __entry->top = call->tx_top; |
| 1119 | __entry->lowest_nak = call->acks_lowest_nak; |
| 1120 | __entry->ack_serial = ack_serial; |
| 1121 | memcpy(&__entry->sum, summary, sizeof(__entry->sum)); |
| 1122 | ), |
| 1123 | |
David Howells | bd1fdf8 | 2017-11-24 10:18:42 +0000 | [diff] [blame] | 1124 | TP_printk("c=%p 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] | 1125 | __entry->call, |
| 1126 | __entry->ack_serial, |
David Howells | b54a134 | 2017-01-05 10:38:33 +0000 | [diff] [blame] | 1127 | __print_symbolic(__entry->sum.ack_reason, rxrpc_ack_names), |
David Howells | 5749434 | 2016-09-24 18:05:27 +0100 | [diff] [blame] | 1128 | __entry->hard_ack, |
David Howells | b54a134 | 2017-01-05 10:38:33 +0000 | [diff] [blame] | 1129 | __print_symbolic(__entry->sum.mode, rxrpc_congest_modes), |
David Howells | 5749434 | 2016-09-24 18:05:27 +0100 | [diff] [blame] | 1130 | __entry->sum.cwnd, |
| 1131 | __entry->sum.ssthresh, |
| 1132 | __entry->sum.nr_acks, __entry->sum.nr_nacks, |
| 1133 | __entry->sum.nr_new_acks, __entry->sum.nr_new_nacks, |
| 1134 | __entry->sum.nr_rot_new_acks, |
| 1135 | __entry->top - __entry->hard_ack, |
| 1136 | __entry->sum.cumulative_acks, |
| 1137 | __entry->sum.dup_acks, |
| 1138 | __entry->lowest_nak, __entry->sum.new_low_nack ? "!" : "", |
David Howells | b54a134 | 2017-01-05 10:38:33 +0000 | [diff] [blame] | 1139 | __print_symbolic(__entry->change, rxrpc_congest_changes), |
David Howells | 5749434 | 2016-09-24 18:05:27 +0100 | [diff] [blame] | 1140 | __entry->sum.retrans_timeo ? " rTxTo" : "") |
| 1141 | ); |
| 1142 | |
David Howells | b1d9f7fd | 2017-01-05 10:38:34 +0000 | [diff] [blame] | 1143 | TRACE_EVENT(rxrpc_disconnect_call, |
| 1144 | TP_PROTO(struct rxrpc_call *call), |
| 1145 | |
| 1146 | TP_ARGS(call), |
| 1147 | |
| 1148 | TP_STRUCT__entry( |
| 1149 | __field(struct rxrpc_call *, call ) |
| 1150 | __field(u32, abort_code ) |
| 1151 | ), |
| 1152 | |
| 1153 | TP_fast_assign( |
| 1154 | __entry->call = call; |
| 1155 | __entry->abort_code = call->abort_code; |
| 1156 | ), |
| 1157 | |
| 1158 | TP_printk("c=%p ab=%08x", |
| 1159 | __entry->call, |
| 1160 | __entry->abort_code) |
| 1161 | ); |
| 1162 | |
| 1163 | TRACE_EVENT(rxrpc_improper_term, |
| 1164 | TP_PROTO(struct rxrpc_call *call), |
| 1165 | |
| 1166 | TP_ARGS(call), |
| 1167 | |
| 1168 | TP_STRUCT__entry( |
| 1169 | __field(struct rxrpc_call *, call ) |
| 1170 | __field(u32, abort_code ) |
| 1171 | ), |
| 1172 | |
| 1173 | TP_fast_assign( |
| 1174 | __entry->call = call; |
| 1175 | __entry->abort_code = call->abort_code; |
| 1176 | ), |
| 1177 | |
| 1178 | TP_printk("c=%p ab=%08x", |
| 1179 | __entry->call, |
| 1180 | __entry->abort_code) |
| 1181 | ); |
| 1182 | |
David Howells | fb46f6e | 2017-04-06 10:12:00 +0100 | [diff] [blame] | 1183 | TRACE_EVENT(rxrpc_rx_eproto, |
| 1184 | TP_PROTO(struct rxrpc_call *call, rxrpc_serial_t serial, |
| 1185 | const char *why), |
| 1186 | |
| 1187 | TP_ARGS(call, serial, why), |
| 1188 | |
| 1189 | TP_STRUCT__entry( |
| 1190 | __field(struct rxrpc_call *, call ) |
| 1191 | __field(rxrpc_serial_t, serial ) |
| 1192 | __field(const char *, why ) |
| 1193 | ), |
| 1194 | |
| 1195 | TP_fast_assign( |
| 1196 | __entry->call = call; |
| 1197 | __entry->serial = serial; |
| 1198 | __entry->why = why; |
| 1199 | ), |
| 1200 | |
| 1201 | TP_printk("c=%p EPROTO %08x %s", |
| 1202 | __entry->call, |
| 1203 | __entry->serial, |
| 1204 | __entry->why) |
| 1205 | ); |
| 1206 | |
David Howells | 89ca694 | 2017-04-06 10:12:00 +0100 | [diff] [blame] | 1207 | TRACE_EVENT(rxrpc_connect_call, |
| 1208 | TP_PROTO(struct rxrpc_call *call), |
| 1209 | |
| 1210 | TP_ARGS(call), |
| 1211 | |
| 1212 | TP_STRUCT__entry( |
| 1213 | __field(struct rxrpc_call *, call ) |
| 1214 | __field(unsigned long, user_call_ID ) |
| 1215 | __field(u32, cid ) |
| 1216 | __field(u32, call_id ) |
| 1217 | ), |
| 1218 | |
| 1219 | TP_fast_assign( |
| 1220 | __entry->call = call; |
| 1221 | __entry->user_call_ID = call->user_call_ID; |
| 1222 | __entry->cid = call->cid; |
| 1223 | __entry->call_id = call->call_id; |
| 1224 | ), |
| 1225 | |
| 1226 | TP_printk("c=%p u=%p %08x:%08x", |
| 1227 | __entry->call, |
| 1228 | (void *)__entry->user_call_ID, |
| 1229 | __entry->cid, |
| 1230 | __entry->call_id) |
| 1231 | ); |
| 1232 | |
David Howells | 827efed | 2018-03-27 23:02:47 +0100 | [diff] [blame^] | 1233 | TRACE_EVENT(rxrpc_resend, |
| 1234 | TP_PROTO(struct rxrpc_call *call, int ix), |
| 1235 | |
| 1236 | TP_ARGS(call, ix), |
| 1237 | |
| 1238 | TP_STRUCT__entry( |
| 1239 | __field(struct rxrpc_call *, call ) |
| 1240 | __field(int, ix ) |
| 1241 | __array(u8, anno, 64 ) |
| 1242 | ), |
| 1243 | |
| 1244 | TP_fast_assign( |
| 1245 | __entry->call = call; |
| 1246 | __entry->ix = ix; |
| 1247 | memcpy(__entry->anno, call->rxtx_annotations, 64); |
| 1248 | ), |
| 1249 | |
| 1250 | TP_printk("c=%p ix=%u a=%64phN", |
| 1251 | __entry->call, |
| 1252 | __entry->ix, |
| 1253 | __entry->anno) |
| 1254 | ); |
| 1255 | |
David Howells | df844fd | 2016-08-23 15:27:24 +0100 | [diff] [blame] | 1256 | #endif /* _TRACE_RXRPC_H */ |
| 1257 | |
| 1258 | /* This part must be outside protection */ |
| 1259 | #include <trace/define_trace.h> |