From: Mathieu Desnoyers Date: Thu, 10 Feb 2022 19:25:35 +0000 (-0500) Subject: Skip sync of disabled enablers X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=f245bc9fd7dfd47103be68bb8397f4ab9029ecc6;p=lttng-modules.git Skip sync of disabled enablers Signed-off-by: Mathieu Desnoyers Change-Id: Icf20e16baee3c63b84f1be9f730100229108bcc6 --- diff --git a/src/lttng-events.c b/src/lttng-events.c index 67a41a38..d7c488ec 100644 --- a/src/lttng-events.c +++ b/src/lttng-events.c @@ -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; }