aboutsummaryrefslogtreecommitdiff
path: root/src/core/or/trace_probes_circuit.c
diff options
context:
space:
mode:
authorDavid Goulet <dgoulet@torproject.org>2020-02-11 11:46:34 -0500
committerDavid Goulet <dgoulet@torproject.org>2020-07-08 09:10:08 -0400
commitbf0e2ae0d0e8608277f53e0cd687a419bf99de85 (patch)
tree556b78719083cb4757edab6c04fc093ebd3b03fb /src/core/or/trace_probes_circuit.c
parentc31d469f3734b0d60786deb2be9dafb3225755c3 (diff)
downloadtor-bf0e2ae0d0e8608277f53e0cd687a419bf99de85.tar.gz
tor-bf0e2ae0d0e8608277f53e0cd687a419bf99de85.zip
trace: Add single tracepoint in circuit subsystem
This is the very first tracepoint in tor. It is in the circuit subsystem for when a new circuit opens. LTTng instrumentation requires lot more around a tracepoint than USDT thus this commit only adds one tracepoint in order to outline a base to add more tracepoints later. The idea is that we separate subsystem into what LTTng defines as "providers" so the circuit provider contains the tracepoint definitions for the circuit subsystem. Signed-off-by: David Goulet <dgoulet@torproject.org> Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'src/core/or/trace_probes_circuit.c')
-rw-r--r--src/core/or/trace_probes_circuit.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/core/or/trace_probes_circuit.c b/src/core/or/trace_probes_circuit.c
new file mode 100644
index 0000000000..f2594f522f
--- /dev/null
+++ b/src/core/or/trace_probes_circuit.c
@@ -0,0 +1,27 @@
+/* Copyright (c) 2020, The Tor Project, Inc. */
+/* See LICENSE for licensing information */
+
+/**
+ * \file trace_probes_circuit.c
+ * \brief Tracepoint provider source file for the circuit subsystem. Probes
+ * are generated within this C file for LTTng-UST
+ **/
+
+#include "orconfig.h"
+
+/*
+ * Following section is specific to LTTng-UST.
+ */
+#ifdef USE_TRACING_INSTRUMENTATION_LTTNG
+
+/* Header files that the probes need. */
+#include "core/or/circuitlist.h"
+#include "core/or/or.h"
+#include "core/or/origin_circuit_st.h"
+
+#define TRACEPOINT_DEFINE
+#define TRACEPOINT_CREATE_PROBES
+
+#include "trace_probes_circuit.h"
+
+#endif /* USE_TRACING_INSTRUMENTATION_LTTNG */