ftrace: use current CPU for function startup
authorSteven Rostedt <rostedt@goodmis.org>
Fri, 11 Jul 2008 00:58:14 +0000 (20:58 -0400)
committerIngo Molnar <mingo@elte.hu>
Fri, 11 Jul 2008 13:49:21 +0000 (15:49 +0200)
This is more of a clean up. Currently the function tracer initializes the
tracer with which ever CPU was last used for tracing. This value isn't
realy useful for function tracing, but at least it should be something other
than a random number.

Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Cc: Steven Rostedt <srostedt@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
kernel/trace/trace_functions.c

index 7ee7dcd76b7db76b5eca8afade67b6ce60365542..312144897970b18c7d9fd596bbf033182f68822b 100644 (file)
@@ -28,7 +28,10 @@ static void function_reset(struct trace_array *tr)
 
 static void start_function_trace(struct trace_array *tr)
 {
+       tr->cpu = get_cpu();
        function_reset(tr);
+       put_cpu();
+
        tracing_start_cmdline_record();
        tracing_start_function_trace();
 }