aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/ftrace.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/ftrace.h')
-rw-r--r--include/linux/ftrace.h29
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
319enum {
320 POWER_NONE = 0,
321 POWER_CSTATE = 1,
322 POWER_PSTATE = 2,
323};
324
325struct 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
335extern void trace_power_start(struct power_trace *it, unsigned int type,
336 unsigned int state);
337extern void trace_power_mark(struct power_trace *it, unsigned int type,
338 unsigned int state);
339extern void trace_power_end(struct power_trace *it);
340#else
341static inline void trace_power_start(struct power_trace *it, unsigned int type,
342 unsigned int state) { }
343static inline void trace_power_mark(struct power_trace *it, unsigned int type,
344 unsigned int state) { }
345static 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.