Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

tracing: Fix compile error when static ftrace is enabled

The stack tracer uses the call ftrace_set_early_filter() function
to allow the stack tracer to pick its own functions on boot.
But this function is not defined if dynamic ftrace is not set.
This causes a compiler error when stack tracer is enabled and
dynamic ftrace is not.

Reported-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>

authored by

Steven Rostedt and committed by
Steven Rostedt
96de37b6 38b78eb8

+1
+1
include/linux/ftrace.h
··· 339 339 * functions may still be called. Use a macro instead of inline. 340 340 */ 341 341 #define ftrace_regex_open(ops, flag, inod, file) ({ -ENODEV; }) 342 + #define ftrace_set_early_filter(ops, buf, enable) do { } while (0) 342 343 343 344 static inline ssize_t ftrace_filter_write(struct file *file, const char __user *ubuf, 344 345 size_t cnt, loff_t *ppos) { return -ENODEV; }