aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteven Rostedt <rostedt@goodmis.org>2008-08-15 21:40:04 -0400
committerIngo Molnar <mingo@elte.hu>2008-10-14 10:35:43 +0200
commit00fd61aee10533e003f2f00ab7163207660a4051 (patch)
tree72f42d3a4b238d84e3697c53b31b1ba9f8d022cb
parent98a983aad2e5b3dc83a8a761675445cdd8f3e6bd (diff)
downloadmrst-s0i3-test-00fd61aee10533e003f2f00ab7163207660a4051.tar.gz
mrst-s0i3-test-00fd61aee10533e003f2f00ab7163207660a4051.tar.xz
mrst-s0i3-test-00fd61aee10533e003f2f00ab7163207660a4051.zip
ftrace: do not init module on ftrace disabled
If one of the self tests of ftrace has disabled the function tracer, do not run the code to convert the mcount calls in modules. Signed-off-by: Steven Rostedt <srostedt@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
-rw-r--r--kernel/trace/ftrace.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c
index eadd0eaea9b..11d94f2dc48 100644
--- a/kernel/trace/ftrace.c
+++ b/kernel/trace/ftrace.c
@@ -307,7 +307,7 @@ void ftrace_release(void *start, unsigned long size)
unsigned long e = s + size;
int i;
- if (!start)
+ if (ftrace_disabled || !start)
return;
/* No interrupt should call this */
@@ -1567,7 +1567,7 @@ static int ftrace_convert_nops(unsigned long *start,
void ftrace_init_module(unsigned long *start, unsigned long *end)
{
- if (start == end)
+ if (ftrace_disabled || start == end)
return;
ftrace_convert_nops(start, end);
}