case LTTNG_UST_EVENT_TYPE_RECORDER: \
{ \
struct lttng_ust_event_recorder *__event_recorder = (struct lttng_ust_event_recorder *) __event->child; \
- struct lttng_channel *__chan = __event_recorder->chan; \
+ struct lttng_ust_channel_buffer *__chan = __event_recorder->chan; \
+ struct lttng_ust_channel_common *__chan_common = __chan->parent; \
\
- if (!_TP_SESSION_CHECK(session, __chan->session)) \
+ if (!_TP_SESSION_CHECK(session, __chan_common->session)) \
return; \
- if (caa_unlikely(!CMM_ACCESS_ONCE(__chan->session->active))) \
+ if (caa_unlikely(!CMM_ACCESS_ONCE(__chan_common->session->active))) \
return; \
- if (caa_unlikely(!CMM_ACCESS_ONCE(__chan->enabled))) \
+ if (caa_unlikely(!CMM_ACCESS_ONCE(__chan_common->enabled))) \
return; \
break; \
} \
if (caa_unlikely(!cds_list_empty(&__event->filter_bytecode_runtime_head))) { \
struct lttng_ust_bytecode_runtime *__filter_bc_runtime; \
int __filter_record = __event->has_enablers_without_bytecode; \
+ struct lttng_ust_bytecode_filter_ctx filter_ctx; \
\
+ filter_ctx.struct_size = sizeof(struct lttng_ust_bytecode_filter_ctx); \
__event_prepare_interpreter_stack__##_provider##___##_name(__stackvar.__interpreter_stack_data, \
_TP_ARGS_DATA_VAR(_args)); \
tp_list_for_each_entry_rcu(__filter_bc_runtime, &__event->filter_bytecode_runtime_head, node) { \
- if (caa_unlikely(__filter_bc_runtime->interpreter_funcs.filter(__filter_bc_runtime, \
- __stackvar.__interpreter_stack_data) & LTTNG_UST_BYTECODE_INTERPRETER_RECORD_FLAG)) { \
- __filter_record = 1; \
- break; \
+ if (caa_likely(__filter_bc_runtime->interpreter_func(__filter_bc_runtime, \
+ __stackvar.__interpreter_stack_data, &filter_ctx) == LTTNG_UST_BYTECODE_INTERPRETER_OK)) { \
+ if (caa_unlikely(filter_ctx.result == LTTNG_UST_BYTECODE_FILTER_ACCEPT)) { \
+ __filter_record = 1; \
+ break; \
+ } \
} \
} \
if (caa_likely(!__filter_record)) \
{ \
size_t __event_len, __event_align; \
struct lttng_ust_event_recorder *__event_recorder = (struct lttng_ust_event_recorder *) __event->child; \
- struct lttng_channel *__chan = __event_recorder->chan; \
+ struct lttng_ust_channel_buffer *__chan = __event_recorder->chan; \
struct lttng_ust_lib_ring_buffer_ctx __ctx; \
struct lttng_ust_stack_ctx __lttng_ctx; \
\
memset(&__lttng_ctx, 0, sizeof(__lttng_ctx)); \
__lttng_ctx.struct_size = sizeof(struct lttng_ust_stack_ctx); \
__lttng_ctx.event_recorder = __event_recorder; \
- __lttng_ctx.chan_ctx = tp_rcu_dereference(__chan->ctx); \
- __lttng_ctx.event_ctx = tp_rcu_dereference(__event_recorder->ctx); \
lib_ring_buffer_ctx_init(&__ctx, __chan->chan, &__lttng_ctx, __event_len, \
__event_align, -1, __chan->handle); \
__ctx.ip = _TP_IP_PARAM(TP_IP_PARAM); \