/* head list of struct lttng_ust_filter_bytecode_node */
struct cds_list_head filter_bytecode_head;
+ /* head list of struct lttng_ust_excluder_node */
+ struct cds_list_head excluder_head;
struct cds_list_head node; /* per-session list of enablers */
struct lttng_ust_event event_param;
struct lttng_ust_filter_bytecode bc;
};
+struct lttng_ust_excluder_node {
+ struct cds_list_head node;
+ struct lttng_enabler *enabler;
+ /*
+ * struct lttng_ust_event_exclusion had variable sized array,
+ * must be last field.
+ */
+ struct lttng_ust_event_exclusion excluder;
+};
/*
* Filter return value masks.
*/
return NULL;
enabler->type = type;
CDS_INIT_LIST_HEAD(&enabler->filter_bytecode_head);
+ CDS_INIT_LIST_HEAD(&enabler->excluder_head);
memcpy(&enabler->event_param, event_param,
sizeof(enabler->event_param));
enabler->chan = chan;
void lttng_enabler_destroy(struct lttng_enabler *enabler)
{
struct lttng_ust_filter_bytecode_node *filter_node, *tmp_filter_node;
+ struct lttng_ust_excluder_node *excluder_node, *tmp_excluder_node;
/* Destroy filter bytecode */
cds_list_for_each_entry_safe(filter_node, tmp_filter_node,
free(filter_node);
}
+ /* Destroy excluders */
+ cds_list_for_each_entry_safe(excluder_node, tmp_excluder_node,
+ &enabler->excluder_head, node) {
+ free(excluder_node);
+ }
+
/* Destroy contexts */
lttng_destroy_context(enabler->ctx);