diff options
Diffstat (limited to 'include/trace/boot.h')
-rw-r--r-- | include/trace/boot.h | 31 |
1 files changed, 22 insertions, 9 deletions
diff --git a/include/trace/boot.h b/include/trace/boot.h index 4cbe64e46cdc..6b54537eab02 100644 --- a/include/trace/boot.h +++ b/include/trace/boot.h | |||
@@ -2,22 +2,30 @@ | |||
2 | #define _LINUX_TRACE_BOOT_H | 2 | #define _LINUX_TRACE_BOOT_H |
3 | 3 | ||
4 | /* | 4 | /* |
5 | * Structure which defines the trace of an initcall. | 5 | * Structure which defines the trace of an initcall |
6 | * while it is called. | ||
6 | * You don't have to fill the func field since it is | 7 | * You don't have to fill the func field since it is |
7 | * only used internally by the tracer. | 8 | * only used internally by the tracer. |
8 | */ | 9 | */ |
9 | struct boot_trace { | 10 | struct boot_trace_call { |
10 | pid_t caller; | 11 | pid_t caller; |
11 | char func[KSYM_NAME_LEN]; | 12 | char func[KSYM_NAME_LEN]; |
12 | int result; | 13 | }; |
13 | unsigned long long duration; /* usecs */ | 14 | |
14 | ktime_t calltime; | 15 | /* |
15 | ktime_t rettime; | 16 | * Structure which defines the trace of an initcall |
17 | * while it returns. | ||
18 | */ | ||
19 | struct boot_trace_ret { | ||
20 | char func[KSYM_NAME_LEN]; | ||
21 | int result; | ||
22 | unsigned long long duration; /* nsecs */ | ||
16 | }; | 23 | }; |
17 | 24 | ||
18 | #ifdef CONFIG_BOOT_TRACER | 25 | #ifdef CONFIG_BOOT_TRACER |
19 | /* Append the trace on the ring-buffer */ | 26 | /* Append the traces on the ring-buffer */ |
20 | extern void trace_boot(struct boot_trace *it, initcall_t fn); | 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); | ||
21 | 29 | ||
22 | /* Tells the tracer that smp_pre_initcall is finished. | 30 | /* Tells the tracer that smp_pre_initcall is finished. |
23 | * So we can start the tracing | 31 | * So we can start the tracing |
@@ -34,7 +42,12 @@ extern void enable_boot_trace(void); | |||
34 | */ | 42 | */ |
35 | extern void disable_boot_trace(void); | 43 | extern void disable_boot_trace(void); |
36 | #else | 44 | #else |
37 | static inline void trace_boot(struct boot_trace *it, initcall_t fn) { } | 45 | static inline |
46 | void trace_boot_call(struct boot_trace_call *bt, initcall_t fn) { } | ||
47 | |||
48 | static inline | ||
49 | void trace_boot_ret(struct boot_trace_ret *bt, initcall_t fn) { } | ||
50 | |||
38 | static inline void start_boot_trace(void) { } | 51 | static inline void start_boot_trace(void) { } |
39 | static inline void enable_boot_trace(void) { } | 52 | static inline void enable_boot_trace(void) { } |
40 | static inline void disable_boot_trace(void) { } | 53 | static inline void disable_boot_trace(void) { } |