Frederic Weisbecker | 1292211 | 2009-02-07 22:16:12 +0100 | [diff] [blame] | 1 | #ifndef _TRACE_POWER_H |
| 2 | #define _TRACE_POWER_H |
| 3 | |
| 4 | #include <linux/ktime.h> |
Jason Baron | b5f9fd0 | 2009-02-11 13:57:25 -0500 | [diff] [blame^] | 5 | #include <linux/tracepoint.h> |
Frederic Weisbecker | 1292211 | 2009-02-07 22:16:12 +0100 | [diff] [blame] | 6 | |
| 7 | enum { |
| 8 | POWER_NONE = 0, |
| 9 | POWER_CSTATE = 1, |
| 10 | POWER_PSTATE = 2, |
| 11 | }; |
| 12 | |
| 13 | struct power_trace { |
| 14 | #ifdef CONFIG_POWER_TRACER |
| 15 | ktime_t stamp; |
| 16 | ktime_t end; |
| 17 | int type; |
| 18 | int state; |
| 19 | #endif |
| 20 | }; |
| 21 | |
Jason Baron | b5f9fd0 | 2009-02-11 13:57:25 -0500 | [diff] [blame^] | 22 | DECLARE_TRACE(power_start, |
| 23 | TPPROTO(struct power_trace *it, unsigned int type, unsigned int state), |
| 24 | TPARGS(it, type, state)); |
| 25 | |
| 26 | DECLARE_TRACE(power_mark, |
| 27 | TPPROTO(struct power_trace *it, unsigned int type, unsigned int state), |
| 28 | TPARGS(it, type, state)); |
| 29 | |
| 30 | DECLARE_TRACE(power_end, |
| 31 | TPPROTO(struct power_trace *it), |
| 32 | TPARGS(it)); |
Frederic Weisbecker | 1292211 | 2009-02-07 22:16:12 +0100 | [diff] [blame] | 33 | |
| 34 | #endif /* _TRACE_POWER_H */ |