From: Mathieu Desnoyers Date: Mon, 15 Mar 2021 14:06:39 +0000 (-0400) Subject: Combine common recorder/notifier functions to lttng_free_event_filter_runtime X-Git-Tag: v2.13.0-rc1~298 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=b1f720f08ebd9f83045a8ed7689658b8171a8adf;p=lttng-ust.git Combine common recorder/notifier functions to lttng_free_event_filter_runtime Signed-off-by: Mathieu Desnoyers Change-Id: If62cd44dd4036a907d28398ee9057d624b54fe89 --- diff --git a/liblttng-ust/lttng-bytecode.c b/liblttng-ust/lttng-bytecode.c index 0818b39b..94edbab6 100644 --- a/liblttng-ust/lttng-bytecode.c +++ b/liblttng-ust/lttng-bytecode.c @@ -608,13 +608,7 @@ void free_filter_runtime(struct cds_list_head *bytecode_runtime_head) } } -void lttng_free_event_recorder_filter_runtime(struct lttng_ust_event_recorder *event_recorder) +void lttng_free_event_filter_runtime(struct lttng_ust_event_common *event) { - free_filter_runtime(&event_recorder->parent->filter_bytecode_runtime_head); -} - -void lttng_free_event_notifier_filter_runtime( - struct lttng_ust_event_notifier *event_notifier) -{ - free_filter_runtime(&event_notifier->parent->filter_bytecode_runtime_head); + free_filter_runtime(&event->filter_bytecode_runtime_head); } diff --git a/liblttng-ust/lttng-events.c b/liblttng-ust/lttng-events.c index 8762b24b..af06d490 100644 --- a/liblttng-ust/lttng-events.c +++ b/liblttng-ust/lttng-events.c @@ -922,7 +922,7 @@ void _lttng_event_notifier_destroy(struct lttng_ust_event_notifier *event_notifi /* Remove from event_notifier hash table. */ cds_hlist_del(&event_notifier->priv->hlist); - lttng_free_event_notifier_filter_runtime(event_notifier); + lttng_free_event_filter_runtime(event_notifier->parent); /* Free event_notifier enabler refs */ cds_list_for_each_entry_safe(enabler_ref, tmp_enabler_ref, @@ -1377,7 +1377,7 @@ void _lttng_event_recorder_destroy(struct lttng_ust_event_recorder *event_record cds_hlist_del(&event_recorder->priv->hlist); lttng_destroy_context(event_recorder->ctx); - lttng_free_event_recorder_filter_runtime(event_recorder); + lttng_free_event_filter_runtime(event_recorder->parent); /* Free event enabler refs */ cds_list_for_each_entry_safe(enabler_ref, tmp_enabler_ref, &event_recorder->parent->priv->enablers_ref_head, node) diff --git a/liblttng-ust/ust-events-internal.h b/liblttng-ust/ust-events-internal.h index effd747d..ec2b8e4b 100644 --- a/liblttng-ust/ust-events-internal.h +++ b/liblttng-ust/ust-events-internal.h @@ -430,11 +430,7 @@ int lttng_event_notifier_enabler_attach_exclusion( struct lttng_ust_excluder_node **excluder); LTTNG_HIDDEN -void lttng_free_event_recorder_filter_runtime(struct lttng_ust_event_recorder *event_recorder); - -LTTNG_HIDDEN -void lttng_free_event_notifier_filter_runtime( - struct lttng_ust_event_notifier *event_notifier); +void lttng_free_event_filter_runtime(struct lttng_ust_event_common *event); /* * Connect the probe on all enablers matching this event description.