From: Mathieu Desnoyers Date: Mon, 2 Jul 2012 15:34:30 +0000 (-0400) Subject: trace event: introduce TP_MODULE_NOAUTOLOAD and TP_MODULE_NOINIT X-Git-Tag: v2.1.0-rc1~17 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=2655f9ad555ee81a0d754cd14910861cbbd7a177;p=lttng-modules.git trace event: introduce TP_MODULE_NOAUTOLOAD and TP_MODULE_NOINIT In preparation for introducing uevent tracing. (user-space events) Signed-off-by: Mathieu Desnoyers --- diff --git a/lttng-syscalls.c b/lttng-syscalls.c index 37feffbe..a1bc9d42 100644 --- a/lttng-syscalls.c +++ b/lttng-syscalls.c @@ -49,7 +49,7 @@ void syscall_entry_probe(void *__data, struct pt_regs *regs, long id); */ #define LTTNG_PACKAGE_BUILD #define CREATE_TRACE_POINTS -#define TP_MODULE_OVERRIDE +#define TP_MODULE_NOINIT #define TRACE_INCLUDE_PATH ../instrumentation/syscalls/headers #define PARAMS(args...) args @@ -107,7 +107,7 @@ void syscall_entry_probe(void *__data, struct pt_regs *regs, long id); #undef SC_DEFINE_EVENT_NOARGS #undef TP_PROBE_CB -#undef TP_MODULE_OVERRIDE +#undef TP_MODULE_NOINIT #undef LTTNG_PACKAGE_BUILD #undef CREATE_TRACE_POINTS diff --git a/probes/lttng-events.h b/probes/lttng-events.h index 492423ac..d3d75ad5 100644 --- a/probes/lttng-events.h +++ b/probes/lttng-events.h @@ -714,23 +714,25 @@ static void __event_probe__##_name(void *__data) \ #define module_exit_eval1(_token, _system) module_exit(_token##_system) #define module_exit_eval(_token, _system) module_exit_eval1(_token, _system) -#ifndef TP_MODULE_OVERRIDE +#ifndef TP_MODULE_NOINIT static int TP_ID(__lttng_events_init__, TRACE_SYSTEM)(void) { wrapper_vmalloc_sync_all(); return lttng_probe_register(&TP_ID(__probe_desc___, TRACE_SYSTEM)); } -module_init_eval(__lttng_events_init__, TRACE_SYSTEM); - static void TP_ID(__lttng_events_exit__, TRACE_SYSTEM)(void) { lttng_probe_unregister(&TP_ID(__probe_desc___, TRACE_SYSTEM)); } +#ifndef TP_MODULE_NOAUTOLOAD +module_init_eval(__lttng_events_init__, TRACE_SYSTEM); module_exit_eval(__lttng_events_exit__, TRACE_SYSTEM); #endif +#endif + #undef module_init_eval #undef module_exit_eval #undef TP_ID1