diff options
author | Steven Rostedt (Red Hat) <rostedt@goodmis.org> | 2013-06-28 04:18:06 +0200 |
---|---|---|
committer | Steven Rostedt <rostedt@goodmis.org> | 2013-07-02 02:57:15 +0200 |
commit | f1ed7c741fcd0c3d7d318e7c19813d89934b9296 (patch) | |
tree | 58721d29f205342f2099c8548860bcbe6bee13e7 /kernel/trace/ftrace.c | |
parent | tracing/kprobes: Don't pass addr=ip to perf_trace_buf_submit() (diff) | |
download | linux-f1ed7c741fcd0c3d7d318e7c19813d89934b9296.tar.xz linux-f1ed7c741fcd0c3d7d318e7c19813d89934b9296.zip |
ftrace: Do not run selftest if command line parameter is set
If the kernel command line ftrace filter parameters are set
(ftrace_filter or ftrace_notrace), force the function self test to
pass, with a warning why it was forced.
If the user adds a filter to the kernel command line, it is assumed
that they know what they are doing, and the self test should just not
run instead of failing (which disables function tracing) or clearing
the filter, as that will probably annoy the user.
If the user wants the selftest to run, the message will tell them why
it did not.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'kernel/trace/ftrace.c')
-rw-r--r-- | kernel/trace/ftrace.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c index 26e19105cdcc..67708f46baae 100644 --- a/kernel/trace/ftrace.c +++ b/kernel/trace/ftrace.c @@ -3537,8 +3537,12 @@ EXPORT_SYMBOL_GPL(ftrace_set_global_notrace); static char ftrace_notrace_buf[FTRACE_FILTER_SIZE] __initdata; static char ftrace_filter_buf[FTRACE_FILTER_SIZE] __initdata; +/* Used by function selftest to not test if filter is set */ +bool ftrace_filter_param __initdata; + static int __init set_ftrace_notrace(char *str) { + ftrace_filter_param = true; strlcpy(ftrace_notrace_buf, str, FTRACE_FILTER_SIZE); return 1; } @@ -3546,6 +3550,7 @@ __setup("ftrace_notrace=", set_ftrace_notrace); static int __init set_ftrace_filter(char *str) { + ftrace_filter_param = true; strlcpy(ftrace_filter_buf, str, FTRACE_FILTER_SIZE); return 1; } |