diff options
author | Jason Baron <jbaron@redhat.com> | 2009-02-11 13:57:25 -0500 |
---|---|---|
committer | Steven Rostedt <srostedt@redhat.com> | 2009-02-13 09:06:18 -0500 |
commit | b5f9fd0f8a05c9bafb91a9a85b9110938d8e585b (patch) | |
tree | 14e84d393f5dd1235fc6e256564d80e965daf3a7 /include/trace | |
parent | 45141d4667d208421ca787a3301542b6a5e0b112 (diff) |
tracing: convert c/p state power tracer to use tracepoints
Convert the c/p state "power" tracer to use tracepoints. Avoids a
function call when the tracer is disabled.
Signed-off-by: Jason Baron <jbaron@redhat.com>
Acked-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Diffstat (limited to 'include/trace')
-rw-r--r-- | include/trace/power.h | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/include/trace/power.h b/include/trace/power.h index c7cefbcdaea4..2c733e58e89c 100644 --- a/include/trace/power.h +++ b/include/trace/power.h | |||
@@ -2,6 +2,7 @@ | |||
2 | #define _TRACE_POWER_H | 2 | #define _TRACE_POWER_H |
3 | 3 | ||
4 | #include <linux/ktime.h> | 4 | #include <linux/ktime.h> |
5 | #include <linux/tracepoint.h> | ||
5 | 6 | ||
6 | enum { | 7 | enum { |
7 | POWER_NONE = 0, | 8 | POWER_NONE = 0, |
@@ -18,18 +19,16 @@ struct power_trace { | |||
18 | #endif | 19 | #endif |
19 | }; | 20 | }; |
20 | 21 | ||
21 | #ifdef CONFIG_POWER_TRACER | 22 | DECLARE_TRACE(power_start, |
22 | extern void trace_power_start(struct power_trace *it, unsigned int type, | 23 | TPPROTO(struct power_trace *it, unsigned int type, unsigned int state), |
23 | unsigned int state); | 24 | TPARGS(it, type, state)); |
24 | extern void trace_power_mark(struct power_trace *it, unsigned int type, | 25 | |
25 | unsigned int state); | 26 | DECLARE_TRACE(power_mark, |
26 | extern void trace_power_end(struct power_trace *it); | 27 | TPPROTO(struct power_trace *it, unsigned int type, unsigned int state), |
27 | #else | 28 | TPARGS(it, type, state)); |
28 | static inline void trace_power_start(struct power_trace *it, unsigned int type, | 29 | |
29 | unsigned int state) { } | 30 | DECLARE_TRACE(power_end, |
30 | static inline void trace_power_mark(struct power_trace *it, unsigned int type, | 31 | TPPROTO(struct power_trace *it), |
31 | unsigned int state) { } | 32 | TPARGS(it)); |
32 | static inline void trace_power_end(struct power_trace *it) { } | ||
33 | #endif | ||
34 | 33 | ||
35 | #endif /* _TRACE_POWER_H */ | 34 | #endif /* _TRACE_POWER_H */ |