1 #ifndef _LINUX_TRACE_BOOT_H
2 #define _LINUX_TRACE_BOOT_H
5 * Structure which defines the trace of an initcall
7 * You don't have to fill the func field since it is
8 * only used internally by the tracer.
10 struct boot_trace_call {
12 char func[KSYM_NAME_LEN];
16 * Structure which defines the trace of an initcall
19 struct boot_trace_ret {
20 char func[KSYM_NAME_LEN];
22 unsigned long long duration; /* nsecs */
25 #ifdef CONFIG_BOOT_TRACER
26 /* Append the traces on the ring-buffer */
27 extern void trace_boot_call(struct boot_trace_call *bt, initcall_t fn);
28 extern void trace_boot_ret(struct boot_trace_ret *bt, initcall_t fn);
30 /* Tells the tracer that smp_pre_initcall is finished.
31 * So we can start the tracing
33 extern void start_boot_trace(void);
35 /* Resume the tracing of other necessary events
36 * such as sched switches
38 extern void enable_boot_trace(void);
40 /* Suspend this tracing. Actually, only sched_switches tracing have
41 * to be suspended. Initcalls doesn't need it.)
43 extern void disable_boot_trace(void);
46 void trace_boot_call(struct boot_trace_call *bt, initcall_t fn) { }
49 void trace_boot_ret(struct boot_trace_ret *bt, initcall_t fn) { }
51 static inline void start_boot_trace(void) { }
52 static inline void enable_boot_trace(void) { }
53 static inline void disable_boot_trace(void) { }
54 #endif /* CONFIG_BOOT_TRACER */
56 #endif /* __LINUX_TRACE_BOOT_H */