提交 62524d55 编写于 作者: S Steven Rostedt

tracing: make power tracer start/stop methods lighter weight

The start/stop methods of a tracer should be able to be executed
in all contexts. This patch converts the power tracer to do so.
Signed-off-by: NSteven Rostedt <srostedt@redhat.com>
上级 5fec6ddc
......@@ -122,10 +122,14 @@ static int tracing_power_register(void)
static void start_power_trace(struct trace_array *tr)
{
trace_power_enabled = 1;
tracing_power_register();
}
static void stop_power_trace(struct trace_array *tr)
{
trace_power_enabled = 0;
}
static void power_trace_reset(struct trace_array *tr)
{
trace_power_enabled = 0;
unregister_trace_power_start(probe_power_start);
......@@ -188,7 +192,7 @@ static struct tracer power_tracer __read_mostly =
.init = power_trace_init,
.start = start_power_trace,
.stop = stop_power_trace,
.reset = stop_power_trace,
.reset = power_trace_reset,
.print_line = power_print_line,
};
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册