From: tim.bird@am.sony.com (Tim Bird)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC PATCH 0/3] Add accurate boot timing to a Linux system
Date: Tue, 27 Sep 2011 10:56:29 -0700 [thread overview]
Message-ID: <4E820E4D.5050205@am.sony.com> (raw)
In-Reply-To: <1316818998-30711-1-git-send-email-sjg@chromium.org>
On 09/23/2011 04:03 PM, Simon Glass wrote:
> This experimental patch set adds boot timing to a Linux system. The
> timing starts with the boot loader and extends through the kernel into
> user space to the completion of the boot process. The timing starts when
> the system leaves reset, not later when the kernel starts.
I would be very interested in this. This is something that
would be very helpful, I believe, to assist with optimizing
overall boot time.
> Finally, in user space there is no kernel-blessed way to record
> timestamps. One approach is to add lines to the init scripts like
> 'cat /proc/uptime >/tmp/login_starts'.
> This creates another place where
> the boot timing tool must look for information.
'cat /proc/uptime >/dev/kmsg' (with printk timestamps on) is much
better than the above, for this reason.
> This Patchset
> -------------
> This patchset aims to unify timing in one place: a simple driver which
> collects pre-kernel boot timestamps, adds its own as it boots, with
> calls to bootstage_mark(), then allows user space (init, etc.) to add
> more with 'echo "message" >>/sys/kernel/debug/bootstage/mask'.
>
> Finally it permits user space to access the full list of timestamps
> with 'cat /sys/kernel/debug/bootstage/report', which has two columns:
> the stage name and the timestamp:
>
> reset 0
> arch_cpu_init-AVP 258902
> arch_cpu_init-A9 263267
> arch_cpu_init-done 263312
> board_init_f-start 263314
> board_init_r-start 323671
> main_loop 573008
...
I would prefer the timestamp in the first column. Also, for consistency
it would be good if it used the same format as printk timestamps:
"[%5lu.%06lu]" with seconds and micro-seconds in the respective fields.
Then, existing tools like scripts/show_delta and scripts/bootgraph.pl
could work on this data as well.
Full micro-second granularity is not required, but it's nice to keep
the format the same, whether the clock supports it or not.
Finally, is this work related at all to this:
http://lists.denx.de/pipermail/u-boot/2011-September/099996.html
Bootgraph.pl instrumentation support for UBoot
??
Just wondering.
Thanks - this looks like great stuff!
-- Tim
=============================
Tim Bird
Architecture Group Chair, CE Workgroup of the Linux Foundation
Senior Staff Engineer, Sony Network Entertainment
=============================
WARNING: multiple messages have this Message-ID (diff)
From: Tim Bird <tim.bird@am.sony.com>
To: Simon Glass <sjg@chromium.org>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>
Subject: Re: [RFC PATCH 0/3] Add accurate boot timing to a Linux system
Date: Tue, 27 Sep 2011 10:56:29 -0700 [thread overview]
Message-ID: <4E820E4D.5050205@am.sony.com> (raw)
In-Reply-To: <1316818998-30711-1-git-send-email-sjg@chromium.org>
On 09/23/2011 04:03 PM, Simon Glass wrote:
> This experimental patch set adds boot timing to a Linux system. The
> timing starts with the boot loader and extends through the kernel into
> user space to the completion of the boot process. The timing starts when
> the system leaves reset, not later when the kernel starts.
I would be very interested in this. This is something that
would be very helpful, I believe, to assist with optimizing
overall boot time.
> Finally, in user space there is no kernel-blessed way to record
> timestamps. One approach is to add lines to the init scripts like
> 'cat /proc/uptime >/tmp/login_starts'.
> This creates another place where
> the boot timing tool must look for information.
'cat /proc/uptime >/dev/kmsg' (with printk timestamps on) is much
better than the above, for this reason.
> This Patchset
> -------------
> This patchset aims to unify timing in one place: a simple driver which
> collects pre-kernel boot timestamps, adds its own as it boots, with
> calls to bootstage_mark(), then allows user space (init, etc.) to add
> more with 'echo "message" >>/sys/kernel/debug/bootstage/mask'.
>
> Finally it permits user space to access the full list of timestamps
> with 'cat /sys/kernel/debug/bootstage/report', which has two columns:
> the stage name and the timestamp:
>
> reset 0
> arch_cpu_init-AVP 258902
> arch_cpu_init-A9 263267
> arch_cpu_init-done 263312
> board_init_f-start 263314
> board_init_r-start 323671
> main_loop 573008
...
I would prefer the timestamp in the first column. Also, for consistency
it would be good if it used the same format as printk timestamps:
"[%5lu.%06lu]" with seconds and micro-seconds in the respective fields.
Then, existing tools like scripts/show_delta and scripts/bootgraph.pl
could work on this data as well.
Full micro-second granularity is not required, but it's nice to keep
the format the same, whether the clock supports it or not.
Finally, is this work related at all to this:
http://lists.denx.de/pipermail/u-boot/2011-September/099996.html
Bootgraph.pl instrumentation support for UBoot
??
Just wondering.
Thanks - this looks like great stuff!
-- Tim
=============================
Tim Bird
Architecture Group Chair, CE Workgroup of the Linux Foundation
Senior Staff Engineer, Sony Network Entertainment
=============================
next prev parent reply other threads:[~2011-09-27 17:56 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-23 23:03 [RFC PATCH 0/3] Add accurate boot timing to a Linux system Simon Glass
2011-09-23 23:03 ` Simon Glass
2011-09-23 23:03 ` [RFC PATCH 1/3] bootstage: Add bootstages to record timing in the kernel Simon Glass
2011-09-23 23:03 ` Simon Glass
2011-09-23 23:03 ` [RFC PATCH 2/3] bootstage: Insert bootstage_mark to record timing for bootup Simon Glass
2011-09-23 23:03 ` Simon Glass
2011-09-25 12:59 ` Bjorn Helgaas
2011-09-25 12:59 ` Bjorn Helgaas
2011-09-23 23:03 ` [RFC PATCH 3/3] bootstage: Get u-boot timing from the device tree Simon Glass
2011-09-23 23:03 ` Simon Glass
2011-09-23 23:34 ` [RFC PATCH 0/3] Add accurate boot timing to a Linux system Valdis.Kletnieks at vt.edu
2011-09-23 23:34 ` Valdis.Kletnieks
2011-09-24 4:10 ` Simon Glass
2011-09-24 4:10 ` Simon Glass
2011-09-24 8:32 ` Russell King - ARM Linux
2011-09-24 8:32 ` Russell King - ARM Linux
2011-09-24 14:06 ` Simon Glass
2011-09-24 14:06 ` Simon Glass
2011-09-26 7:53 ` Matthieu CASTET
2011-09-26 7:53 ` Matthieu CASTET
2011-09-27 18:29 ` Simon Glass
2011-09-27 18:29 ` Simon Glass
2011-09-25 12:54 ` Bjorn Helgaas
2011-09-25 12:54 ` Bjorn Helgaas
2011-09-27 18:26 ` Simon Glass
2011-09-27 18:26 ` Simon Glass
2011-09-27 17:56 ` Tim Bird [this message]
2011-09-27 17:56 ` Tim Bird
2011-09-27 17:57 ` Tim Bird
2011-09-27 17:57 ` Tim Bird
2011-09-27 18:42 ` Simon Glass
2011-09-27 18:42 ` Simon Glass
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4E820E4D.5050205@am.sony.com \
--to=tim.bird@am.sony.com \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.