Merge branches 'tracing/ftrace' and 'tracing/urgent' into tracing/core
[sfrench/cifs-2.6.git] / include / trace / power.h
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 */