Fix: allow non-LGPL modules to use tracepoints
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 15 Jun 2016 20:34:09 +0000 (16:34 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 16 Jun 2016 15:37:56 +0000 (11:37 -0400)
Non-LGPL modules that use tracepoint instrumentation, but have no
compile unit defining either TRACEPOINT_DEFINE or
TRACEPOINT_CREATE_PROBES fail to build due to undefined reference to
`tracepoint_dlopen_ptr'.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
include/lttng/tracepoint.h

index c80da9216dfdef1eaa1c9b16678188c77a9a2c08..3879920e30dd7cca6f98619da4dcdeccbfba4076 100644 (file)
@@ -226,8 +226,6 @@ struct lttng_ust_tracepoint_dlopen {
 extern struct lttng_ust_tracepoint_dlopen tracepoint_dlopen;
 extern struct lttng_ust_tracepoint_dlopen *tracepoint_dlopen_ptr;
 
-#if defined(TRACEPOINT_DEFINE) || defined(TRACEPOINT_CREATE_PROBES)
-
 /*
  * These weak symbols, the constructor, and destructor take care of
  * registering only _one_ instance of the tracepoints per shared-ojbect
@@ -332,8 +330,6 @@ __tracepoints__destroy(void)
        }
 }
 
-#endif
-
 #ifdef TRACEPOINT_DEFINE
 
 /*
This page took 0.025652 seconds and 4 git commands to generate.