diff options
author | Frederic Weisbecker <fweisbec@gmail.com> | 2008-10-31 08:14:28 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-11-04 11:14:05 -0500 |
commit | e55f605c14679c30be41473e60b7ad26524cdc35 (patch) | |
tree | 3204ee5f0ed1beac112fb38de72d0bc4412edddb /kernel/trace/trace_sched_switch.c | |
parent | 07695fa04e8a3384b0c855398ce1f7885bd7dc3b (diff) |
tracing/ftrace: remove unused code in sched_switch tracer
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>
Diffstat (limited to 'kernel/trace/trace_sched_switch.c')
-rw-r--r-- | kernel/trace/trace_sched_switch.c | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/kernel/trace/trace_sched_switch.c b/kernel/trace/trace_sched_switch.c index 59de5141207c..96620c714300 100644 --- a/kernel/trace/trace_sched_switch.c +++ b/kernel/trace/trace_sched_switch.c | |||
@@ -203,14 +203,6 @@ static struct tracer sched_switch_trace __read_mostly = | |||
203 | 203 | ||
204 | __init static int init_sched_switch_trace(void) | 204 | __init static int init_sched_switch_trace(void) |
205 | { | 205 | { |
206 | int ret = 0; | ||
207 | |||
208 | if (atomic_read(&sched_ref)) | ||
209 | ret = tracing_sched_register(); | ||
210 | if (ret) { | ||
211 | pr_info("error registering scheduler trace\n"); | ||
212 | return ret; | ||
213 | } | ||
214 | return register_tracer(&sched_switch_trace); | 206 | return register_tracer(&sched_switch_trace); |
215 | } | 207 | } |
216 | device_initcall(init_sched_switch_trace); | 208 | device_initcall(init_sched_switch_trace); |