X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=include%2Flttng%2Ftracepoint.h;h=ca68c1fa44e62b666da477ab71878ee4b77de827;hb=refs%2Fheads%2Fstable-2.5;hp=b3b01cc9196d94e7a8c1da2c6e84a70e7952a0a6;hpb=96f85541c4e3773d3d1579f04f84633bc9bb6696;p=lttng-ust.git diff --git a/include/lttng/tracepoint.h b/include/lttng/tracepoint.h index b3b01cc9..ca68c1fa 100644 --- a/include/lttng/tracepoint.h +++ b/include/lttng/tracepoint.h @@ -28,6 +28,7 @@ #include #include #include +#include #include /* for dlopen */ #include /* for memset */ #include /* for sdt */ @@ -47,7 +48,7 @@ extern "C" { #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) @@ -152,7 +153,7 @@ extern "C" { */ #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__)) \ @@ -352,6 +353,7 @@ extern struct tracepoint * const __stop___tracepoints_ptrs[] NULL, \ _TRACEPOINT_UNDEFINED_REF(_provider), \ _TP_EXTRACT_STRING(_args), \ + { }, \ }; \ static struct tracepoint * __tracepoint_ptr_##_provider##___##_name \ __attribute__((used, section("__tracepoints_ptrs"))) = \