14 #ifdef USE_TRACING_INSTRUMENTATION_LTTNG
17 #undef TRACEPOINT_PROVIDER
18 #define TRACEPOINT_PROVIDER tor_circuit
20 #undef TRACEPOINT_INCLUDE
21 #define TRACEPOINT_INCLUDE "./src/core/or/lttng_circuit.inc"
23 #if !defined(LTTNG_CIRCUIT_INC) || defined(TRACEPOINT_HEADER_MULTI_READ)
24 #define LTTNG_CIRCUIT_INC
26 #include <lttng/tracepoint.h>
35 TRACEPOINT_ENUM(tor_circuit, purpose,
38 ctf_enum_value(
"<UNSET>", 0)
43 ctf_enum_value(
"OR_REND_POINT_WAITING",
50 ctf_enum_value(
"C_INTRODUCE_ACK_WAIT",
55 ctf_enum_value(
"C_REND_READY_INTRO_ACKED",
88 TRACEPOINT_ENUM(tor_circuit, end_reason,
91 ctf_enum_value(
"IP_NOW_REDUNDANT", END_CIRC_REASON_IP_NOW_REDUNDANT)
95 ctf_enum_value(
"NONE", END_CIRC_REASON_NONE)
96 ctf_enum_value(
"TORPROTOCOL", END_CIRC_REASON_TORPROTOCOL)
97 ctf_enum_value(
"INTERNAL", END_CIRC_REASON_INTERNAL)
98 ctf_enum_value(
"REQUESTED", END_CIRC_REASON_REQUESTED)
99 ctf_enum_value(
"HIBERNATING", END_CIRC_REASON_HIBERNATING)
100 ctf_enum_value(
"RESOURCELIMIT", END_CIRC_REASON_RESOURCELIMIT)
101 ctf_enum_value(
"CONNECTFAILED", END_CIRC_REASON_CONNECTFAILED)
102 ctf_enum_value(
"OR_IDENTITY", END_CIRC_REASON_OR_IDENTITY)
103 ctf_enum_value(
"CHANNEL_CLOSED", END_CIRC_REASON_CHANNEL_CLOSED)
104 ctf_enum_value(
"FINISHED", END_CIRC_REASON_FINISHED)
105 ctf_enum_value(
"TIMEOUT", END_CIRC_REASON_TIMEOUT)
106 ctf_enum_value(
"DESTROYED", END_CIRC_REASON_DESTROYED)
107 ctf_enum_value(
"NOSUCHSERVICE", END_CIRC_REASON_NOSUCHSERVICE)
111 ctf_enum_value(
"REMOTE_TORPROTOCOL",
113 ctf_enum_value(
"REMOTE_INTERNAL",
115 ctf_enum_value(
"REMOTE_REQUESTED",
117 ctf_enum_value(
"REMOTE_HIBERNATING",
119 ctf_enum_value(
"REMOTE_RESOURCELIMIT",
121 ctf_enum_value(
"REMOTE_CONNECTFAILED",
123 ctf_enum_value(
"REMOTE_OR_IDENTITY",
125 ctf_enum_value(
"REMOTE_CHANNEL_CLOSED",
127 ctf_enum_value(
"REMOTE_FINISHED",
129 ctf_enum_value(
"REMOTE_TIMEOUT",
131 ctf_enum_value(
"REMOTE_DESTROYED",
133 ctf_enum_value(
"REMOTE_NOSUCHSERVICE",
145 TRACEPOINT_ENUM(tor_circuit, state,
164 TRACEPOINT_EVENT_CLASS(tor_circuit, origin_circuit_t_class,
167 ctf_integer(uint32_t, circ_id, circ->global_identifier)
168 ctf_enum(tor_circuit, purpose,
int, purpose,
TO_CIRCUIT(circ)->purpose)
169 ctf_enum(tor_circuit, state,
int, state,
TO_CIRCUIT(circ)->state)
174 TRACEPOINT_EVENT_CLASS(tor_circuit, or_circuit_t_class,
177 ctf_enum(tor_circuit, purpose,
int, purpose,
TO_CIRCUIT(circ)->purpose)
178 ctf_enum(tor_circuit, state,
int, state,
TO_CIRCUIT(circ)->state)
189 TRACEPOINT_EVENT_INSTANCE(tor_circuit, origin_circuit_t_class, new_origin,
194 TRACEPOINT_EVENT_INSTANCE(tor_circuit, origin_circuit_t_class, opened,
199 TRACEPOINT_EVENT_INSTANCE(tor_circuit, origin_circuit_t_class, establish,
204 TRACEPOINT_EVENT_INSTANCE(tor_circuit, origin_circuit_t_class, cannibalized,
211 TRACEPOINT_EVENT_INSTANCE(tor_circuit, origin_circuit_t_class,
timeout,
217 TRACEPOINT_EVENT_INSTANCE(tor_circuit, origin_circuit_t_class, idle_timeout,
222 TRACEPOINT_EVENT(tor_circuit, first_onion_skin,
225 ctf_integer(uint32_t, circ_id, circ->global_identifier)
226 ctf_enum(tor_circuit, purpose,
int, purpose,
TO_CIRCUIT(circ)->purpose)
227 ctf_enum(tor_circuit, state,
int, state,
TO_CIRCUIT(circ)->state)
228 ctf_array_hex(
char, fingerprint, hop->extend_info->identity_digest,
235 TRACEPOINT_EVENT(tor_circuit, intermediate_onion_skin,
238 ctf_integer(uint32_t, circ_id, circ->global_identifier)
239 ctf_enum(tor_circuit, purpose,
int, purpose,
TO_CIRCUIT(circ)->purpose)
240 ctf_enum(tor_circuit, state,
int, state,
TO_CIRCUIT(circ)->state)
241 ctf_array_hex(
char, fingerprint, hop->extend_info->identity_digest,
253 TRACEPOINT_EVENT_INSTANCE(tor_circuit, or_circuit_t_class, new_or,
264 TRACEPOINT_EVENT(tor_circuit, free,
267 ctf_integer(uint32_t, circ_id,
270 ctf_enum(tor_circuit, purpose,
int, purpose, circ->purpose)
271 ctf_enum(tor_circuit, state,
int, state, circ->state)
276 TRACEPOINT_EVENT(tor_circuit, mark_for_close,
279 ctf_integer(uint32_t, circ_id,
282 ctf_enum(tor_circuit, purpose,
int, purpose, circ->purpose)
283 ctf_enum(tor_circuit, state,
int, state, circ->state)
284 ctf_enum(tor_circuit, end_reason,
int, close_reason,
285 circ->marked_for_close_reason)
286 ctf_enum(tor_circuit, end_reason,
int, orig_close_reason,
287 circ->marked_for_close_orig_reason)
292 TRACEPOINT_EVENT(tor_circuit, change_purpose,
293 TP_ARGS(const
circuit_t *, circ,
int, old_purpose,
int, new_purpose),
295 ctf_integer(uint32_t, circ_id,
298 ctf_enum(tor_circuit, state,
int, state, circ->state)
299 ctf_enum(tor_circuit, purpose,
int, purpose, old_purpose)
300 ctf_enum(tor_circuit, purpose,
int, new, new_purpose)
305 TRACEPOINT_EVENT(tor_circuit, change_state,
306 TP_ARGS(const
circuit_t *, circ,
int, old_state,
int, new_state),
308 ctf_integer(uint32_t, circ_id,
311 ctf_enum(tor_circuit, purpose,
int, purpose, circ->purpose)
312 ctf_enum(tor_circuit, state,
int, old, old_state)
313 ctf_enum(tor_circuit, state,
int, new, new_state)
320 #include <lttng/tracepoint-event.h>
origin_circuit_t * TO_ORIGIN_CIRCUIT(circuit_t *x)
#define CIRCUIT_PURPOSE_S_CONNECT_REND
#define CIRCUIT_STATE_ONIONSKIN_PENDING
#define CIRCUIT_PURPOSE_C_MEASURE_TIMEOUT
#define CIRCUIT_PURPOSE_REND_POINT_WAITING
#define CIRCUIT_PURPOSE_PATH_BIAS_TESTING
#define CIRCUIT_STATE_OPEN
#define CIRCUIT_STATE_BUILDING
#define CIRCUIT_PURPOSE_C_REND_JOINED
#define CIRCUIT_PURPOSE_S_INTRO
#define CIRCUIT_PURPOSE_INTRO_POINT
#define CIRCUIT_PURPOSE_CONTROLLER
#define CIRCUIT_IS_ORIGIN(c)
#define CIRCUIT_PURPOSE_C_CIRCUIT_PADDING
#define CIRCUIT_PURPOSE_C_REND_READY_INTRO_ACKED
#define CIRCUIT_STATE_GUARD_WAIT
#define CIRCUIT_PURPOSE_TESTING
#define CIRCUIT_PURPOSE_OR
#define CIRCUIT_STATE_CHAN_WAIT
#define CIRCUIT_PURPOSE_C_INTRODUCE_ACK_WAIT
#define CIRCUIT_PURPOSE_S_REND_JOINED
#define CIRCUIT_PURPOSE_C_REND_READY
#define CIRCUIT_PURPOSE_S_HSDIR_POST
#define CIRCUIT_PURPOSE_C_HSDIR_GET
#define CIRCUIT_PURPOSE_REND_ESTABLISHED
#define CIRCUIT_PURPOSE_C_INTRODUCE_ACKED
#define CIRCUIT_PURPOSE_C_INTRODUCING
#define CIRCUIT_PURPOSE_S_ESTABLISH_INTRO
#define CIRCUIT_PURPOSE_C_ESTABLISH_REND
#define CIRCUIT_PURPOSE_C_GENERAL
#define CIRCUIT_PURPOSE_HS_VANGUARDS
#define END_CIRC_REASON_NOPATH
#define END_CIRC_REASON_MEASUREMENT_EXPIRED
#define END_CIRC_REASON_FLAG_REMOTE
#define END_CIRC_AT_ORIGIN