[PATCH 6/8] ftrace: use current CPU for function startup

Steven Rostedt
2008-07-11T01:01:52Z

[-- Attachment #1: ftrace-function-use-this-cpu.patch --]
[-- Type: text/plain, Size: 932 bytes --]

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>
---
kernel/trace/trace_functions.c | 3 +++
1 file changed, 3 insertions(+)

Index: linux-tip.git/kernel/trace/trace_functions.c
===================================================================
--- linux-tip.git.orig/kernel/trace/trace_functions.c 2008-07-10 12:19:54.000000000 -0400
+++ linux-tip.git/kernel/trace/trace_functions.c 2008-07-10 12:56:09.000000000 -0400
@@ -28,7 +28,10 @@ static void function_reset(struct trace_

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();
}

--