[RFC PATCH 1/3] bootstage: Add bootstages to record timing in the kernel.

Date

Fri, 23 Sep 2011 16:03:16 -0700

From: Da Zheng <zhengda@chromium.org>

From: Da Zheng <zhengda@chromium.org>

We can record timing in the kernel by invoking bootstage_mark() orbootstage_mark_early for early stages before memory and timekeepingare initialized. It also uses debugfs to interact with the user space.

source "kernel/Kconfig.locks"++config BOOTSTAGE+ bool "Enable timing of boot stages"+ help+ This enables to record the timing of different stages during boot.+ The timing in the kernel can be recorded by invoking bootstage_mark().+ The timing in the user space can be recorded by writing the stage name+ to /sys/kernel/debug/bootstage/mark. A report of information collected+ to date is available from /sys/kernel/debug/bootstage/report.diff --git a/init/Makefile b/init/Makefileindex 0bf677a..7bfc047 100644--- a/init/Makefile+++ b/init/Makefile@@ -8,6 +8,7 @@ obj-y += noinitramfs.o else obj-$(CONFIG_BLK_DEV_INITRD) += initramfs.o endif+obj-$(CONFIG_BOOTSTAGE) += bootstage.o obj-$(CONFIG_GENERIC_CALIBRATE_DELAY) += calibrate.o