]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
tracing: make power tracer start/stop methods lighter weight
authorSteven Rostedt <srostedt@redhat.com>
Wed, 18 Mar 2009 00:58:00 +0000 (20:58 -0400)
committerSteven Rostedt <srostedt@redhat.com>
Wed, 18 Mar 2009 03:12:11 +0000 (23:12 -0400)
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: Steven Rostedt <srostedt@redhat.com>
kernel/trace/trace_power.c

index 91ce672fb037ee012ab2d642e876295596cf4344..bae791ebcc516ada0ef814e36afa6949178ebb2c 100644 (file)
@@ -122,10 +122,14 @@ fail_start:
 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,
 };