From f018237c0b19ca18ac95d1584e3acd5602d666eb Mon Sep 17 00:00:00 2001 From: Stelios Bounanos Date: Wed, 14 Oct 2015 17:31:36 +0100 Subject: [PATCH] Fix: Don't (re)define STAP_PROBEV Define a new LTTNG_STAP_PROBEV macro to avoid clobbering STAP_PROBEV or emitting unwanted sdt probes when lttng-ust has been built without sdt support. Signed-off-by: Stelios Bounanos Signed-off-by: Mathieu Desnoyers --- include/lttng/tracef.h | 2 +- include/lttng/tracelog.h | 2 +- include/lttng/tracepoint.h | 5 +++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/include/lttng/tracef.h b/include/lttng/tracef.h index 7e8b59ee..0c59c9ae 100644 --- a/include/lttng/tracef.h +++ b/include/lttng/tracef.h @@ -34,7 +34,7 @@ void _lttng_ust_tracef(const char *fmt, ...); #define tracef(fmt, ...) \ do { \ - STAP_PROBEV(tracepoint_lttng_ust_tracef, event, ## __VA_ARGS__); \ + LTTNG_STAP_PROBEV(tracepoint_lttng_ust_tracef, event, ## __VA_ARGS__); \ if (caa_unlikely(__tracepoint_lttng_ust_tracef___event.state)) \ _lttng_ust_tracef(fmt, ## __VA_ARGS__); \ } while (0) diff --git a/include/lttng/tracelog.h b/include/lttng/tracelog.h index 5f14f70d..4309d12e 100644 --- a/include/lttng/tracelog.h +++ b/include/lttng/tracelog.h @@ -53,7 +53,7 @@ TP_TRACELOG_CB_TEMPLATE(TRACE_DEBUG); #define tracelog(level, fmt, ...) \ do { \ - STAP_PROBEV(tracepoint_lttng_ust_tracelog, level, ## __VA_ARGS__); \ + LTTNG_STAP_PROBEV(tracepoint_lttng_ust_tracelog, level, ## __VA_ARGS__); \ if (caa_unlikely(__tracepoint_lttng_ust_tracelog___##level.state)) \ _lttng_ust_tracelog_##level(__FILE__, __LINE__, __func__, \ fmt, ## __VA_ARGS__); \ diff --git a/include/lttng/tracepoint.h b/include/lttng/tracepoint.h index 4bc4fc9e..e88db892 100644 --- a/include/lttng/tracepoint.h +++ b/include/lttng/tracepoint.h @@ -37,8 +37,9 @@ #ifdef LTTNG_UST_HAVE_SDT_INTEGRATION #define SDT_USE_VARIADIC #include +#define LTTNG_STAP_PROBEV STAP_PROBEV #else -#define STAP_PROBEV(...) +#define LTTNG_STAP_PROBEV(...) #endif #ifdef __cplusplus @@ -53,7 +54,7 @@ extern "C" { #define tracepoint(provider, name, ...) \ do { \ - STAP_PROBEV(provider, name, ## __VA_ARGS__); \ + LTTNG_STAP_PROBEV(provider, name, ## __VA_ARGS__); \ if (tracepoint_enabled(provider, name)) \ do_tracepoint(provider, name, __VA_ARGS__); \ } while (0) -- 2.34.1