[U-Boot] [RFC PATCH v2 13/15] bootstage: Add microsecond boot time measurement

Mike Frysinger vapier at gentoo.org
Sun Jan 8 09:35:31 CET 2012


On Saturday 10 December 2011 16:08:05 Simon Glass wrote:
> This defines the basics of a new boot time measurement feature. This allows
> logging of very accurate time measurements as the boot proceeds, by using
> an available microsecond counter.
> 
> To enable the feature, define CONFIG_BOOTSTAGE in your board config file.
> Also available is CONFIG_BOOTSTAGE_REPORT which will cause a report to be
> printed just before handing off to the OS.

the summary says "Add microsecond boot time measurement".  that sounds like 
extending existing functionality.  in reality, this is the core of the new 
CONFIG_BOOTSTAGE logic right ?

also, this logging framework seems to overlap the existing POST logging 
framework functionality ...

> --- a/include/bootstage.h
> +++ b/include/bootstage.h
>
> +static inline ulong bootstage_mark(enum bootstage_id id)
>  {
> -	show_boot_progress(-val);
> +#ifdef CONFIG_SHOW_BOOT_PROGRESS
> +	show_boot_progress(id);
> +#endif
> +	return 0;
>  }
> 
> +static inline ulong bootstage_error(enum bootstage_id id)
> +{
> +#ifdef CONFIG_SHOW_BOOT_PROGRESS
> +	show_boot_progress(-id);
> +#endif
> +	return 0;
> +}

why isn't show_boot_progress() just a stub when CONFIG_SHOW_BOOT_PROGRESS 
isn't defined ?  then you don't have to protect the call sites.

> +static inline ulong bootstage_mark_name(enum bootstage_id id, const char
> *name)
> +{ return 0; }

please unroll this
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20120108/d2a99901/attachment.pgp>


More information about the U-Boot mailing list