Skip to content

Commit

Permalink
tracing/ftrace: remove unused code in sched_switch tracer
Browse files Browse the repository at this point in the history
Impact: cleanup

When init_sched_switch_trace() is called, it has no reason to start
the sched tracer if the sched_ref is not zero.

_ If this is non-zero, the tracer is already used, but we can register it
to the tracing engine. There is already a security which avoid the tracer
probes not to be resgistered twice.

_ If this is zero, this block will not be used.

Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Frederic Weisbecker authored and Ingo Molnar committed Nov 4, 2008
1 parent 07695fa commit e55f605
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions kernel/trace/trace_sched_switch.c
Original file line number Diff line number Diff line change
Expand Up @@ -203,14 +203,6 @@ static struct tracer sched_switch_trace __read_mostly =

__init static int init_sched_switch_trace(void)
{
int ret = 0;

if (atomic_read(&sched_ref))
ret = tracing_sched_register();
if (ret) {
pr_info("error registering scheduler trace\n");
return ret;
}
return register_tracer(&sched_switch_trace);
}
device_initcall(init_sched_switch_trace);

0 comments on commit e55f605

Please sign in to comment.