浏览代码

ftrace: use current CPU for function startup

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>
Steven Rostedt 17 年之前
父节点
当前提交
26bc83f4cb
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3 0
      kernel/trace/trace_functions.c

+ 3 - 0
kernel/trace/trace_functions.c

@@ -28,7 +28,10 @@ static void function_reset(struct trace_array *tr)
 
 
 static void start_function_trace(struct trace_array *tr)
 static void start_function_trace(struct trace_array *tr)
 {
 {
+	tr->cpu = get_cpu();
 	function_reset(tr);
 	function_reset(tr);
+	put_cpu();
+
 	tracing_start_cmdline_record();
 	tracing_start_cmdline_record();
 	tracing_start_function_trace();
 	tracing_start_function_trace();
 }
 }