From 1695dc9a055c3383067cccac91cb8918cb2eaab1 Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Mon, 23 May 2011 23:48:10 -0400 Subject: [PATCH] lttng-ftrace module can be unloaded safely Signed-off-by: Mathieu Desnoyers --- probes/lttng-ftrace.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/probes/lttng-ftrace.c b/probes/lttng-ftrace.c index 7c4fc9f5..7637e4b5 100644 --- a/probes/lttng-ftrace.c +++ b/probes/lttng-ftrace.c @@ -152,7 +152,6 @@ void lttng_ftrace_unregister(struct ltt_event *event) } EXPORT_SYMBOL_GPL(lttng_ftrace_unregister); -/* This module is permanent. */ int lttng_ftrace_init(void) { wrapper_vmalloc_sync_all(); @@ -160,6 +159,15 @@ int lttng_ftrace_init(void) } module_init(lttng_ftrace_init) +/* + * Ftrace takes care of waiting for a grace period (RCU sched) at probe + * unregistration, and disables preemption around probe call. + */ +void lttng_ftrace_exit(void) +{ +} +module_exit(lttng_ftrace_exit) + MODULE_LICENSE("GPL and additional rights"); MODULE_AUTHOR("Mathieu Desnoyers"); MODULE_DESCRIPTION("Linux Trace Toolkit Ftrace Support"); -- 2.34.1