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

From: Steven Rostedt
Date: Thu Jul 10 2008 - 21:01:54 EST


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

--
--
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/