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