/* LTTng-UST 2.1 starts here */
/* list of struct lttng_bytecode_runtime, sorted by seqnum */
struct cds_list_head bytecode_runtime_head;
-
+ int has_enablers_without_bytecode;
/* Backward references: list of lttng_enabler_ref (ref to enablers) */
struct cds_list_head enablers_ref_head;
};
return; \
if (caa_unlikely(!cds_list_empty(&__event->bytecode_runtime_head))) { \
struct lttng_bytecode_runtime *bc_runtime; \
- int __filter_record = 0; \
+ int __filter_record = __event->has_enablers_without_bytecode; \
\
__event_prepare_filter_stack__##_provider##___##_name(__stackvar.__filter_stack_data, \
_TP_ARGS_DATA_VAR(_args)); \
cds_list_for_each_entry(event, &session->events_head, node) {
struct lttng_enabler_ref *enabler_ref;
struct lttng_bytecode_runtime *runtime;
- int enabled = 0;
+ int enabled = 0, has_enablers_without_bytecode = 0;
/* Enable events */
cds_list_for_each_entry(enabler_ref,
}
event->enabled = enabled;
+ /* Check if has enablers without bytecode */
+ cds_list_for_each_entry(enabler_ref,
+ &event->enablers_ref_head, node) {
+ if (cds_list_empty(&enabler_ref->ref->filter_bytecode_head)) {
+ has_enablers_without_bytecode = 1;
+ break;
+ }
+ }
+ event->has_enablers_without_bytecode =
+ has_enablers_without_bytecode;
+
/* Enable filters */
cds_list_for_each_entry(runtime,
&event->bytecode_runtime_head, node) {