This is a tiny optimization but it can reduce tracing cost in cases
where multiple filters are attached to a probe.
Since we want to trace an event if any of its filter expressions
evaluates to TRUE, there is no need to keep on evaluating expressions
once one is found to be TRUE.
Signed-off-by: Francis Deslauriers <francis.deslauriers@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: I6b5b7697869d3e25dc24d38dc39c34ae1d49dcc9
tp_locvar, _args); \
lttng_list_for_each_entry_rcu(bc_runtime, &__event->bytecode_runtime_head, node) { \
if (unlikely(bc_runtime->filter(bc_runtime, &__lttng_probe_ctx, \
tp_locvar, _args); \
lttng_list_for_each_entry_rcu(bc_runtime, &__event->bytecode_runtime_head, node) { \
if (unlikely(bc_runtime->filter(bc_runtime, &__lttng_probe_ctx, \
- __stackvar.__filter_stack_data) & LTTNG_FILTER_RECORD_FLAG)) \
+ __stackvar.__filter_stack_data) & LTTNG_FILTER_RECORD_FLAG)) { \
} \
if (likely(!__filter_record)) \
goto __post; \
} \
if (likely(!__filter_record)) \
goto __post; \
tp_locvar); \
lttng_list_for_each_entry_rcu(bc_runtime, &__event->bytecode_runtime_head, node) { \
if (unlikely(bc_runtime->filter(bc_runtime, &__lttng_probe_ctx, \
tp_locvar); \
lttng_list_for_each_entry_rcu(bc_runtime, &__event->bytecode_runtime_head, node) { \
if (unlikely(bc_runtime->filter(bc_runtime, &__lttng_probe_ctx, \
- __stackvar.__filter_stack_data) & LTTNG_FILTER_RECORD_FLAG)) \
+ __stackvar.__filter_stack_data) & LTTNG_FILTER_RECORD_FLAG)) { \
} \
if (likely(!__filter_record)) \
goto __post; \
} \
if (likely(!__filter_record)) \
goto __post; \