[PATCH 1/2] ftrace: do not init module on ftrace disabled

From: Steven Rostedt
Date: Fri Aug 15 2008 - 21:47:23 EST


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@xxxxxxxxxx>
---
kernel/trace/ftrace.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

Index: linux-tip.git/kernel/trace/ftrace.c
===================================================================
--- linux-tip.git.orig/kernel/trace/ftrace.c 2008-08-15 11:22:19.000000000 -0400
+++ linux-tip.git/kernel/trace/ftrace.c 2008-08-15 12:56:37.000000000 -0400
@@ -307,7 +307,7 @@ void ftrace_release(void *start, unsigne
unsigned long e = s + size;
int i;

- if (!start)
+ if (ftrace_disabled || !start)
return;

/* No interrupt should call this */
@@ -1574,7 +1574,7 @@ static int ftrace_convert_nops(unsigned

void ftrace_init_module(unsigned long *start, unsigned long *end)
{
- if (start == end)
+ if (ftrace_disabled || start == end)
return;
ftrace_convert_nops(start, end);
}

--
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/