Refactoring: move lttng_syscall_event_enabler_create_matching_events after probe...
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 5 Nov 2021 19:01:46 +0000 (15:01 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 5 Nov 2021 19:01:46 +0000 (15:01 -0400)
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 <mathieu.desnoyers@efficios.com>
Change-Id: Iba2ce2c1e718969f81e067e56dd106cd38a11447

src/lttng-syscalls.c

index 1a6a492431b2b2b8f943bd1594601ffa19a4c85c..e432da0d80ae1d24e15a029aa7248250e9562264 100644 (file)
@@ -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;
 }
 
This page took 0.026701 seconds and 4 git commands to generate.