Skip to content

Commit f04109b

Browse files
acmelIngo Molnar
authored andcommitted
trace: Use tracing_reset_online_cpus in more places
Impact: cleanup Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Acked-by: Frédéric Weisbecker <fweisbec@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
1 parent 700a3dc commit f04109b

3 files changed

Lines changed: 4 additions & 16 deletions

File tree

‎kernel/trace/trace_branch.c‎

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -133,11 +133,7 @@ static void stop_branch_trace(struct trace_array *tr)
133133

134134
static int branch_trace_init(struct trace_array *tr)
135135
{
136-
int cpu;
137-
138-
for_each_online_cpu(cpu)
139-
tracing_reset(tr, cpu);
140-
136+
tracing_reset_online_cpus(tr);
141137
start_branch_trace(tr);
142138
return 0;
143139
}

‎kernel/trace/trace_functions_graph.c‎

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,15 +52,11 @@ static struct tracer_flags tracer_flags = {
5252

5353
static int graph_trace_init(struct trace_array *tr)
5454
{
55-
int cpu, ret;
56-
57-
for_each_online_cpu(cpu)
58-
tracing_reset(tr, cpu);
59-
60-
ret = register_ftrace_graph(&trace_graph_return,
55+
int ret = register_ftrace_graph(&trace_graph_return,
6156
&trace_graph_entry);
6257
if (ret)
6358
return ret;
59+
tracing_reset_online_cpus(tr);
6460
tracing_start_cmdline_record();
6561

6662
return 0;

‎kernel/trace/trace_nop.c‎

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,8 @@ static void stop_nop_trace(struct trace_array *tr)
4747

4848
static int nop_trace_init(struct trace_array *tr)
4949
{
50-
int cpu;
5150
ctx_trace = tr;
52-
53-
for_each_online_cpu(cpu)
54-
tracing_reset(tr, cpu);
55-
51+
tracing_reset_online_cpus(tr);
5652
start_nop_trace(tr);
5753
return 0;
5854
}

0 commit comments

Comments
 (0)