Combine common recorder/notifier functions to lttng_free_event_filter_runtime
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mon, 15 Mar 2021 14:06:39 +0000 (10:06 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mon, 15 Mar 2021 14:06:39 +0000 (10:06 -0400)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: If62cd44dd4036a907d28398ee9057d624b54fe89

liblttng-ust/lttng-bytecode.c
liblttng-ust/lttng-events.c
liblttng-ust/ust-events-internal.h

index 0818b39ba03172e163d83fed1bc8bd681e2b89cd..94edbab63312cf1a4bc954b4f06f35fb5b64144d 100644 (file)
@@ -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);
 }
index 8762b24b8e39b1d293e107a6076e9af9c1a18c77..af06d4908db52dcd2d382a6cdef4b858de6a601b 100644 (file)
@@ -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)
index effd747d0ca1ef76fe884123c9e57108f507cb7a..ec2b8e4b67ca2858229075480d222bebe1959608 100644 (file)
@@ -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.
This page took 0.028964 seconds and 4 git commands to generate.