tracing/fastboot: move boot tracer structs and funcs into their own header.
[deliverable/linux.git] / include / trace / boot.h
CommitLineData
3f5ec136
FW
1#ifndef _LINUX_TRACE_BOOT_H
2#define _LINUX_TRACE_BOOT_H
3
4/*
5 * Structure which defines the trace of an initcall.
6 * You don't have to fill the func field since it is
7 * only used internally by the tracer.
8 */
9struct boot_trace {
10 pid_t caller;
11 char func[KSYM_NAME_LEN];
12 int result;
13 unsigned long long duration; /* usecs */
14 ktime_t calltime;
15 ktime_t rettime;
16};
17
18#ifdef CONFIG_BOOT_TRACER
19/* Append the trace on the ring-buffer */
20extern void trace_boot(struct boot_trace *it, initcall_t fn);
21
22/* Tells the tracer that smp_pre_initcall is finished.
23 * So we can start the tracing
24 */
25extern void start_boot_trace(void);
26
27/* Resume the tracing of other necessary events
28 * such as sched switches
29 */
30extern void enable_boot_trace(void);
31
32/* Suspend this tracing. Actually, only sched_switches tracing have
33 * to be suspended. Initcalls doesn't need it.)
34 */
35extern void disable_boot_trace(void);
36#else
37static inline void trace_boot(struct boot_trace *it, initcall_t fn) { }
38static inline void start_boot_trace(void) { }
39static inline void enable_boot_trace(void) { }
40static inline void disable_boot_trace(void) { }
41#endif /* CONFIG_BOOT_TRACER */
42
43#endif /* __LINUX_TRACE_BOOT_H */
This page took 0.034468 seconds and 5 git commands to generate.