aboutsummaryrefslogtreecommitdiffstats
path: root/include/trace/power.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/trace/power.h')
-rw-r--r--include/trace/power.h34
1 files changed, 34 insertions, 0 deletions
diff --git a/include/trace/power.h b/include/trace/power.h
new file mode 100644
index 000000000000..2c733e58e89c
--- /dev/null
+++ b/include/trace/power.h
@@ -0,0 +1,34 @@
1#ifndef _TRACE_POWER_H
2#define _TRACE_POWER_H
3
4#include <linux/ktime.h>
5#include <linux/tracepoint.h>
6
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
22DECLARE_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));
33
34#endif /* _TRACE_POWER_H */