long disabled;
int cpu;
+ tracing_record_cmdline(prev);
+ tracing_record_cmdline(next);
+
if (!tracer_enabled)
return;
prev = va_arg(*args, typeof(prev));
next = va_arg(*args, typeof(next));
- tracing_record_cmdline(prev);
-
/*
* If tracer_switch_func only points to the local
* switch func, it still needs the ptr passed to it.
&ctx_trace);
}
-void tracing_start_sched_switch(void)
+static void tracing_start_sched_switch(void)
{
long ref;
tracing_sched_register();
}
-void tracing_stop_sched_switch(void)
+static void tracing_stop_sched_switch(void)
{
long ref;
tracing_sched_unregister();
}
+void tracing_start_cmdline_record(void)
+{
+ tracing_start_sched_switch();
+}
+
+void tracing_stop_cmdline_record(void)
+{
+ tracing_stop_sched_switch();
+}
+
static void start_sched_trace(struct trace_array *tr)
{
sched_switch_reset(tr);
- atomic_inc(&trace_record_cmdline_enabled);
+ tracing_start_cmdline_record();
tracer_enabled = 1;
- tracing_start_sched_switch();
}
static void stop_sched_trace(struct trace_array *tr)
{
- tracing_stop_sched_switch();
- atomic_dec(&trace_record_cmdline_enabled);
tracer_enabled = 0;
+ tracing_stop_cmdline_record();
}
static void sched_switch_trace_init(struct trace_array *tr)