Refactoring: bytecode interpreter ABI
[lttng-ust.git] / include / lttng / ust-tracepoint-event.h
index af51f9bc95cf5dae50ae9f231f5498639b9d2592..4fc1ea91aa8c6f49abe3e5871221d4db5110f0af 100644 (file)
@@ -824,14 +824,18 @@ void __event_probe__##_provider##___##_name(_TP_ARGS_DATA_PROTO(_args))         \
        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))                             \
This page took 0.023839 seconds and 4 git commands to generate.