* Dual LGPL v2.1/GPL v2 license.
*/
+/*
+ * Ftrace function tracer does not seem to provide synchronization between probe
+ * teardown and callback execution. Therefore, we make this module permanently
+ * loaded (unloadable).
+ */
+
#include <linux/module.h>
#include <linux/ftrace.h>
#include <linux/slab.h>
#include "../ltt-events.h"
#include "../wrapper/ringbuffer/frontend_types.h"
#include "../wrapper/ftrace.h"
+#include "../wrapper/vmalloc.h"
#include "../ltt-tracer.h"
static
if (!event->u.ftrace.symbol_name)
goto name_error;
+ /* Ensure the memory we just allocated don't trigger page faults */
+ wrapper_vmalloc_sync_all();
+
ret = wrapper_register_ftrace_function_probe(event->u.ftrace.symbol_name,
<tng_ftrace_ops, event);
if (ret)
}
EXPORT_SYMBOL_GPL(lttng_ftrace_unregister);
+/* This module is permanent. */
+int lttng_ftrace_init(void)
+{
+ wrapper_vmalloc_sync_all();
+ return 0;
+}
+module_init(lttng_ftrace_init)
+
MODULE_LICENSE("GPL and additional rights");
MODULE_AUTHOR("Mathieu Desnoyers");
MODULE_DESCRIPTION("Linux Trace Toolkit Ftrace Support");