aboutsummaryrefslogtreecommitdiffstats
path: root/include/trace
diff options
context:
space:
mode:
authorFrederic Weisbecker <fweisbec@gmail.com>2008-11-11 17:21:31 -0500
committerIngo Molnar <mingo@elte.hu>2008-11-12 04:17:18 -0500
commit3f5ec13696fd4a33bde42f385406cbb1d3cc96fd (patch)
tree3c705c5991fcf0f4968ff790bb2e2ce65c8cbf18 /include/trace
parent60a011c736e7dd09a0b01ca6a051a416f3f52ffb (diff)
tracing/fastboot: move boot tracer structs and funcs into their own header.
Impact: Cleanups on the boot tracer and ftrace This patch bring some cleanups about the boot tracer headers. The functions and structures of this tracer have nothing related to ftrace and should have so their own header file. Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com> Acked-by: Steven Rostedt <rostedt@goodmis.org> Signed-off-by: Ingo Molnar <mingo@elte.hu>
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 */