diff options
| author | Steven Rostedt <srostedt@redhat.com> | 2012-05-11 20:54:53 -0400 |
|---|---|---|
| committer | Steven Rostedt <rostedt@goodmis.org> | 2012-11-02 10:21:50 -0400 |
| commit | c7b84ecada9a8b7fe3e6c081e70801703897ed5d (patch) | |
| tree | f586f3dbe52afad825fe857aa6d9d1e5f017cd3d /kernel/trace | |
| parent | 15075cac423d634ddf39dac66f943b3bce847f87 (diff) | |
tracing: Remove unused function unregister_tracer()
The function register_tracer() is only used by kernel core code,
that never needs to remove the tracer. As trace_events have become
the main way to add new tracing to the kernel, the need to
unregister a tracer has diminished. Remove the unused function
unregister_tracer(). If a need arises where we need it, then we
can always add it back.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'kernel/trace')
| -rw-r--r-- | kernel/trace/trace.c | 26 | ||||
| -rw-r--r-- | kernel/trace/trace.h | 1 |
2 files changed, 0 insertions, 27 deletions
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index 6ed6013dff2..d1d8039578a 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c | |||
| @@ -882,32 +882,6 @@ int register_tracer(struct tracer *type) | |||
| 882 | return ret; | 882 | return ret; |
| 883 | } | 883 | } |
| 884 | 884 | ||
| 885 | void unregister_tracer(struct tracer *type) | ||
| 886 | { | ||
| 887 | struct tracer **t; | ||
| 888 | |||
| 889 | mutex_lock(&trace_types_lock); | ||
| 890 | for (t = &trace_types; *t; t = &(*t)->next) { | ||
| 891 | if (*t == type) | ||
| 892 | goto found; | ||
| 893 | } | ||
| 894 | pr_info("Tracer %s not registered\n", type->name); | ||
| 895 | goto out; | ||
| 896 | |||
| 897 | found: | ||
| 898 | *t = (*t)->next; | ||
| 899 | |||
| 900 | if (type == current_trace && tracer_enabled) { | ||
| 901 | tracer_enabled = 0; | ||
| 902 | tracing_stop(); | ||
| 903 | if (current_trace->stop) | ||
| 904 | current_trace->stop(&global_trace); | ||
| 905 | current_trace = &nop_trace; | ||
| 906 | } | ||
| 907 | out: | ||
| 908 | mutex_unlock(&trace_types_lock); | ||
| 909 | } | ||
| 910 | |||
| 911 | void tracing_reset(struct trace_array *tr, int cpu) | 885 | void tracing_reset(struct trace_array *tr, int cpu) |
| 912 | { | 886 | { |
| 913 | struct ring_buffer *buffer = tr->buffer; | 887 | struct ring_buffer *buffer = tr->buffer; |
diff --git a/kernel/trace/trace.h b/kernel/trace/trace.h index 839ae003a05..3e8a176f64e 100644 --- a/kernel/trace/trace.h +++ b/kernel/trace/trace.h | |||
| @@ -410,7 +410,6 @@ void tracing_sched_switch_assign_trace(struct trace_array *tr); | |||
| 410 | void tracing_stop_sched_switch_record(void); | 410 | void tracing_stop_sched_switch_record(void); |
| 411 | void tracing_start_sched_switch_record(void); | 411 | void tracing_start_sched_switch_record(void); |
| 412 | int register_tracer(struct tracer *type); | 412 | int register_tracer(struct tracer *type); |
| 413 | void unregister_tracer(struct tracer *type); | ||
| 414 | int is_tracing_stopped(void); | 413 | int is_tracing_stopped(void); |
| 415 | enum trace_file_type { | 414 | enum trace_file_type { |
| 416 | TRACE_FILE_LAT_FMT = 1, | 415 | TRACE_FILE_LAT_FMT = 1, |
