Remove direct dependency of probes on urcu-bp
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Tue, 26 Feb 2013 20:16:57 +0000 (15:16 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Tue, 26 Feb 2013 20:16:57 +0000 (15:16 -0500)
The filter feature added a direct dependency of probes providers against
urcu-bp .so, while linking them against liblttng-ust should suffice. Fix
this by using the tracepoint.h wrapper for rcu_dereference().

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

index 8fea921605dce47ed88822f4a7eacb2da4ccc42d..b3fb2d404e6f1785f3382bb5d3d48d462ee4c022 100644 (file)
 #include <lttng/ust-events.h>
 #include <lttng/ringbuffer-config.h>
 #include <lttng/ust-compiler.h>
+#include <lttng/tracepoint.h>
 #include <string.h>
 
+#undef tp_list_for_each_entry_rcu
+#define tp_list_for_each_entry_rcu(pos, head, member)  \
+       for (pos = cds_list_entry(tp_rcu_dereference_bp((head)->next), __typeof__(*pos), member);       \
+            &pos->member != (head);                                    \
+            pos = cds_list_entry(tp_rcu_dereference_bp(pos->member.next), __typeof__(*pos), member))
+
 /*
  * TRACEPOINT_EVENT_CLASS declares a class of tracepoints receiving the
  * same arguments and having the same field layout.
@@ -501,7 +508,7 @@ void __event_probe__##_provider##___##_name(_TP_ARGS_DATA_PROTO(_args))           \
                                                                              \
                __event_prepare_filter_stack__##_provider##___##_name(__stackvar.__filter_stack_data, \
                        _TP_ARGS_DATA_VAR(_args));                            \
-               cds_list_for_each_entry_rcu(bc_runtime, &__event->bytecode_runtime_head, node) { \
+               tp_list_for_each_entry_rcu(bc_runtime, &__event->bytecode_runtime_head, node) { \
                        if (caa_unlikely(bc_runtime->filter(bc_runtime,       \
                                        __stackvar.__filter_stack_data) & LTTNG_FILTER_RECORD_FLAG)) \
                                __filter_record = 1;                          \
This page took 0.027778 seconds and 4 git commands to generate.