aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/linux/ftrace.h30
-rw-r--r--include/trace/power.h35
2 files changed, 35 insertions, 30 deletions
diff --git a/include/linux/ftrace.h b/include/linux/ftrace.h
index 5e302d636fc2..106b7909d500 100644
--- a/include/linux/ftrace.h
+++ b/include/linux/ftrace.h
@@ -339,36 +339,6 @@ ftrace_init_module(struct module *mod,
339 unsigned long *start, unsigned long *end) { } 339 unsigned long *start, unsigned long *end) { }
340#endif 340#endif
341 341
342enum {
343 POWER_NONE = 0,
344 POWER_CSTATE = 1,
345 POWER_PSTATE = 2,
346};
347
348struct power_trace {
349#ifdef CONFIG_POWER_TRACER
350 ktime_t stamp;
351 ktime_t end;
352 int type;
353 int state;
354#endif
355};
356
357#ifdef CONFIG_POWER_TRACER
358extern void trace_power_start(struct power_trace *it, unsigned int type,
359 unsigned int state);
360extern void trace_power_mark(struct power_trace *it, unsigned int type,
361 unsigned int state);
362extern void trace_power_end(struct power_trace *it);
363#else
364static inline void trace_power_start(struct power_trace *it, unsigned int type,
365 unsigned int state) { }
366static inline void trace_power_mark(struct power_trace *it, unsigned int type,
367 unsigned int state) { }
368static inline void trace_power_end(struct power_trace *it) { }
369#endif
370
371
372/* 342/*
373 * Structure that defines an entry function trace. 343 * Structure that defines an entry function trace.
374 */ 344 */
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
6enum {
7 POWER_NONE = 0,
8 POWER_CSTATE = 1,
9 POWER_PSTATE = 2,
10};
11
12struct 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
22extern void trace_power_start(struct power_trace *it, unsigned int type,
23 unsigned int state);
24extern void trace_power_mark(struct power_trace *it, unsigned int type,
25 unsigned int state);
26extern void trace_power_end(struct power_trace *it);
27#else
28static inline void trace_power_start(struct power_trace *it, unsigned int type,
29 unsigned int state) { }
30static inline void trace_power_mark(struct power_trace *it, unsigned int type,
31 unsigned int state) { }
32static inline void trace_power_end(struct power_trace *it) { }
33#endif
34
35#endif /* _TRACE_POWER_H */