From: Mathieu Desnoyers Date: Fri, 5 Nov 2021 19:01:46 +0000 (-0400) Subject: Refactoring: move lttng_syscall_event_enabler_create_matching_events after probe... X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=86e12a510dbf09ecb3c0fe3492736a88a820dfcb;p=lttng-modules.git Refactoring: move lttng_syscall_event_enabler_create_matching_events after probe registration Considering that additional events can be added after the probe registration, there is no point in registering the probes after the event creation in the first instance. Signed-off-by: Mathieu Desnoyers Change-Id: Iba2ce2c1e718969f81e067e56dd106cd38a11447 --- diff --git a/src/lttng-syscalls.c b/src/lttng-syscalls.c index 1a6a4924..e432da0d 100644 --- a/src/lttng-syscalls.c +++ b/src/lttng-syscalls.c @@ -815,8 +815,6 @@ int lttng_event_enabler_create_syscall_events_if_missing(struct lttng_event_enab return -ENOMEM; } - lttng_syscall_event_enabler_create_matching_events(syscall_event_enabler); - if (!syscall_table->sys_enter_registered) { ret = lttng_wrapper_tracepoint_probe_register("sys_enter", (void *) syscall_entry_event_probe, syscall_table); @@ -835,6 +833,8 @@ int lttng_event_enabler_create_syscall_events_if_missing(struct lttng_event_enab syscall_table->sys_exit_registered = 1; } + lttng_syscall_event_enabler_create_matching_events(syscall_event_enabler); + return ret; }