#include <urcu/system.h>
#include <dlfcn.h> /* for dlopen */
#include <string.h> /* for memset */
+
#include <lttng/ust-config.h> /* for sdt */
#include <lttng/ust-compiler.h>
+#include <lttng/ust-tracer.h>
#ifdef LTTNG_UST_HAVE_SDT_INTEGRATION
/*
*/
#define _DECLARE_TRACEPOINT(_provider, _name, ...) \
extern struct lttng_ust_tracepoint __tracepoint_##_provider##___##_name; \
-static inline __attribute__((always_inline, unused)) lttng_ust_notrace \
-void __tracepoint_cb_##_provider##___##_name(_TP_ARGS_PROTO(__VA_ARGS__)); \
+static inline \
+void __tracepoint_cb_##_provider##___##_name(_TP_ARGS_PROTO(__VA_ARGS__)) \
+ __attribute__((always_inline, unused)) lttng_ust_notrace; \
static \
void __tracepoint_cb_##_provider##___##_name(_TP_ARGS_PROTO(__VA_ARGS__)) \
{ \
}
#endif
-static void lttng_ust_notrace __attribute__((constructor))
-__tracepoints__init(void);
+static void
+__tracepoints__init(void)
+ lttng_ust_notrace __attribute__((constructor));
static void
__tracepoints__init(void)
{
tracepoint_dlopen_ptr = &tracepoint_dlopen;
if (!tracepoint_dlopen_ptr->liblttngust_handle)
tracepoint_dlopen_ptr->liblttngust_handle =
- dlopen("liblttng-ust-tracepoint.so.1", RTLD_NOW | RTLD_GLOBAL);
+ dlopen(LTTNG_UST_TRACEPOINT_LIB_SONAME, RTLD_NOW | RTLD_GLOBAL);
if (!tracepoint_dlopen_ptr->liblttngust_handle)
return;
__tracepoint__init_urcu_sym();
__lttng_ust_variable_attribute_no_sanitize_address = \
&__tracepoint_##_provider##___##_name;
-static void lttng_ust_notrace __attribute__((constructor))
-__tracepoints__ptrs_init(void);
+static void
+__tracepoints__ptrs_init(void)
+ lttng_ust_notrace __attribute__((constructor));
static void
__tracepoints__ptrs_init(void)
{
tracepoint_dlopen_ptr = &tracepoint_dlopen;
if (!tracepoint_dlopen_ptr->liblttngust_handle)
tracepoint_dlopen_ptr->liblttngust_handle =
- dlopen("liblttng-ust-tracepoint.so.1", RTLD_NOW | RTLD_GLOBAL);
+ dlopen(LTTNG_UST_TRACEPOINT_LIB_SONAME, RTLD_NOW | RTLD_GLOBAL);
if (!tracepoint_dlopen_ptr->liblttngust_handle)
return;
if (!tracepoint_destructors_syms_ptr)