diff options
Diffstat (limited to 'include/linux/ftrace.h')
-rw-r--r-- | include/linux/ftrace.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/include/linux/ftrace.h b/include/linux/ftrace.h index f9792c0d73f6..afba918c623c 100644 --- a/include/linux/ftrace.h +++ b/include/linux/ftrace.h | |||
@@ -316,6 +316,35 @@ ftrace_init_module(struct module *mod, | |||
316 | unsigned long *start, unsigned long *end) { } | 316 | unsigned long *start, unsigned long *end) { } |
317 | #endif | 317 | #endif |
318 | 318 | ||
319 | enum { | ||
320 | POWER_NONE = 0, | ||
321 | POWER_CSTATE = 1, | ||
322 | POWER_PSTATE = 2, | ||
323 | }; | ||
324 | |||
325 | struct power_trace { | ||
326 | #ifdef CONFIG_POWER_TRACER | ||
327 | ktime_t stamp; | ||
328 | ktime_t end; | ||
329 | int type; | ||
330 | int state; | ||
331 | #endif | ||
332 | }; | ||
333 | |||
334 | #ifdef CONFIG_POWER_TRACER | ||
335 | extern void trace_power_start(struct power_trace *it, unsigned int type, | ||
336 | unsigned int state); | ||
337 | extern void trace_power_mark(struct power_trace *it, unsigned int type, | ||
338 | unsigned int state); | ||
339 | extern void trace_power_end(struct power_trace *it); | ||
340 | #else | ||
341 | static inline void trace_power_start(struct power_trace *it, unsigned int type, | ||
342 | unsigned int state) { } | ||
343 | static inline void trace_power_mark(struct power_trace *it, unsigned int type, | ||
344 | unsigned int state) { } | ||
345 | static inline void trace_power_end(struct power_trace *it) { } | ||
346 | #endif | ||
347 | |||
319 | 348 | ||
320 | /* | 349 | /* |
321 | * Structure that defines an entry function trace. | 350 | * Structure that defines an entry function trace. |