diff options
author | David Goulet <dgoulet@torproject.org> | 2020-01-15 10:55:07 -0500 |
---|---|---|
committer | David Goulet <dgoulet@torproject.org> | 2020-07-08 09:10:08 -0400 |
commit | c31d469f3734b0d60786deb2be9dafb3225755c3 (patch) | |
tree | 83d79960d5431678e159035f78da7f43e083d071 /src/lib/trace/events.h | |
parent | 0de543aae636e422bc9fa339efa81e8260b77ae4 (diff) | |
download | tor-c31d469f3734b0d60786deb2be9dafb3225755c3.tar.gz tor-c31d469f3734b0d60786deb2be9dafb3225755c3.zip |
trace: Comments and configure fix
Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'src/lib/trace/events.h')
-rw-r--r-- | src/lib/trace/events.h | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/src/lib/trace/events.h b/src/lib/trace/events.h index 8cc0136b09..4a8078bf34 100644 --- a/src/lib/trace/events.h +++ b/src/lib/trace/events.h @@ -9,7 +9,30 @@ #ifndef TOR_LIB_TRACE_EVENTS_H #define TOR_LIB_TRACE_EVENTS_H -/* XXX: DOCDOC once framework is stable. */ +/* + * A tracepoint signature is defined as follow: + * + * tor_trace(<subsystem>, <event_name>, <args>...) + * + * If tracing is enabled, the tor_trace() macro is mapped to all possible + * instrumentations (defined below). Each instrumentation type MUST define a + * top level macro (TOR_TRACE_<type>) so it can be inserted into each + * tracepoint. + * + * In case no tracing is enabled (HAVE_TRACING), tracepoints are NOP and thus + * have no execution cost. + * + * Currently, three types of instrumentation are supported: + * + * log-debug: Every tracepoints is mapped to a log_debug() statement. + * + * User Statically-Defined Tracing (USDT): Probes that can be used with perf, + * dtrace, SystemTap, DTrace and BPF Compiler Collection (BCC). + * + * LTTng-UST: Probes for the LTTng Userspace Tracer. If USDT interface + * (sdt.h) is available, the USDT probes are also generated by LTTng thus + * enabling this instrumentation provides both probes. + */ #ifdef HAVE_TRACING |