]> bbs.cooldavid.org Git - net-next-2.6.git/blame - include/trace/boot.h
tracing/fastboot: Use the ring-buffer timestamp for initcall entries
[net-next-2.6.git] / include / trace / boot.h
CommitLineData
3f5ec136
FW
1#ifndef _LINUX_TRACE_BOOT_H
2#define _LINUX_TRACE_BOOT_H
3
4/*
74239072
FW
5 * Structure which defines the trace of an initcall
6 * while it is called.
3f5ec136
FW
7 * You don't have to fill the func field since it is
8 * only used internally by the tracer.
9 */
74239072 10struct boot_trace_call {
3f5ec136
FW
11 pid_t caller;
12 char func[KSYM_NAME_LEN];
74239072
FW
13};
14
15/*
16 * Structure which defines the trace of an initcall
17 * while it returns.
18 */
19struct boot_trace_ret {
20 char func[KSYM_NAME_LEN];
21 int result;
22 unsigned long long duration; /* nsecs */
3f5ec136
FW
23};
24
25#ifdef CONFIG_BOOT_TRACER
74239072
FW
26/* Append the traces on the ring-buffer */
27extern void trace_boot_call(struct boot_trace_call *bt, initcall_t fn);
28extern void trace_boot_ret(struct boot_trace_ret *bt, initcall_t fn);
3f5ec136
FW
29
30/* Tells the tracer that smp_pre_initcall is finished.
31 * So we can start the tracing
32 */
33extern void start_boot_trace(void);
34
35/* Resume the tracing of other necessary events
36 * such as sched switches
37 */
38extern void enable_boot_trace(void);
39
40/* Suspend this tracing. Actually, only sched_switches tracing have
41 * to be suspended. Initcalls doesn't need it.)
42 */
43extern void disable_boot_trace(void);
44#else
74239072
FW
45static inline
46void trace_boot_call(struct boot_trace_call *bt, initcall_t fn) { }
47
48static inline
49void trace_boot_ret(struct boot_trace_ret *bt, initcall_t fn) { }
50
3f5ec136
FW
51static inline void start_boot_trace(void) { }
52static inline void enable_boot_trace(void) { }
53static inline void disable_boot_trace(void) { }
54#endif /* CONFIG_BOOT_TRACER */
55
56#endif /* __LINUX_TRACE_BOOT_H */