Coverage Report

Created: 2023-06-07 06:21

/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_CRYPTO_HANDSHAKE(...)
26
27
#define QUICLY_TRACER_CRYPTO_UPDATE_SECRET(...)
28
29
#define QUICLY_TRACER_CRYPTO_SEND_KEY_UPDATE(...)
30
31
#define QUICLY_TRACER_CRYPTO_SEND_KEY_UPDATE_CONFIRMED(...)
32
33
#define QUICLY_TRACER_CRYPTO_RECEIVE_KEY_UPDATE(...)
34
35
#define QUICLY_TRACER_CRYPTO_RECEIVE_KEY_UPDATE_PREPARE(...)
36
37
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)
38
0
{
39
0
    if (arg0->super.tracer.cb != NULL)
40
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);
41
0
}
42
43
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)
44
0
{
45
0
    if (arg0->super.tracer.cb != NULL)
46
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);
47
0
}
48
49
#define QUICLY_TRACER_PACKET_PREPARE(...)
50
51
static inline void QUICLY_TRACER_PACKET_ACKED(struct st_quicly_conn_t * arg0, int64_t arg1, uint64_t arg2, int arg3)
52
0
{
53
0
    if (arg0->super.tracer.cb != NULL)
54
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);
55
0
}
56
57
static inline void QUICLY_TRACER_PACKET_LOST(struct st_quicly_conn_t * arg0, int64_t arg1, uint64_t arg2, uint8_t arg3)
58
0
{
59
0
    if (arg0->super.tracer.cb != NULL)
60
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);
61
0
}
62
63
static inline void QUICLY_TRACER_PACKET_DECRYPTION_FAILED(struct st_quicly_conn_t * arg0, int64_t arg1, uint64_t arg2)
64
0
{
65
0
    if (arg0->super.tracer.cb != NULL)
66
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);
67
0
}
68
69
static inline void QUICLY_TRACER_PTO(struct st_quicly_conn_t * arg0, int64_t arg1, size_t arg2, uint32_t arg3, int8_t arg4)
70
0
{
71
0
    if (arg0->super.tracer.cb != NULL)
72
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);
73
0
}
74
75
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)
76
0
{
77
0
    if (arg0->super.tracer.cb != NULL)
78
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);
79
0
}
80
81
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)
82
0
{
83
0
    if (arg0->super.tracer.cb != NULL)
84
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);
85
0
}
86
87
#define QUICLY_TRACER_ACK_BLOCK_RECEIVED(...)
88
89
#define QUICLY_TRACER_ACK_DELAY_RECEIVED(...)
90
91
#define QUICLY_TRACER_ACK_SEND(...)
92
93
#define QUICLY_TRACER_PING_SEND(...)
94
95
#define QUICLY_TRACER_PING_RECEIVE(...)
96
97
#define QUICLY_TRACER_TRANSPORT_CLOSE_SEND(...)
98
99
#define QUICLY_TRACER_TRANSPORT_CLOSE_RECEIVE(...)
100
101
#define QUICLY_TRACER_APPLICATION_CLOSE_SEND(...)
102
103
#define QUICLY_TRACER_APPLICATION_CLOSE_RECEIVE(...)
104
105
#define QUICLY_TRACER_STREAM_SEND(...)
106
107
#define QUICLY_TRACER_STREAM_RECEIVE(...)
108
109
#define QUICLY_TRACER_STREAM_ACKED(...)
110
111
#define QUICLY_TRACER_STREAM_LOST(...)
112
113
#define QUICLY_TRACER_RESET_STREAM_SEND(...)
114
115
#define QUICLY_TRACER_RESET_STREAM_RECEIVE(...)
116
117
#define QUICLY_TRACER_STOP_SENDING_SEND(...)
118
119
#define QUICLY_TRACER_STOP_SENDING_RECEIVE(...)
120
121
static inline void QUICLY_TRACER_MAX_DATA_SEND(struct st_quicly_conn_t * arg0, int64_t arg1, uint64_t arg2)
122
0
{
123
0
    if (arg0->super.tracer.cb != NULL)
124
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);
125
0
}
126
127
static inline void QUICLY_TRACER_MAX_DATA_RECEIVE(struct st_quicly_conn_t * arg0, int64_t arg1, uint64_t arg2)
128
0
{
129
0
    if (arg0->super.tracer.cb != NULL)
130
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);
131
0
}
132
133
#define QUICLY_TRACER_MAX_STREAMS_SEND(...)
134
135
#define QUICLY_TRACER_MAX_STREAMS_RECEIVE(...)
136
137
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)
138
0
{
139
0
    if (arg0->super.tracer.cb != NULL)
140
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);
141
0
}
142
143
static inline void QUICLY_TRACER_MAX_STREAM_DATA_RECEIVE(struct st_quicly_conn_t * arg0, int64_t arg1, int64_t arg2, uint64_t arg3)
144
0
{
145
0
    if (arg0->super.tracer.cb != NULL)
146
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);
147
0
}
148
149
#define QUICLY_TRACER_NEW_TOKEN_SEND(...)
150
151
#define QUICLY_TRACER_NEW_TOKEN_ACKED(...)
152
153
#define QUICLY_TRACER_NEW_TOKEN_RECEIVE(...)
154
155
#define QUICLY_TRACER_HANDSHAKE_DONE_SEND(...)
156
157
#define QUICLY_TRACER_HANDSHAKE_DONE_RECEIVE(...)
158
159
static inline void QUICLY_TRACER_STREAMS_BLOCKED_SEND(struct st_quicly_conn_t * arg0, int64_t arg1, uint64_t arg2, int arg3)
160
0
{
161
0
    if (arg0->super.tracer.cb != NULL)
162
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);
163
0
}
164
165
static inline void QUICLY_TRACER_STREAMS_BLOCKED_RECEIVE(struct st_quicly_conn_t * arg0, int64_t arg1, uint64_t arg2, int arg3)
166
0
{
167
0
    if (arg0->super.tracer.cb != NULL)
168
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);
169
0
}
170
171
#define QUICLY_TRACER_NEW_CONNECTION_ID_SEND(...)
172
173
#define QUICLY_TRACER_NEW_CONNECTION_ID_RECEIVE(...)
174
175
#define QUICLY_TRACER_RETIRE_CONNECTION_ID_SEND(...)
176
177
#define QUICLY_TRACER_RETIRE_CONNECTION_ID_RECEIVE(...)
178
179
#define QUICLY_TRACER_DATA_BLOCKED_SEND(...)
180
181
#define QUICLY_TRACER_DATA_BLOCKED_RECEIVE(...)
182
183
#define QUICLY_TRACER_STREAM_DATA_BLOCKED_SEND(...)
184
185
#define QUICLY_TRACER_STREAM_DATA_BLOCKED_RECEIVE(...)
186
187
#define QUICLY_TRACER_DATAGRAM_SEND(...)
188
189
#define QUICLY_TRACER_DATAGRAM_RECEIVE(...)
190
191
#define QUICLY_TRACER_ACK_FREQUENCY_RECEIVE(...)
192
193
#define QUICLY_TRACER_QUICTRACE_SEND_STREAM(...)
194
195
#define QUICLY_TRACER_QUICTRACE_RECV_STREAM(...)
196
197
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)
198
0
{
199
0
    if (arg0->super.tracer.cb != NULL)
200
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);
201
0
}
202
203
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)
204
0
{
205
0
    if (arg0->super.tracer.cb != NULL)
206
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);
207
0
}
208
209
static inline void QUICLY_TRACER_STREAM_ON_OPEN(struct st_quicly_conn_t * arg0, int64_t arg1, struct st_quicly_stream_t * arg2)
210
0
{
211
0
    if (arg0->super.tracer.cb != NULL)
212
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);
213
0
}
214
215
static inline void QUICLY_TRACER_STREAM_ON_DESTROY(struct st_quicly_conn_t * arg0, int64_t arg1, struct st_quicly_stream_t * arg2, int arg3)
216
0
{
217
0
    if (arg0->super.tracer.cb != NULL)
218
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);
219
0
}
220
221
#define QUICLY_TRACER_STREAM_ON_SEND_SHIFT(...)
222
223
#define QUICLY_TRACER_STREAM_ON_SEND_EMIT(...)
224
225
#define QUICLY_TRACER_STREAM_ON_SEND_STOP(...)
226
227
#define QUICLY_TRACER_STREAM_ON_RECEIVE(...)
228
229
#define QUICLY_TRACER_STREAM_ON_RECEIVE_RESET(...)
230
231
#define QUICLY_TRACER_DEBUG_MESSAGE(...)
232
233
#define QUICLY_TRACER_CONN_STATS(...)
234
235
#endif