hc
2024-01-31 f9004dbfff8a3fbbd7e2a88c8a4327c7f2f8e5b2
kernel/include/trace/events/rxrpc.h
....@@ -1,12 +1,8 @@
1
+/* SPDX-License-Identifier: GPL-2.0-or-later */
12 /* AF_RXRPC tracepoints
23 *
34 * Copyright (C) 2016 Red Hat, Inc. All Rights Reserved.
45 * 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.
106 */
117 #undef TRACE_SYSTEM
128 #define TRACE_SYSTEM rxrpc
....@@ -27,20 +23,17 @@
2723 #define __RXRPC_DECLARE_TRACE_ENUMS_ONCE_ONLY
2824
2925 enum rxrpc_skb_trace {
30
- rxrpc_skb_rx_cleaned,
31
- rxrpc_skb_rx_freed,
32
- rxrpc_skb_rx_got,
33
- rxrpc_skb_rx_lost,
34
- rxrpc_skb_rx_purged,
35
- rxrpc_skb_rx_received,
36
- rxrpc_skb_rx_rotated,
37
- rxrpc_skb_rx_seen,
38
- rxrpc_skb_tx_cleaned,
39
- rxrpc_skb_tx_freed,
40
- rxrpc_skb_tx_got,
41
- rxrpc_skb_tx_new,
42
- rxrpc_skb_tx_rotated,
43
- rxrpc_skb_tx_seen,
26
+ rxrpc_skb_cleaned,
27
+ rxrpc_skb_freed,
28
+ rxrpc_skb_got,
29
+ rxrpc_skb_lost,
30
+ rxrpc_skb_new,
31
+ rxrpc_skb_purged,
32
+ rxrpc_skb_received,
33
+ rxrpc_skb_rotated,
34
+ rxrpc_skb_seen,
35
+ rxrpc_skb_unshared,
36
+ rxrpc_skb_unshared_nomem,
4437 };
4538
4639 enum rxrpc_local_trace {
....@@ -75,21 +68,14 @@
7568 rxrpc_client_chan_activate,
7669 rxrpc_client_chan_disconnect,
7770 rxrpc_client_chan_pass,
78
- rxrpc_client_chan_unstarted,
7971 rxrpc_client_chan_wait_failed,
8072 rxrpc_client_cleanup,
81
- rxrpc_client_count,
8273 rxrpc_client_discard,
8374 rxrpc_client_duplicate,
8475 rxrpc_client_exposed,
8576 rxrpc_client_replace,
8677 rxrpc_client_to_active,
87
- rxrpc_client_to_culled,
8878 rxrpc_client_to_idle,
89
- rxrpc_client_to_inactive,
90
- rxrpc_client_to_upgrade,
91
- rxrpc_client_to_waiting,
92
- rxrpc_client_uncount,
9379 };
9480
9581 enum rxrpc_call_trace {
....@@ -97,12 +83,15 @@
9783 rxrpc_call_error,
9884 rxrpc_call_got,
9985 rxrpc_call_got_kernel,
86
+ rxrpc_call_got_timer,
10087 rxrpc_call_got_userid,
10188 rxrpc_call_new_client,
10289 rxrpc_call_new_service,
10390 rxrpc_call_put,
10491 rxrpc_call_put_kernel,
10592 rxrpc_call_put_noqueue,
93
+ rxrpc_call_put_notimer,
94
+ rxrpc_call_put_timer,
10695 rxrpc_call_put_userid,
10796 rxrpc_call_queued,
10897 rxrpc_call_queued_ref,
....@@ -145,11 +134,16 @@
145134 };
146135
147136 enum rxrpc_rtt_tx_trace {
137
+ rxrpc_rtt_tx_cancel,
148138 rxrpc_rtt_tx_data,
139
+ rxrpc_rtt_tx_no_slot,
149140 rxrpc_rtt_tx_ping,
150141 };
151142
152143 enum rxrpc_rtt_rx_trace {
144
+ rxrpc_rtt_rx_cancel,
145
+ rxrpc_rtt_rx_lost,
146
+ rxrpc_rtt_rx_obsolete,
153147 rxrpc_rtt_rx_ping_response,
154148 rxrpc_rtt_rx_requested_ack,
155149 };
....@@ -182,6 +176,7 @@
182176 enum rxrpc_propose_ack_trace {
183177 rxrpc_propose_ack_client_tx_end,
184178 rxrpc_propose_ack_input_data,
179
+ rxrpc_propose_ack_ping_for_check_life,
185180 rxrpc_propose_ack_ping_for_keepalive,
186181 rxrpc_propose_ack_ping_for_lost_ack,
187182 rxrpc_propose_ack_ping_for_lost_reply,
....@@ -231,20 +226,17 @@
231226 * Declare tracing information enums and their string mappings for display.
232227 */
233228 #define rxrpc_skb_traces \
234
- EM(rxrpc_skb_rx_cleaned, "Rx CLN") \
235
- EM(rxrpc_skb_rx_freed, "Rx FRE") \
236
- EM(rxrpc_skb_rx_got, "Rx GOT") \
237
- EM(rxrpc_skb_rx_lost, "Rx *L*") \
238
- EM(rxrpc_skb_rx_purged, "Rx PUR") \
239
- EM(rxrpc_skb_rx_received, "Rx RCV") \
240
- EM(rxrpc_skb_rx_rotated, "Rx ROT") \
241
- EM(rxrpc_skb_rx_seen, "Rx SEE") \
242
- EM(rxrpc_skb_tx_cleaned, "Tx CLN") \
243
- EM(rxrpc_skb_tx_freed, "Tx FRE") \
244
- EM(rxrpc_skb_tx_got, "Tx GOT") \
245
- EM(rxrpc_skb_tx_new, "Tx NEW") \
246
- EM(rxrpc_skb_tx_rotated, "Tx ROT") \
247
- E_(rxrpc_skb_tx_seen, "Tx SEE")
229
+ EM(rxrpc_skb_cleaned, "CLN") \
230
+ EM(rxrpc_skb_freed, "FRE") \
231
+ EM(rxrpc_skb_got, "GOT") \
232
+ EM(rxrpc_skb_lost, "*L*") \
233
+ EM(rxrpc_skb_new, "NEW") \
234
+ EM(rxrpc_skb_purged, "PUR") \
235
+ EM(rxrpc_skb_received, "RCV") \
236
+ EM(rxrpc_skb_rotated, "ROT") \
237
+ EM(rxrpc_skb_seen, "SEE") \
238
+ EM(rxrpc_skb_unshared, "UNS") \
239
+ E_(rxrpc_skb_unshared_nomem, "US0")
248240
249241 #define rxrpc_local_traces \
250242 EM(rxrpc_local_got, "GOT") \
....@@ -275,41 +267,29 @@
275267 EM(rxrpc_client_chan_activate, "ChActv") \
276268 EM(rxrpc_client_chan_disconnect, "ChDisc") \
277269 EM(rxrpc_client_chan_pass, "ChPass") \
278
- EM(rxrpc_client_chan_unstarted, "ChUnst") \
279270 EM(rxrpc_client_chan_wait_failed, "ChWtFl") \
280271 EM(rxrpc_client_cleanup, "Clean ") \
281
- EM(rxrpc_client_count, "Count ") \
282272 EM(rxrpc_client_discard, "Discar") \
283273 EM(rxrpc_client_duplicate, "Duplic") \
284274 EM(rxrpc_client_exposed, "Expose") \
285275 EM(rxrpc_client_replace, "Replac") \
286276 EM(rxrpc_client_to_active, "->Actv") \
287
- EM(rxrpc_client_to_culled, "->Cull") \
288
- EM(rxrpc_client_to_idle, "->Idle") \
289
- EM(rxrpc_client_to_inactive, "->Inac") \
290
- EM(rxrpc_client_to_upgrade, "->Upgd") \
291
- EM(rxrpc_client_to_waiting, "->Wait") \
292
- E_(rxrpc_client_uncount, "Uncoun")
293
-
294
-#define rxrpc_conn_cache_states \
295
- EM(RXRPC_CONN_CLIENT_INACTIVE, "Inac") \
296
- EM(RXRPC_CONN_CLIENT_WAITING, "Wait") \
297
- EM(RXRPC_CONN_CLIENT_ACTIVE, "Actv") \
298
- EM(RXRPC_CONN_CLIENT_UPGRADE, "Upgd") \
299
- EM(RXRPC_CONN_CLIENT_CULLED, "Cull") \
300
- E_(RXRPC_CONN_CLIENT_IDLE, "Idle") \
277
+ E_(rxrpc_client_to_idle, "->Idle")
301278
302279 #define rxrpc_call_traces \
303280 EM(rxrpc_call_connected, "CON") \
304281 EM(rxrpc_call_error, "*E*") \
305282 EM(rxrpc_call_got, "GOT") \
306283 EM(rxrpc_call_got_kernel, "Gke") \
284
+ EM(rxrpc_call_got_timer, "GTM") \
307285 EM(rxrpc_call_got_userid, "Gus") \
308286 EM(rxrpc_call_new_client, "NWc") \
309287 EM(rxrpc_call_new_service, "NWs") \
310288 EM(rxrpc_call_put, "PUT") \
311289 EM(rxrpc_call_put_kernel, "Pke") \
312
- EM(rxrpc_call_put_noqueue, "PNQ") \
290
+ EM(rxrpc_call_put_noqueue, "PnQ") \
291
+ EM(rxrpc_call_put_notimer, "PnT") \
292
+ EM(rxrpc_call_put_timer, "PTM") \
313293 EM(rxrpc_call_put_userid, "Pus") \
314294 EM(rxrpc_call_queued, "QUE") \
315295 EM(rxrpc_call_queued_ref, "QUR") \
....@@ -348,10 +328,15 @@
348328 E_(rxrpc_recvmsg_wait, "WAIT")
349329
350330 #define rxrpc_rtt_tx_traces \
331
+ EM(rxrpc_rtt_tx_cancel, "CNCE") \
351332 EM(rxrpc_rtt_tx_data, "DATA") \
333
+ EM(rxrpc_rtt_tx_no_slot, "FULL") \
352334 E_(rxrpc_rtt_tx_ping, "PING")
353335
354336 #define rxrpc_rtt_rx_traces \
337
+ EM(rxrpc_rtt_rx_cancel, "CNCL") \
338
+ EM(rxrpc_rtt_rx_obsolete, "OBSL") \
339
+ EM(rxrpc_rtt_rx_lost, "LOST") \
355340 EM(rxrpc_rtt_rx_ping_response, "PONG") \
356341 E_(rxrpc_rtt_rx_requested_ack, "RACK")
357342
....@@ -382,6 +367,7 @@
382367 #define rxrpc_propose_ack_traces \
383368 EM(rxrpc_propose_ack_client_tx_end, "ClTxEnd") \
384369 EM(rxrpc_propose_ack_input_data, "DataIn ") \
370
+ EM(rxrpc_propose_ack_ping_for_check_life, "ChkLife") \
385371 EM(rxrpc_propose_ack_ping_for_keepalive, "KeepAlv") \
386372 EM(rxrpc_propose_ack_ping_for_lost_ack, "LostAck") \
387373 EM(rxrpc_propose_ack_ping_for_lost_reply, "LostRpl") \
....@@ -592,32 +578,29 @@
592578 __field(int, channel )
593579 __field(int, usage )
594580 __field(enum rxrpc_client_trace, op )
595
- __field(enum rxrpc_conn_cache_state, cs )
596581 ),
597582
598583 TP_fast_assign(
599
- __entry->conn = conn->debug_id;
584
+ __entry->conn = conn ? conn->debug_id : 0;
600585 __entry->channel = channel;
601
- __entry->usage = atomic_read(&conn->usage);
586
+ __entry->usage = conn ? refcount_read(&conn->ref) : -2;
602587 __entry->op = op;
603
- __entry->cid = conn->proto.cid;
604
- __entry->cs = conn->cache_state;
588
+ __entry->cid = conn ? conn->proto.cid : 0;
605589 ),
606590
607
- TP_printk("C=%08x h=%2d %s %s i=%08x u=%d",
591
+ TP_printk("C=%08x h=%2d %s i=%08x u=%d",
608592 __entry->conn,
609593 __entry->channel,
610594 __print_symbolic(__entry->op, rxrpc_client_traces),
611
- __print_symbolic(__entry->cs, rxrpc_conn_cache_states),
612595 __entry->cid,
613596 __entry->usage)
614597 );
615598
616599 TRACE_EVENT(rxrpc_call,
617
- TP_PROTO(struct rxrpc_call *call, enum rxrpc_call_trace op,
600
+ TP_PROTO(unsigned int call_debug_id, enum rxrpc_call_trace op,
618601 int usage, const void *where, const void *aux),
619602
620
- TP_ARGS(call, op, usage, where, aux),
603
+ TP_ARGS(call_debug_id, op, usage, where, aux),
621604
622605 TP_STRUCT__entry(
623606 __field(unsigned int, call )
....@@ -628,7 +611,7 @@
628611 ),
629612
630613 TP_fast_assign(
631
- __entry->call = call->debug_id;
614
+ __entry->call = call_debug_id;
632615 __entry->op = op;
633616 __entry->usage = usage;
634617 __entry->where = where;
....@@ -645,13 +628,14 @@
645628
646629 TRACE_EVENT(rxrpc_skb,
647630 TP_PROTO(struct sk_buff *skb, enum rxrpc_skb_trace op,
648
- int usage, int mod_count, const void *where),
631
+ int usage, int mod_count, u8 flags, const void *where),
649632
650
- TP_ARGS(skb, op, usage, mod_count, where),
633
+ TP_ARGS(skb, op, usage, mod_count, flags, where),
651634
652635 TP_STRUCT__entry(
653636 __field(struct sk_buff *, skb )
654637 __field(enum rxrpc_skb_trace, op )
638
+ __field(u8, flags )
655639 __field(int, usage )
656640 __field(int, mod_count )
657641 __field(const void *, where )
....@@ -659,14 +643,16 @@
659643
660644 TP_fast_assign(
661645 __entry->skb = skb;
646
+ __entry->flags = flags;
662647 __entry->op = op;
663648 __entry->usage = usage;
664649 __entry->mod_count = mod_count;
665650 __entry->where = where;
666651 ),
667652
668
- TP_printk("s=%p %s u=%d m=%d p=%pSR",
653
+ TP_printk("s=%p %cx %s u=%d m=%d p=%pSR",
669654 __entry->skb,
655
+ __entry->flags & RXRPC_SKB_TX_BUFFER ? 'T' : 'R',
670656 __print_symbolic(__entry->op, rxrpc_skb_traces),
671657 __entry->usage,
672658 __entry->mod_count,
....@@ -1092,63 +1078,67 @@
10921078
10931079 TRACE_EVENT(rxrpc_rtt_tx,
10941080 TP_PROTO(struct rxrpc_call *call, enum rxrpc_rtt_tx_trace why,
1095
- rxrpc_serial_t send_serial),
1081
+ int slot, rxrpc_serial_t send_serial),
10961082
1097
- TP_ARGS(call, why, send_serial),
1083
+ TP_ARGS(call, why, slot, send_serial),
10981084
10991085 TP_STRUCT__entry(
11001086 __field(unsigned int, call )
11011087 __field(enum rxrpc_rtt_tx_trace, why )
1088
+ __field(int, slot )
11021089 __field(rxrpc_serial_t, send_serial )
11031090 ),
11041091
11051092 TP_fast_assign(
11061093 __entry->call = call->debug_id;
11071094 __entry->why = why;
1095
+ __entry->slot = slot;
11081096 __entry->send_serial = send_serial;
11091097 ),
11101098
1111
- TP_printk("c=%08x %s sr=%08x",
1099
+ TP_printk("c=%08x [%d] %s sr=%08x",
11121100 __entry->call,
1101
+ __entry->slot,
11131102 __print_symbolic(__entry->why, rxrpc_rtt_tx_traces),
11141103 __entry->send_serial)
11151104 );
11161105
11171106 TRACE_EVENT(rxrpc_rtt_rx,
11181107 TP_PROTO(struct rxrpc_call *call, enum rxrpc_rtt_rx_trace why,
1108
+ int slot,
11191109 rxrpc_serial_t send_serial, rxrpc_serial_t resp_serial,
1120
- s64 rtt, u8 nr, s64 avg),
1110
+ u32 rtt, u32 rto),
11211111
1122
- TP_ARGS(call, why, send_serial, resp_serial, rtt, nr, avg),
1112
+ TP_ARGS(call, why, slot, send_serial, resp_serial, rtt, rto),
11231113
11241114 TP_STRUCT__entry(
11251115 __field(unsigned int, call )
11261116 __field(enum rxrpc_rtt_rx_trace, why )
1127
- __field(u8, nr )
1117
+ __field(int, slot )
11281118 __field(rxrpc_serial_t, send_serial )
11291119 __field(rxrpc_serial_t, resp_serial )
1130
- __field(s64, rtt )
1131
- __field(u64, avg )
1120
+ __field(u32, rtt )
1121
+ __field(u32, rto )
11321122 ),
11331123
11341124 TP_fast_assign(
11351125 __entry->call = call->debug_id;
11361126 __entry->why = why;
1127
+ __entry->slot = slot;
11371128 __entry->send_serial = send_serial;
11381129 __entry->resp_serial = resp_serial;
11391130 __entry->rtt = rtt;
1140
- __entry->nr = nr;
1141
- __entry->avg = avg;
1131
+ __entry->rto = rto;
11421132 ),
11431133
1144
- TP_printk("c=%08x %s sr=%08x rr=%08x rtt=%lld nr=%u avg=%lld",
1134
+ TP_printk("c=%08x [%d] %s sr=%08x rr=%08x rtt=%u rto=%u",
11451135 __entry->call,
1136
+ __entry->slot,
11461137 __print_symbolic(__entry->why, rxrpc_rtt_rx_traces),
11471138 __entry->send_serial,
11481139 __entry->resp_serial,
11491140 __entry->rtt,
1150
- __entry->nr,
1151
- __entry->avg)
1141
+ __entry->rto)
11521142 );
11531143
11541144 TRACE_EVENT(rxrpc_timer,
....@@ -1519,7 +1509,7 @@
15191509 __entry->call_serial = call->rx_serial;
15201510 __entry->conn_serial = call->conn->hi_serial;
15211511 __entry->tx_seq = call->tx_hard_ack;
1522
- __entry->rx_seq = call->ackr_seen;
1512
+ __entry->rx_seq = call->rx_hard_ack;
15231513 ),
15241514
15251515 TP_printk("c=%08x %08x:%08x r=%08x/%08x tx=%08x rx=%08x",