diff options
author | Frederic Weisbecker <fweisbec@gmail.com> | 2009-02-07 16:16:12 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-02-09 04:51:38 -0500 |
commit | 1292211058aaf872eeb2a0e2677d237916b4501f (patch) | |
tree | 7127ffe80e42faed85bf45b4182c97a39f299642 /include/trace | |
parent | 7447dce96f2233d250bc39a4a10a42f7c3dd46fc (diff) |
tracing/power: move the power trace headers to a dedicated file
Impact: cleanup
Move the power tracer headers to trace/power.h to keep ftrace.h and power bits
more easy to maintain as separated topics.
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Arjan van de Ven <arjan@infradead.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include/trace')
-rw-r--r-- | include/trace/power.h | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/include/trace/power.h b/include/trace/power.h new file mode 100644 index 000000000000..c7cefbcdaea4 --- /dev/null +++ b/include/trace/power.h | |||
@@ -0,0 +1,35 @@ | |||
1 | #ifndef _TRACE_POWER_H | ||
2 | #define _TRACE_POWER_H | ||
3 | |||
4 | #include <linux/ktime.h> | ||
5 | |||
6 | enum { | ||
7 | POWER_NONE = 0, | ||
8 | POWER_CSTATE = 1, | ||
9 | POWER_PSTATE = 2, | ||
10 | }; | ||
11 | |||
12 | struct power_trace { | ||
13 | #ifdef CONFIG_POWER_TRACER | ||
14 | ktime_t stamp; | ||
15 | ktime_t end; | ||
16 | int type; | ||
17 | int state; | ||
18 | #endif | ||
19 | }; | ||
20 | |||
21 | #ifdef CONFIG_POWER_TRACER | ||
22 | extern void trace_power_start(struct power_trace *it, unsigned int type, | ||
23 | unsigned int state); | ||
24 | extern void trace_power_mark(struct power_trace *it, unsigned int type, | ||
25 | unsigned int state); | ||
26 | extern void trace_power_end(struct power_trace *it); | ||
27 | #else | ||
28 | static inline void trace_power_start(struct power_trace *it, unsigned int type, | ||
29 | unsigned int state) { } | ||
30 | static inline void trace_power_mark(struct power_trace *it, unsigned int type, | ||
31 | unsigned int state) { } | ||
32 | static inline void trace_power_end(struct power_trace *it) { } | ||
33 | #endif | ||
34 | |||
35 | #endif /* _TRACE_POWER_H */ | ||