#include <lttng/tracepoint-types.h>
#include <lttng/tracepoint-rcu.h>
#include <urcu/compiler.h>
+#include <urcu/system.h>
#include <dlfcn.h> /* for dlopen */
#include <string.h> /* for memset */
#include <lttng/ust-config.h> /* for sdt */
#define tracepoint(provider, name, ...) \
do { \
STAP_PROBEV(provider, name, ## __VA_ARGS__); \
- if (caa_unlikely(__tracepoint_##provider##___##name.state)) \
+ if (caa_unlikely(CMM_LOAD_SHARED(__tracepoint_##provider##___##name.state))) \
__tracepoint_cb_##provider##___##name(__VA_ARGS__); \
} while (0)
*/
#define _DECLARE_TRACEPOINT(_provider, _name, ...) \
extern struct tracepoint __tracepoint_##_provider##___##_name; \
-static inline __attribute__((always_inline)) lttng_ust_notrace \
+static inline __attribute__((always_inline, unused)) lttng_ust_notrace \
void __tracepoint_cb_##_provider##___##_name(_TP_ARGS_PROTO(__VA_ARGS__)); \
static \
void __tracepoint_cb_##_provider##___##_name(_TP_ARGS_PROTO(__VA_ARGS__)) \