aboutsummaryrefslogtreecommitdiffstats
path: root/include/trace/boot.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/trace/boot.h')
-rw-r--r--include/trace/boot.h31
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 */
9struct boot_trace { 10struct 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 */
19struct 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 */
20extern void trace_boot(struct boot_trace *it, initcall_t fn); 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);
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 */
35extern void disable_boot_trace(void); 43extern void disable_boot_trace(void);
36#else 44#else
37static inline void trace_boot(struct boot_trace *it, initcall_t fn) { } 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
38static inline void start_boot_trace(void) { } 51static inline void start_boot_trace(void) { }
39static inline void enable_boot_trace(void) { } 52static inline void enable_boot_trace(void) { }
40static inline void disable_boot_trace(void) { } 53static inline void disable_boot_trace(void) { }