aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/trace/trace_power.c
diff options
context:
space:
mode:
authorSteven Rostedt <srostedt@redhat.com>2009-03-17 20:58:00 -0400
committerSteven Rostedt <srostedt@redhat.com>2009-03-17 23:12:11 -0400
commit62524d55e5b9ffe36e3bf3dd7a594114f150b449 (patch)
tree4e38825d35950ea962bbc44bdc78aea9ef909458 /kernel/trace/trace_power.c
parent5fec6ddcb43a91aa9a254c8ecf174c803de6f07e (diff)
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: Steven Rostedt <srostedt@redhat.com>
Diffstat (limited to 'kernel/trace/trace_power.c')
-rw-r--r--kernel/trace/trace_power.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/kernel/trace/trace_power.c b/kernel/trace/trace_power.c
index 91ce672fb037..bae791ebcc51 100644
--- a/kernel/trace/trace_power.c
+++ b/kernel/trace/trace_power.c
@@ -122,12 +122,16 @@ fail_start:
122static void start_power_trace(struct trace_array *tr) 122static void start_power_trace(struct trace_array *tr)
123{ 123{
124 trace_power_enabled = 1; 124 trace_power_enabled = 1;
125 tracing_power_register();
126} 125}
127 126
128static void stop_power_trace(struct trace_array *tr) 127static void stop_power_trace(struct trace_array *tr)
129{ 128{
130 trace_power_enabled = 0; 129 trace_power_enabled = 0;
130}
131
132static void power_trace_reset(struct trace_array *tr)
133{
134 trace_power_enabled = 0;
131 unregister_trace_power_start(probe_power_start); 135 unregister_trace_power_start(probe_power_start);
132 unregister_trace_power_end(probe_power_end); 136 unregister_trace_power_end(probe_power_end);
133 unregister_trace_power_mark(probe_power_mark); 137 unregister_trace_power_mark(probe_power_mark);
@@ -188,7 +192,7 @@ static struct tracer power_tracer __read_mostly =
188 .init = power_trace_init, 192 .init = power_trace_init,
189 .start = start_power_trace, 193 .start = start_power_trace,
190 .stop = stop_power_trace, 194 .stop = stop_power_trace,
191 .reset = stop_power_trace, 195 .reset = power_trace_reset,
192 .print_line = power_print_line, 196 .print_line = power_print_line,
193}; 197};
194 198