diff options
author | David Goulet <dgoulet@torproject.org> | 2017-01-23 14:28:10 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2017-04-25 10:37:31 -0400 |
commit | cb8ac1f33102dbe509edf50aa3cac2a106241466 (patch) | |
tree | 4b237fd3b96b1807de366ce9b74a3464605220e5 /configure.ac | |
parent | 91dd4a00f7d4891e24187a849933547128aeeb9f (diff) | |
download | tor-cb8ac1f33102dbe509edf50aa3cac2a106241466.tar.gz tor-cb8ac1f33102dbe509edf50aa3cac2a106241466.zip |
trace: Add a basic event-tracing infrastructure.
This commit adds the src/trace directory containing the basics for our tracing
subsystem. It is not used in the code base. The "src/trace/debug.h" file
contains an example on how we can map our tor trace events to log_debug().
The tracing subsystem can only be enabled by tracing framework at compile
time. This commit introduces the "--enable-tracing-debug" option that will
make all "tor_trace()" function be maped to "log_debug()".
Closes #13802
Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index c7960fa4ed..ff917354a3 100644 --- a/configure.ac +++ b/configure.ac @@ -189,6 +189,16 @@ AC_ARG_ENABLE(seccomp, AC_ARG_ENABLE(libscrypt, AS_HELP_STRING(--disable-libscrypt, [do not attempt to use libscrypt])) +dnl Enable event tracing which are transformed to debug log statement. +AC_ARG_ENABLE(event-tracing-debug, + AS_HELP_STRING(--enable-event-tracing-debug, [build with event tracing to debug log])) +AM_CONDITIONAL([USE_EVENT_TRACING_DEBUG], [test "x$enable_event_tracing_debug" = "xyes"]) + +if test x$enable_event_tracing_debug = xyes; then + AC_DEFINE([USE_EVENT_TRACING_DEBUG], [1], [Tracing framework to log debug]) + AC_DEFINE([TOR_EVENT_TRACING_ENABLED], [1], [Compile the event tracing instrumentation]) +fi + dnl check for the correct "ar" when cross-compiling. dnl (AM_PROG_AR was new in automake 1.11.2, which we do not yet require, dnl so kludge up a replacement for the case where it isn't there yet.) |