Skip to content

Commit

Permalink
ftrace: do not init module on ftrace disabled
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Steven Rostedt authored and Ingo Molnar committed Oct 14, 2008
1 parent 98a983a commit 00fd61a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions kernel/trace/ftrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down Expand Up @@ -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);
}
Expand Down

0 comments on commit 00fd61a

Please sign in to comment.