tracing: Remove get/put_cpu() from function_trace_init

Since commit b6f11df26f ("trace: Call tracing_reset_online_cpus before
tracer->init()"), get/put_cpu() are not needed anymore.
We can use raw_smp_processor_id() instead.

Link: https://lkml.kernel.org/r/20201230140521.31920-1-hqjagain@gmail.com

Signed-off-by: Qiujun Huang <hqjagain@gmail.com>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
This commit is contained in:
Qiujun Huang 2020-12-30 22:05:21 +08:00 коммит произвёл Steven Rostedt (VMware)
Родитель b3ca59f6fe
Коммит 18d14ebdbd
1 изменённых файлов: 1 добавлений и 2 удалений

Просмотреть файл

@ -106,8 +106,7 @@ static int function_trace_init(struct trace_array *tr)
ftrace_init_array_ops(tr, func);
tr->array_buffer.cpu = get_cpu();
put_cpu();
tr->array_buffer.cpu = raw_smp_processor_id();
tracing_start_cmdline_record();
tracing_start_function_trace(tr);