Coverage Report

Created: 2025-07-18 06:42

/src/h2o/quicly-tracer.h
Line
Count
Source (jump to first uncovered line)
1
#ifndef callback_probes_h
2
#define callback_probes_h
3
4
5
#define QUICLY_TRACER_CONNECT(...)
6
7
#define QUICLY_TRACER_ACCEPT(...)
8
9
#define QUICLY_TRACER_FREE(...)
10
11
#define QUICLY_TRACER_SEND(...)
12
13
#define QUICLY_TRACER_RECEIVE(...)
14
15
#define QUICLY_TRACER_VERSION_SWITCH(...)
16
17
#define QUICLY_TRACER_IDLE_TIMEOUT(...)
18
19
#define QUICLY_TRACER_HANDSHAKE_TIMEOUT(...)
20
21
#define QUICLY_TRACER_INITIAL_HANDSHAKE_PACKET_EXCEED(...)
22
23
#define QUICLY_TRACER_STATELESS_RESET_RECEIVE(...)
24
25
#define QUICLY_TRACER_NEW_PATH(...)
26
27
#define QUICLY_TRACER_DELETE_PATH(...)
28
29
#define QUICLY_TRACER_PROMOTE_PATH(...)
30
31
#define QUICLY_TRACER_ELICIT_PATH_MIGRATION(...)
32
33
#define QUICLY_TRACER_CRYPTO_HANDSHAKE(...)
34
35
#define QUICLY_TRACER_CRYPTO_UPDATE_SECRET(...)
36
37
#define QUICLY_TRACER_CRYPTO_SEND_KEY_UPDATE(...)
38
39
#define QUICLY_TRACER_CRYPTO_SEND_KEY_UPDATE_CONFIRMED(...)
40
41
#define QUICLY_TRACER_CRYPTO_RECEIVE_KEY_UPDATE(...)
42
43
#define QUICLY_TRACER_CRYPTO_RECEIVE_KEY_UPDATE_PREPARE(...)
44
45
static inline void QUICLY_TRACER_PACKET_SENT(struct st_quicly_conn_t * arg0, int64_t arg1, uint64_t arg2, size_t arg3, uint8_t arg4, int arg5)
46
0
{
47
0
    if (arg0->super.tracer.cb != NULL)
48
0
        arg0->super.tracer.cb(arg0->super.tracer.ctx, "{\"type\":\"packet-sent\", \"time\":%lld, \"pn\":%llu, \"len\":%llu, \"packet-type\":%llu, \"ack-only\":%lld}\n", (long long)arg1, (unsigned long long)arg2, (unsigned long long)arg3, (unsigned long long)arg4, (long long)arg5);
49
0
}
50
51
static inline void QUICLY_TRACER_PACKET_RECEIVED(struct st_quicly_conn_t * arg0, int64_t arg1, uint64_t arg2, const void * arg3, size_t arg4, uint8_t arg5)
52
0
{
53
0
    if (arg0->super.tracer.cb != NULL)
54
0
        arg0->super.tracer.cb(arg0->super.tracer.ctx, "{\"type\":\"packet-received\", \"time\":%lld, \"pn\":%llu, \"decrypted\":\"0x%llx\", \"decrypted-len\":%llu, \"packet-type\":%llu}\n", (long long)arg1, (unsigned long long)arg2, (unsigned long long)arg3, (unsigned long long)arg4, (unsigned long long)arg5);
55
0
}
56
57
#define QUICLY_TRACER_PACKET_PREPARE(...)
58
59
static inline void QUICLY_TRACER_PACKET_ACKED(struct st_quicly_conn_t * arg0, int64_t arg1, uint64_t arg2, int arg3)
60
0
{
61
0
    if (arg0->super.tracer.cb != NULL)
62
0
        arg0->super.tracer.cb(arg0->super.tracer.ctx, "{\"type\":\"packet-acked\", \"time\":%lld, \"pn\":%llu, \"is-late-ack\":%lld}\n", (long long)arg1, (unsigned long long)arg2, (long long)arg3);
63
0
}
64
65
static inline void QUICLY_TRACER_PACKET_LOST(struct st_quicly_conn_t * arg0, int64_t arg1, uint64_t arg2, uint8_t arg3)
66
0
{
67
0
    if (arg0->super.tracer.cb != NULL)
68
0
        arg0->super.tracer.cb(arg0->super.tracer.ctx, "{\"type\":\"packet-lost\", \"time\":%lld, \"pn\":%llu, \"packet-type\":%llu}\n", (long long)arg1, (unsigned long long)arg2, (unsigned long long)arg3);
69
0
}
70
71
static inline void QUICLY_TRACER_PACKET_DECRYPTION_FAILED(struct st_quicly_conn_t * arg0, int64_t arg1, uint64_t arg2)
72
0
{
73
0
    if (arg0->super.tracer.cb != NULL)
74
0
        arg0->super.tracer.cb(arg0->super.tracer.ctx, "{\"type\":\"packet-decryption-failed\", \"time\":%lld, \"pn\":%llu}\n", (long long)arg1, (unsigned long long)arg2);
75
0
}
76
77
static inline void QUICLY_TRACER_PTO(struct st_quicly_conn_t * arg0, int64_t arg1, size_t arg2, uint32_t arg3, int8_t arg4)
78
0
{
79
0
    if (arg0->super.tracer.cb != NULL)
80
0
        arg0->super.tracer.cb(arg0->super.tracer.ctx, "{\"type\":\"pto\", \"time\":%lld, \"inflight\":%llu, \"cwnd\":%llu, \"pto-count\":%lld}\n", (long long)arg1, (unsigned long long)arg2, (unsigned long long)arg3, (long long)arg4);
81
0
}
82
83
static inline void QUICLY_TRACER_CC_ACK_RECEIVED(struct st_quicly_conn_t * arg0, int64_t arg1, uint64_t arg2, size_t arg3, uint32_t arg4, size_t arg5)
84
0
{
85
0
    if (arg0->super.tracer.cb != NULL)
86
0
        arg0->super.tracer.cb(arg0->super.tracer.ctx, "{\"type\":\"cc-ack-received\", \"time\":%lld, \"largest-acked\":%llu, \"bytes-acked\":%llu, \"cwnd\":%llu, \"inflight\":%llu}\n", (long long)arg1, (unsigned long long)arg2, (unsigned long long)arg3, (unsigned long long)arg4, (unsigned long long)arg5);
87
0
}
88
89
static inline void QUICLY_TRACER_CC_CONGESTION(struct st_quicly_conn_t * arg0, int64_t arg1, uint64_t arg2, size_t arg3, uint32_t arg4)
90
0
{
91
0
    if (arg0->super.tracer.cb != NULL)
92
0
        arg0->super.tracer.cb(arg0->super.tracer.ctx, "{\"type\":\"cc-congestion\", \"time\":%lld, \"max-lost-pn\":%llu, \"inflight\":%llu, \"cwnd\":%llu}\n", (long long)arg1, (unsigned long long)arg2, (unsigned long long)arg3, (unsigned long long)arg4);
93
0
}
94
95
#define QUICLY_TRACER_ACK_BLOCK_RECEIVED(...)
96
97
#define QUICLY_TRACER_ACK_DELAY_RECEIVED(...)
98
99
#define QUICLY_TRACER_ACK_SEND(...)
100
101
#define QUICLY_TRACER_PING_SEND(...)
102
103
#define QUICLY_TRACER_PING_RECEIVE(...)
104
105
#define QUICLY_TRACER_TRANSPORT_CLOSE_SEND(...)
106
107
#define QUICLY_TRACER_TRANSPORT_CLOSE_RECEIVE(...)
108
109
#define QUICLY_TRACER_APPLICATION_CLOSE_SEND(...)
110
111
#define QUICLY_TRACER_APPLICATION_CLOSE_RECEIVE(...)
112
113
#define QUICLY_TRACER_STREAM_SEND(...)
114
115
#define QUICLY_TRACER_STREAM_RECEIVE(...)
116
117
#define QUICLY_TRACER_STREAM_ACKED(...)
118
119
#define QUICLY_TRACER_STREAM_LOST(...)
120
121
#define QUICLY_TRACER_RESET_STREAM_SEND(...)
122
123
#define QUICLY_TRACER_RESET_STREAM_RECEIVE(...)
124
125
#define QUICLY_TRACER_STOP_SENDING_SEND(...)
126
127
#define QUICLY_TRACER_STOP_SENDING_RECEIVE(...)
128
129
static inline void QUICLY_TRACER_MAX_DATA_SEND(struct st_quicly_conn_t * arg0, int64_t arg1, uint64_t arg2)
130
0
{
131
0
    if (arg0->super.tracer.cb != NULL)
132
0
        arg0->super.tracer.cb(arg0->super.tracer.ctx, "{\"type\":\"max-data-send\", \"time\":%lld, \"maximum\":%llu}\n", (long long)arg1, (unsigned long long)arg2);
133
0
}
134
135
static inline void QUICLY_TRACER_MAX_DATA_RECEIVE(struct st_quicly_conn_t * arg0, int64_t arg1, uint64_t arg2)
136
0
{
137
0
    if (arg0->super.tracer.cb != NULL)
138
0
        arg0->super.tracer.cb(arg0->super.tracer.ctx, "{\"type\":\"max-data-receive\", \"time\":%lld, \"maximum\":%llu}\n", (long long)arg1, (unsigned long long)arg2);
139
0
}
140
141
#define QUICLY_TRACER_MAX_STREAMS_SEND(...)
142
143
#define QUICLY_TRACER_MAX_STREAMS_RECEIVE(...)
144
145
static inline void QUICLY_TRACER_MAX_STREAM_DATA_SEND(struct st_quicly_conn_t * arg0, int64_t arg1, struct st_quicly_stream_t * arg2, uint64_t arg3)
146
0
{
147
0
    if (arg0->super.tracer.cb != NULL)
148
0
        arg0->super.tracer.cb(arg0->super.tracer.ctx, "{\"type\":\"max-stream-data-send\", \"time\":%lld, \"stream-id\":%d, \"maximum\":%llu}\n", (long long)arg1, (int)arg2->stream_id, (unsigned long long)arg3);
149
0
}
150
151
static inline void QUICLY_TRACER_MAX_STREAM_DATA_RECEIVE(struct st_quicly_conn_t * arg0, int64_t arg1, int64_t arg2, uint64_t arg3)
152
0
{
153
0
    if (arg0->super.tracer.cb != NULL)
154
0
        arg0->super.tracer.cb(arg0->super.tracer.ctx, "{\"type\":\"max-stream-data-receive\", \"time\":%lld, \"stream-id\":%lld, \"maximum\":%llu}\n", (long long)arg1, (long long)arg2, (unsigned long long)arg3);
155
0
}
156
157
#define QUICLY_TRACER_NEW_TOKEN_SEND(...)
158
159
#define QUICLY_TRACER_NEW_TOKEN_ACKED(...)
160
161
#define QUICLY_TRACER_NEW_TOKEN_RECEIVE(...)
162
163
#define QUICLY_TRACER_HANDSHAKE_DONE_SEND(...)
164
165
#define QUICLY_TRACER_HANDSHAKE_DONE_RECEIVE(...)
166
167
static inline void QUICLY_TRACER_STREAMS_BLOCKED_SEND(struct st_quicly_conn_t * arg0, int64_t arg1, uint64_t arg2, int arg3)
168
0
{
169
0
    if (arg0->super.tracer.cb != NULL)
170
0
        arg0->super.tracer.cb(arg0->super.tracer.ctx, "{\"type\":\"streams-blocked-send\", \"time\":%lld, \"maximum\":%llu, \"is-unidirectional\":%lld}\n", (long long)arg1, (unsigned long long)arg2, (long long)arg3);
171
0
}
172
173
static inline void QUICLY_TRACER_STREAMS_BLOCKED_RECEIVE(struct st_quicly_conn_t * arg0, int64_t arg1, uint64_t arg2, int arg3)
174
0
{
175
0
    if (arg0->super.tracer.cb != NULL)
176
0
        arg0->super.tracer.cb(arg0->super.tracer.ctx, "{\"type\":\"streams-blocked-receive\", \"time\":%lld, \"maximum\":%llu, \"is-unidirectional\":%lld}\n", (long long)arg1, (unsigned long long)arg2, (long long)arg3);
177
0
}
178
179
#define QUICLY_TRACER_NEW_CONNECTION_ID_SEND(...)
180
181
#define QUICLY_TRACER_NEW_CONNECTION_ID_RECEIVE(...)
182
183
#define QUICLY_TRACER_RETIRE_CONNECTION_ID_SEND(...)
184
185
#define QUICLY_TRACER_RETIRE_CONNECTION_ID_RECEIVE(...)
186
187
#define QUICLY_TRACER_DATA_BLOCKED_SEND(...)
188
189
#define QUICLY_TRACER_DATA_BLOCKED_RECEIVE(...)
190
191
#define QUICLY_TRACER_STREAM_DATA_BLOCKED_SEND(...)
192
193
#define QUICLY_TRACER_STREAM_DATA_BLOCKED_RECEIVE(...)
194
195
#define QUICLY_TRACER_ECN_VALIDATION(...)
196
197
#define QUICLY_TRACER_ECN_CONGESTION(...)
198
199
#define QUICLY_TRACER_PATH_CHALLENGE_SEND(...)
200
201
#define QUICLY_TRACER_PATH_CHALLENGE_RECEIVE(...)
202
203
#define QUICLY_TRACER_PATH_RESPONSE_SEND(...)
204
205
#define QUICLY_TRACER_PATH_RESPONSE_RECEIVE(...)
206
207
#define QUICLY_TRACER_DATAGRAM_SEND(...)
208
209
#define QUICLY_TRACER_DATAGRAM_RECEIVE(...)
210
211
#define QUICLY_TRACER_ACK_FREQUENCY_RECEIVE(...)
212
213
#define QUICLY_TRACER_QUICTRACE_SEND_STREAM(...)
214
215
#define QUICLY_TRACER_QUICTRACE_RECV_STREAM(...)
216
217
static inline void QUICLY_TRACER_QUICTRACE_CC_ACK(struct st_quicly_conn_t * arg0, int64_t arg1, struct quicly_rtt_t * arg2, uint32_t arg3, size_t arg4)
218
0
{
219
0
    if (arg0->super.tracer.cb != NULL)
220
0
        arg0->super.tracer.cb(arg0->super.tracer.ctx, "{\"type\":\"quictrace-cc-ack\", \"time\":%lld, \"min-rtt\":%u, \"smoothed-rtt\":%u, \"latest-rtt\":%u, \"cwnd\":%llu, \"inflight\":%llu}\n", (long long)arg1, arg2->minimum, arg2->smoothed, arg2->latest, (unsigned long long)arg3, (unsigned long long)arg4);
221
0
}
222
223
static inline void QUICLY_TRACER_QUICTRACE_CC_LOST(struct st_quicly_conn_t * arg0, int64_t arg1, struct quicly_rtt_t * arg2, uint32_t arg3, size_t arg4)
224
0
{
225
0
    if (arg0->super.tracer.cb != NULL)
226
0
        arg0->super.tracer.cb(arg0->super.tracer.ctx, "{\"type\":\"quictrace-cc-lost\", \"time\":%lld, \"min-rtt\":%u, \"smoothed-rtt\":%u, \"latest-rtt\":%u, \"cwnd\":%llu, \"inflight\":%llu}\n", (long long)arg1, arg2->minimum, arg2->smoothed, arg2->latest, (unsigned long long)arg3, (unsigned long long)arg4);
227
0
}
228
229
static inline void QUICLY_TRACER_STREAM_ON_OPEN(struct st_quicly_conn_t * arg0, int64_t arg1, struct st_quicly_stream_t * arg2)
230
0
{
231
0
    if (arg0->super.tracer.cb != NULL)
232
0
        arg0->super.tracer.cb(arg0->super.tracer.ctx, "{\"type\":\"stream-on-open\", \"time\":%lld, \"stream-id\":%d}\n", (long long)arg1, (int)arg2->stream_id);
233
0
}
234
235
static inline void QUICLY_TRACER_STREAM_ON_DESTROY(struct st_quicly_conn_t * arg0, int64_t arg1, struct st_quicly_stream_t * arg2, int64_t arg3)
236
0
{
237
0
    if (arg0->super.tracer.cb != NULL)
238
0
        arg0->super.tracer.cb(arg0->super.tracer.ctx, "{\"type\":\"stream-on-destroy\", \"time\":%lld, \"stream-id\":%d, \"err\":%lld}\n", (long long)arg1, (int)arg2->stream_id, (long long)arg3);
239
0
}
240
241
#define QUICLY_TRACER_STREAM_ON_SEND_SHIFT(...)
242
243
#define QUICLY_TRACER_STREAM_ON_SEND_EMIT(...)
244
245
#define QUICLY_TRACER_STREAM_ON_SEND_STOP(...)
246
247
#define QUICLY_TRACER_STREAM_ON_RECEIVE(...)
248
249
#define QUICLY_TRACER_STREAM_ON_RECEIVE_RESET(...)
250
251
#define QUICLY_TRACER_ENTER_CC_LIMITED(...)
252
253
#define QUICLY_TRACER_EXIT_CC_LIMITED(...)
254
255
#define QUICLY_TRACER_DEBUG_MESSAGE(...)
256
257
#define QUICLY_TRACER_CONN_STATS(...)
258
259
#endif