Resolve "Add option to compile out LTTng entirely"

This commit is contained in:
Ingo Lütkebohle 2019-07-30 14:27:36 +00:00 committed by Christophe Bedard
parent 9d3ed4aa6b
commit 7b15e17cd2
6 changed files with 74 additions and 28 deletions

View file

@ -17,6 +17,7 @@
int main()
{
#ifndef TRACETOOLS_DISABLED
printf("Tracing ");
if (ros_trace_compile_status()) {
printf("enabled\n");
@ -25,4 +26,8 @@ int main()
printf("disabled\n");
return 1;
}
#else
printf("Tracing disabled through configuration\n");
return 1;
#endif
}

View file

@ -14,6 +14,8 @@
#include "tracetools/tracetools.h"
#ifndef TRACETOOLS_DISABLED
#if defined(TRACETOOLS_LTTNG_ENABLED)
# include "tracetools/tp_call.h"
# define CONDITIONAL_TP(...) \
@ -216,3 +218,5 @@ void TRACEPOINT(
#ifndef _WIN32
# pragma GCC diagnostic pop
#endif
#endif // TRACETOOLS_DISABLED