From: Steven Rostedt Date: Sat, 16 Aug 2008 01:40:04 +0000 (-0400) Subject: ftrace: do not init module on ftrace disabled X-Git-Tag: v2.6.28-rc1~78^2~100 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=00fd61aee10533e003f2f00ab7163207660a4051;p=karo-tx-linux.git 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 Signed-off-by: Ingo Molnar --- diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c index eadd0eaea9b6..11d94f2dc485 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); }