blob: 2c733e58e89cca26e1ec27b0da7c5264bfccfeb0 [file] [log] [blame]
Frederic Weisbecker12922112009-02-07 22:16:12 +01001#ifndef _TRACE_POWER_H
2#define _TRACE_POWER_H
3
4#include <linux/ktime.h>
Jason Baronb5f9fd02009-02-11 13:57:25 -05005#include <linux/tracepoint.h>
Frederic Weisbecker12922112009-02-07 22:16:12 +01006
7enum {
8 POWER_NONE = 0,
9 POWER_CSTATE = 1,
10 POWER_PSTATE = 2,
11};
12
13struct 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 Baronb5f9fd02009-02-11 13:57:25 -050022DECLARE_TRACE(power_start,
23 TPPROTO(struct power_trace *it, unsigned int type, unsigned int state),
24 TPARGS(it, type, state));
25
26DECLARE_TRACE(power_mark,
27 TPPROTO(struct power_trace *it, unsigned int type, unsigned int state),
28 TPARGS(it, type, state));
29
30DECLARE_TRACE(power_end,
31 TPPROTO(struct power_trace *it),
32 TPARGS(it));
Frederic Weisbecker12922112009-02-07 22:16:12 +010033
34#endif /* _TRACE_POWER_H */