Fix: Don't (re)define STAP_PROBEV
authorStelios Bounanos <sb@enotty.net>
Wed, 14 Oct 2015 16:31:36 +0000 (17:31 +0100)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 15 Oct 2015 21:15:00 +0000 (17:15 -0400)
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 <sb@enotty.net>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
include/lttng/tracef.h
include/lttng/tracepoint.h

index 7e8b59ee3bc5abf3a63b665f36b093dc3733d500..0c59c9ae17c6b4b1cc80a8c93fb01e4bb4e29f0b 100644 (file)
@@ -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)
index 39539911d3b6a12e5a55849013e324958ec4b797..deb36a9f341dcd434872a75f61306b055777e5e2 100644 (file)
@@ -37,8 +37,9 @@
 #ifdef LTTNG_UST_HAVE_SDT_INTEGRATION
 #define SDT_USE_VARIADIC
 #include <sys/sdt.h>
+#define LTTNG_STAP_PROBEV STAP_PROBEV
 #else
-#define STAP_PROBEV(...)
+#define LTTNG_STAP_PROBEV(...)
 #endif
 
 #ifdef __cplusplus
@@ -47,7 +48,7 @@ extern "C" {
 
 #define tracepoint(provider, name, ...)                                            \
        do {                                                                \
-               STAP_PROBEV(provider, name, ## __VA_ARGS__);                \
+               LTTNG_STAP_PROBEV(provider, name, ## __VA_ARGS__);          \
                if (caa_unlikely(CMM_LOAD_SHARED(__tracepoint_##provider##___##name.state))) \
                        __tracepoint_cb_##provider##___##name(__VA_ARGS__); \
        } while (0)
This page took 0.025803 seconds and 4 git commands to generate.