Skip to content

Commit

Permalink
trace: Use tracing_reset_online_cpus in more places
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Arnaldo Carvalho de Melo authored and Ingo Molnar committed Jan 29, 2009
1 parent 700a3dc commit f04109b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 16 deletions.
6 changes: 1 addition & 5 deletions kernel/trace/trace_branch.c
Original file line number Diff line number Diff line change
Expand Up @@ -133,11 +133,7 @@ static void stop_branch_trace(struct trace_array *tr)

static int branch_trace_init(struct trace_array *tr)
{
int cpu;

for_each_online_cpu(cpu)
tracing_reset(tr, cpu);

tracing_reset_online_cpus(tr);
start_branch_trace(tr);
return 0;
}
Expand Down
8 changes: 2 additions & 6 deletions kernel/trace/trace_functions_graph.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,11 @@ static struct tracer_flags tracer_flags = {

static int graph_trace_init(struct trace_array *tr)
{
int cpu, ret;

for_each_online_cpu(cpu)
tracing_reset(tr, cpu);

ret = register_ftrace_graph(&trace_graph_return,
int ret = register_ftrace_graph(&trace_graph_return,
&trace_graph_entry);
if (ret)
return ret;
tracing_reset_online_cpus(tr);
tracing_start_cmdline_record();

return 0;
Expand Down
6 changes: 1 addition & 5 deletions kernel/trace/trace_nop.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,8 @@ static void stop_nop_trace(struct trace_array *tr)

static int nop_trace_init(struct trace_array *tr)
{
int cpu;
ctx_trace = tr;

for_each_online_cpu(cpu)
tracing_reset(tr, cpu);

tracing_reset_online_cpus(tr);
start_nop_trace(tr);
return 0;
}
Expand Down

0 comments on commit f04109b

Please sign in to comment.