diff options
author | David Goulet <dgoulet@torproject.org> | 2020-03-11 12:12:28 -0400 |
---|---|---|
committer | David Goulet <dgoulet@torproject.org> | 2020-07-08 11:11:58 -0400 |
commit | b049cc3ace18dd42493ca768cf4636dfd89569fc (patch) | |
tree | a70016f891b7025b497637e4bbd9df3a2dd6e6b3 /configure.ac | |
parent | 3604d86a016b6202a5864a81f46addc087658b8c (diff) | |
download | tor-b049cc3ace18dd42493ca768cf4636dfd89569fc.tar.gz tor-b049cc3ace18dd42493ca768cf4636dfd89569fc.zip |
trace: Emit a warning if tracing is built in
Built in tracing should _not_ be run if it was not set on purpose. Warn as
loud as we can in order to inform the user that they are running a version
with tracing capabilities built in.
This commit also adds a subsys stub because utlimately the logging will happen
in the init phase but because the default log file is not set in the
sys_logging init function, the stub is not useful for now.
Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index cd014268bb..75fd709f9b 100644 --- a/configure.ac +++ b/configure.ac @@ -273,9 +273,9 @@ if test "x$enable_tracing_instrumentation_lttng" = "xyes"; then On Debian, apt install liblttng-ust-dev"])], []) AC_DEFINE([USE_TRACING_INSTRUMENTATION_LTTNG], [1], [Using LTTng instrumentation]) TOR_TRACE_LIBS="-llttng-ust -ldl" + have_tracing=1 fi - dnl USDT instrumentation option. AC_ARG_ENABLE(tracing-instrumentation-usdt, AS_HELP_STRING([--enable-tracing-instrumentation-usdt], @@ -291,6 +291,7 @@ if test "x$enable_tracing_instrumentation_usdt" = "xyes"; then dnl --with-sdt. There is unfortunately no way to check that so we always dnl build the USDT probes even though LTTng instrumentation was requested. AC_DEFINE([USE_TRACING_INSTRUMENTATION_USDT], [1], [Using USDT instrumentation]) + have_tracing=1 fi dnl Tracepoints event to debug logs. @@ -301,6 +302,9 @@ AC_ARG_ENABLE(tracing-instrumentation-log-debug, [Tracepoints to log debug]), []) AM_CONDITIONAL([USE_TRACING_INSTRUMENTATION_LOG_DEBUG], [test "x$enable_tracing_instrumentation_log_debug" = "xyes"]) +if test "x$enable_tracing_instrumentation_log_debug" = "xyes"; then + have_tracing=1 +fi dnl Define that tracing is supported if any instrumentation is used. AM_COND_IF([USE_TRACING_INSTRUMENTATION_LOG_DEBUG], @@ -309,6 +313,7 @@ AM_COND_IF([USE_TRACING_INSTRUMENTATION_USDT], AC_DEFINE([HAVE_TRACING], [1], [Compiled with tracing support])) AM_COND_IF([USE_TRACING_INSTRUMENTATION_LTTNG], AC_DEFINE([HAVE_TRACING], [1], [Compiled with tracing support])) +AM_CONDITIONAL([USE_TRACING], [test "x$have_tracing" = x1 ]) dnl Finally, define the trace libs. AC_SUBST([TOR_TRACE_LIBS]) |