*/
#include <linux/ftrace.h>
+#include <linux/version.h>
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,12,0))
+#include <../kernel/trace/trace.h>
+#endif
#ifdef CONFIG_KALLSYMS
if (register_ftrace_function_probe_sym) {
return register_ftrace_function_probe_sym(glob, ops, data);
} else {
- printk(KERN_WARNING "LTTng: register_ftrace_function_probe symbol lookup failed.\n");
+ printk_once(KERN_WARNING "LTTng: register_ftrace_function_probe symbol lookup failed.\n");
return -EINVAL;
}
}
if (unregister_ftrace_function_probe_sym) {
unregister_ftrace_function_probe_sym(glob, ops, data);
} else {
- printk(KERN_WARNING "LTTng: unregister_ftrace_function_probe symbol lookup failed.\n");
+ printk_once(KERN_WARNING "LTTng: unregister_ftrace_function_probe symbol lookup failed.\n");
WARN_ON(1);
}
}