From: Mike Frysinger <vapier@gentoo.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/4] Add microsecond boot time measurement
Date: Sat, 14 May 2011 07:19:52 -0400 [thread overview]
Message-ID: <201105140719.53245.vapier@gentoo.org> (raw)
In-Reply-To: <1305319923-9477-2-git-send-email-sjg@chromium.org>
On Friday, May 13, 2011 16:52:00 Simon Glass wrote:
> --- /dev/null
> +++ b/common/bootstage.c
> +/*
> + * Copyright (c) 2011 The Chromium OS Authors.
i'm not sure this is valid unless "Chromium OS Authors" is a legal entity
> +uint32_t bootstage_mark(enum bootstage_id id, const char *name)
> +{
> + struct bootstage_record *rec = &record[id];
> +
> + /* Only record the first event for each */
> + if (!rec->name) {
> + rec->time_us = (uint32_t)timer_get_us();
cast is pointless when time_us is of uint32_t type
> --- /dev/null
> +++ b/include/bootstage.h
> +enum bootstage_id {
> + BOOTSTAGE_AWAKE,
> + BOOTSTAGE_START_UBOOT,
> + BOOTSTAGE_USB_START,
> + BOOTSTAGE_ETH_START,
> + BOOTSTAGE_BOOTP_START,
> + BOOTSTAGE_BOOTP_STOP,
> + BOOTSTAGE_KERNELREAD_START,
> + BOOTSTAGE_KERNELREAD_STOP,
> + BOOTSTAGE_BOOTM_START,
> + BOOTSTAGE_BOOTM_HANDOFF,
> +
> + /* a few spare for the user, from here */
> + BOOTSTAGE_USER,
> +
> + /*
> + * Total number of entries - increase this at the cost of some BSS
> + * and ATAG space.
> + */
> + BOOTSTAGE_COUNT = 10
> +};
mmm BOOTSTAGE_COUNT supposed to be the number of enum's ? hardcoding the
number doesnt seem like a good idea ... how about just placing it at the right
location in the list and let gcc calc the right value ?
> +static inline uint32_t bootstage_mark(enum bootstage_id id, const char
> *name) {}
missing a return value
> --- a/include/common.h
> +++ b/include/common.h
> +#include <bootstage.h>
in general, i'd rather see individual files opt in to the headers they need
rather than having one giant header that includes everything else ...
-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/20110514/062d62c5/attachment.pgp
next prev parent reply other threads:[~2011-05-14 11:19 UTC|newest]
Thread overview: 45+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-13 20:51 [U-Boot] [PATCH 0/4] Accurate boot time measurement Simon Glass
2011-05-13 20:52 ` [U-Boot] [PATCH 1/4] Add microsecond " Simon Glass
2011-05-14 11:19 ` Mike Frysinger [this message]
2011-05-14 11:31 ` Mike Frysinger
2011-05-13 20:52 ` [U-Boot] [PATCH 2/4] Add bootstage progress report Simon Glass
2011-05-14 11:42 ` Mike Frysinger
2011-05-13 20:52 ` [U-Boot] [PATCH 3/4] Add bootstage calls in places appropriate for network booting Simon Glass
2011-05-14 11:44 ` Mike Frysinger
2011-05-13 20:52 ` [U-Boot] [PATCH 4/4] Add option to print boot stage report before starting kernel Simon Glass
2011-05-14 11:46 ` Mike Frysinger
2011-05-14 11:34 ` [U-Boot] [PATCH 0/4] Accurate boot time measurement Mike Frysinger
2011-05-14 17:32 ` Simon Glass
2011-05-15 10:03 ` Graeme Russ
2011-05-15 21:34 ` Simon Glass
2011-05-15 22:56 ` Graeme Russ
2011-05-16 5:56 ` Wolfgang Denk
2011-05-16 6:10 ` Graeme Russ
2011-05-15 11:53 ` Wolfgang Denk
2011-05-15 21:58 ` Simon Glass
2011-05-15 22:36 ` Graeme Russ
2011-05-16 5:55 ` Wolfgang Denk
2011-05-16 6:11 ` Graeme Russ
2011-05-16 11:18 ` Wolfgang Denk
2011-05-16 2:59 ` Mike Frysinger
2011-05-16 5:48 ` Wolfgang Denk
2011-05-16 6:23 ` Graeme Russ
2011-05-16 11:40 ` Wolfgang Denk
2011-05-16 18:25 ` Scott Wood
2011-05-16 23:09 ` Graeme Russ
2011-05-16 14:23 ` Premi, Sanjeev
2011-05-16 16:00 ` Simon Glass
2011-05-16 18:32 ` Wolfgang Denk
2011-05-16 21:35 ` Simon Glass
2011-05-17 8:20 ` Detlev Zundel
2011-05-17 17:00 ` Simon Glass
2011-05-17 22:57 ` Graeme Russ
2011-05-19 8:36 ` Detlev Zundel
2011-05-20 1:48 ` Simon Glass
2011-05-20 2:28 ` Graeme Russ
2011-05-20 2:29 ` Graeme Russ
2011-05-23 15:22 ` Detlev Zundel
2011-05-24 2:55 ` Mike Frysinger
2011-05-24 7:18 ` Wolfgang Denk
2011-05-24 18:22 ` Mike Frysinger
2011-05-24 19:24 ` Wolfgang Denk
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=201105140719.53245.vapier@gentoo.org \
--to=vapier@gentoo.org \
--cc=u-boot@lists.denx.de \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox