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:13:42 +0000 (17:13 -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/tracelog.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 5f14f70d458b093c18ca294b2c43e79cf6e1c4c5..4309d12e981eb524077677dd9f55c35154c37dc4 100644 (file)
@@ -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__); \
index 4bc4fc9e4446db05feeecbe1a5d9d09e9df87ab9..e88db89242750c591909fb56ae912eb6cc670ff3 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
@@ -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)
This page took 0.026548 seconds and 4 git commands to generate.