aboutsummaryrefslogtreecommitdiffstats
path: root/include/trace
diff options
context:
space:
mode:
Diffstat (limited to 'include/trace')
-rw-r--r--include/trace/boot.h43
1 files changed, 43 insertions, 0 deletions
diff --git a/include/trace/boot.h b/include/trace/boot.h
new file mode 100644
index 000000000000..4cbe64e46cdc
--- /dev/null
+++ b/include/trace/boot.h
@@ -0,0 +1,43 @@
1#ifndef _LINUX_TRACE_BOOT_H
2#define _LINUX_TRACE_BOOT_H
3
4/*
5 * Structure which defines the trace of an initcall.
6 * You don't have to fill the func field since it is
7 * only used internally by the tracer.
8 */
9struct boot_trace {
10 pid_t caller;
11 char func[KSYM_NAME_LEN];
12 int result;
13 unsigned long long duration; /* usecs */
14 ktime_t calltime;
15 ktime_t rettime;
16};
17
18#ifdef CONFIG_BOOT_TRACER
19/* Append the trace on the ring-buffer */
20extern void trace_boot(struct boot_trace *it, initcall_t fn);
21
22/* Tells the tracer that smp_pre_initcall is finished.
23 * So we can start the tracing
24 */
25extern void start_boot_trace(void);
26
27/* Resume the tracing of other necessary events
28 * such as sched switches
29 */
30extern void enable_boot_trace(void);
31
32/* Suspend this tracing. Actually, only sched_switches tracing have
33 * to be suspended. Initcalls doesn't need it.)
34 */
35extern void disable_boot_trace(void);
36#else
37static inline void trace_boot(struct boot_trace *it, initcall_t fn) { }
38static inline void start_boot_trace(void) { }
39static inline void enable_boot_trace(void) { }
40static inline void disable_boot_trace(void) { }
41#endif /* CONFIG_BOOT_TRACER */
42
43#endif /* __LINUX_TRACE_BOOT_H */