提交 00fd61ae 编写于 作者: S Steven Rostedt 提交者: Ingo Molnar

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: NSteven Rostedt <srostedt@redhat.com>
Signed-off-by: NIngo Molnar <mingo@elte.hu>
上级 98a983aa
...@@ -307,7 +307,7 @@ void ftrace_release(void *start, unsigned long size) ...@@ -307,7 +307,7 @@ void ftrace_release(void *start, unsigned long size)
unsigned long e = s + size; unsigned long e = s + size;
int i; int i;
if (!start) if (ftrace_disabled || !start)
return; return;
/* No interrupt should call this */ /* No interrupt should call this */
...@@ -1567,7 +1567,7 @@ static int ftrace_convert_nops(unsigned long *start, ...@@ -1567,7 +1567,7 @@ static int ftrace_convert_nops(unsigned long *start,
void ftrace_init_module(unsigned long *start, unsigned long *end) void ftrace_init_module(unsigned long *start, unsigned long *end)
{ {
if (start == end) if (ftrace_disabled || start == end)
return; return;
ftrace_convert_nops(start, end); ftrace_convert_nops(start, end);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册