summaryrefslogtreecommitdiff
path: root/include/linux/ftrace.h
diff options
context:
space:
mode:
authorFrédéric Weisbecker <fweisbec@gmail.com>2008-09-23 10:32:08 (GMT)
committerIngo Molnar <mingo@elte.hu>2008-10-14 08:38:47 (GMT)
commitd13744cd6e3fef373a3fe656ac349b4e7c49ff79 (patch)
tree7315ec5390bd4977ecf5d0b25d7ec5cf0440236a /include/linux/ftrace.h
parentaa5d9151f745b6ee6a236a1f109118034277eb92 (diff)
downloadlinux-fsl-qoriq-d13744cd6e3fef373a3fe656ac349b4e7c49ff79.tar.xz
tracing/ftrace: add the boot tracer
Add the boot/initcall tracer. It's primary purpose is to be able to trace the initcalls. It is intended to be used with scripts/bootgraph.pl after some small improvements. Note that it is not active after its init. To avoid tracing (and so crashing) before the whole tracing engine init, you have to explicitly call start_boot_trace() after do_pre_smp_initcalls() to enable it. Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include/linux/ftrace.h')
-rw-r--r--include/linux/ftrace.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/include/linux/ftrace.h b/include/linux/ftrace.h
index 5de9903..91954eb 100644
--- a/include/linux/ftrace.h
+++ b/include/linux/ftrace.h
@@ -5,6 +5,8 @@
#include <linux/linkage.h>
#include <linux/fs.h>
+#include <linux/init.h>
+#include <linux/types.h>
extern int ftrace_enabled;
extern int
@@ -209,4 +211,21 @@ ftrace_init_module(unsigned long *start, unsigned long *end) { }
#endif
+struct boot_trace {
+ pid_t caller;
+ initcall_t func;
+ int result;
+ unsigned long long duration;
+};
+
+#ifdef CONFIG_BOOT_TRACER
+extern void trace_boot(struct boot_trace *it);
+extern void start_boot_trace(void);
+#else
+static inline void trace_boot(struct boot_trace *it) { }
+static inline void start_boot_trace(void) { }
+#endif
+
+
+
#endif /* _LINUX_FTRACE_H */