aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/trace/trace_sched_switch.c
diff options
context:
space:
mode:
authorSteven Rostedt <srostedt@redhat.com>2008-11-07 22:36:02 -0500
committerIngo Molnar <mingo@elte.hu>2008-11-08 03:51:09 -0500
commit75f5c47da386445ba0c5a8b7e3ca0c906e763369 (patch)
treefa6719d849c7d3d8b1a7f753c877ac871035701e /kernel/trace/trace_sched_switch.c
parent0183fb1c94b74862b073590fc52c56b7364b7bad (diff)
ftrace: fix boot trace sched startup
Impact: boot tracer startup modified The boot tracer calls into some of the schedule tracing private functions that should not be exported. This patch cleans it up, and makes way for further changes in the ftrace infrastructure. This patch adds a api to assign a tracer array to the schedule context switch tracer. Signed-off-by: Steven Rostedt <srostedt@redhat.com> Acked-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.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/kernel/trace/trace_sched_switch.c b/kernel/trace/trace_sched_switch.c
index 91c699be8c8..fbf05df7134 100644
--- a/kernel/trace/trace_sched_switch.c
+++ b/kernel/trace/trace_sched_switch.c
@@ -152,6 +152,19 @@ void tracing_stop_cmdline_record(void)
152 tracing_stop_sched_switch(); 152 tracing_stop_sched_switch();
153} 153}
154 154
155/**
156 * tracing_cmdline_assign_trace - assign a trace array for ctx switch
157 * @tr: trace array pointer to assign
158 *
159 * Some tracers might want to record the context switches in their
160 * trace. This function lets those tracers assign the trace array
161 * to use.
162 */
163void tracing_cmdline_assign_trace(struct trace_array *tr)
164{
165 ctx_trace = tr;
166}
167
155static void start_sched_trace(struct trace_array *tr) 168static void start_sched_trace(struct trace_array *tr)
156{ 169{
157 sched_switch_reset(tr); 170 sched_switch_reset(tr);
@@ -197,7 +210,7 @@ static void sched_switch_trace_stop(struct trace_array *tr)
197 tracing_stop_sched_switch(); 210 tracing_stop_sched_switch();
198} 211}
199 212
200struct tracer sched_switch_trace __read_mostly = 213static struct tracer sched_switch_trace __read_mostly =
201{ 214{
202 .name = "sched_switch", 215 .name = "sched_switch",
203 .init = sched_switch_trace_init, 216 .init = sched_switch_trace_init,