Reviewed-by: David Goulet <dgoulet@efficios.com>
Reviewed-by: Christian Babeux <christian.babeux@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
/* Associated bytecode */
struct lttng_ust_filter_bytecode_node *bc;
int (*filter)(void *filter_data, const char *filter_stack_data);
/* Associated bytecode */
struct lttng_ust_filter_bytecode_node *bc;
int (*filter)(void *filter_data, const char *filter_stack_data);
struct cds_list_head node; /* list of bytecode runtime in event */
};
struct cds_list_head node; /* list of bytecode runtime in event */
};
goto link_error;
}
runtime->p.filter = lttng_filter_interpret_bytecode;
goto link_error;
}
runtime->p.filter = lttng_filter_interpret_bytecode;
+ runtime->p.link_failed = 0;
cds_list_add_rcu(&runtime->p.node, insert_loc);
dbg_printf("Linking successful.\n");
return 0;
link_error:
runtime->p.filter = lttng_filter_false;
cds_list_add_rcu(&runtime->p.node, insert_loc);
dbg_printf("Linking successful.\n");
return 0;
link_error:
runtime->p.filter = lttng_filter_false;
+ runtime->p.link_failed = 1;
cds_list_add_rcu(&runtime->p.node, insert_loc);
dbg_printf("Linking failed.\n");
return ret;
cds_list_add_rcu(&runtime->p.node, insert_loc);
dbg_printf("Linking failed.\n");
return ret;
{
struct lttng_ust_filter_bytecode_node *bc = runtime->bc;
{
struct lttng_ust_filter_bytecode_node *bc = runtime->bc;
- if (bc->enabler->enabled)
- runtime->filter = lttng_filter_interpret_bytecode;
- else
+ if (!bc->enabler->enabled || runtime->link_failed)
runtime->filter = lttng_filter_false;
runtime->filter = lttng_filter_false;
+ else
+ runtime->filter = lttng_filter_interpret_bytecode;