Skip sync of disabled enablers
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 10 Feb 2022 19:25:35 +0000 (14:25 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mon, 15 Jul 2024 20:58:48 +0000 (16:58 -0400)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: Icf20e16baee3c63b84f1be9f730100229108bcc6

src/lttng-events.c

index 67a41a38fe6710bf730df64f5bb30f421518f197..d7c488eca44bbdb187d9c701d529cb2e3568c69c 100644 (file)
@@ -2362,6 +2362,13 @@ int lttng_event_enabler_ref_events(struct lttng_event_enabler_common *event_enab
        struct list_head *event_list_head = lttng_get_event_list_head_from_enabler(event_enabler);
        struct lttng_kernel_event_common_private *event_priv;
 
+        /*
+         * Only try to create events for enablers that are enabled, the user
+         * might still be attaching filter or exclusion to the event enabler.
+         */
+       if (!event_enabler->enabled)
+               goto end;
+
        lttng_syscall_table_set_wildcard_all(event_enabler);
 
        /* First ensure that probe events are created for this enabler. */
@@ -2392,6 +2399,7 @@ int lttng_event_enabler_ref_events(struct lttng_event_enabler_common *event_enab
                lttng_event_enabler_init_event_filter(event_enabler, event);
                lttng_event_enabler_init_event_capture(event_enabler, event);
        }
+end:
        return 0;
 }
 
This page took 0.027641 seconds and 4 git commands to generate.