aboutsummaryrefslogtreecommitdiff
path: root/src/core/or/circuituse.c
diff options
context:
space:
mode:
authorDavid Goulet <dgoulet@torproject.org>2020-01-15 12:26:54 -0500
committerDavid Goulet <dgoulet@torproject.org>2020-07-08 09:10:08 -0400
commita7063345770002082c2334f290f662c8d4ce644b (patch)
tree336c5b70db3fea010057dc15b7c6a1b41ecfebe6 /src/core/or/circuituse.c
parentbf0e2ae0d0e8608277f53e0cd687a419bf99de85 (diff)
downloadtor-a7063345770002082c2334f290f662c8d4ce644b.tar.gz
tor-a7063345770002082c2334f290f662c8d4ce644b.zip
trace: Add four more circuit subsystem tracepoints
Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'src/core/or/circuituse.c')
-rw-r--r--src/core/or/circuituse.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/core/or/circuituse.c b/src/core/or/circuituse.c
index 0e54c28e70..b9c15c1554 100644
--- a/src/core/or/circuituse.c
+++ b/src/core/or/circuituse.c
@@ -840,6 +840,7 @@ circuit_expire_building(void)
-1);
circuit_log_path(LOG_INFO,LD_CIRC,TO_ORIGIN_CIRCUIT(victim));
+ tor_trace(circuit, timeout, TO_ORIGIN_CIRCUIT(victim));
if (victim->purpose == CIRCUIT_PURPOSE_C_MEASURE_TIMEOUT)
circuit_mark_for_close(victim, END_CIRC_REASON_MEASUREMENT_EXPIRED);
else
@@ -1503,8 +1504,10 @@ circuit_expire_old_circuits_clientside(void)
circ->purpose);
/* Don't do this magic for testing circuits. Their death is governed
* by circuit_expire_building */
- if (circ->purpose != CIRCUIT_PURPOSE_PATH_BIAS_TESTING)
+ if (circ->purpose != CIRCUIT_PURPOSE_PATH_BIAS_TESTING) {
+ tor_trace(circuit, idle_timeout, TO_ORIGIN_CIRCUIT(circ));
circuit_mark_for_close(circ, END_CIRC_REASON_FINISHED);
+ }
} else if (!circ->timestamp_dirty && circ->state == CIRCUIT_STATE_OPEN) {
if (timercmp(&circ->timestamp_began, &cutoff, OP_LT)) {
if (circ->purpose == CIRCUIT_PURPOSE_C_GENERAL ||
@@ -1523,6 +1526,7 @@ circuit_expire_old_circuits_clientside(void)
" that has been unused for %ld msec.",
TO_ORIGIN_CIRCUIT(circ)->global_identifier,
tv_mdiff(&circ->timestamp_began, &now));
+ tor_trace(circuit, idle_timeout, TO_ORIGIN_CIRCUIT(circ));
circuit_mark_for_close(circ, END_CIRC_REASON_FINISHED);
} else if (!TO_ORIGIN_CIRCUIT(circ)->is_ancient) {
/* Server-side rend joined circuits can end up really old, because
@@ -2207,6 +2211,8 @@ circuit_launch_by_extend_info(uint8_t purpose,
tor_fragile_assert();
return NULL;
}
+
+ tor_trace(circuit, cannibalized, circ);
return circ;
}
}