From: Arnout Vandecappelle <arnout@mind.be>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 1/2] package: instrument to gather timing data
Date: Tue, 11 Oct 2011 07:59:22 +0200 [thread overview]
Message-ID: <201110110759.23066.arnout@mind.be> (raw)
In-Reply-To: <0cbf021419332c37bd77e661c97cfc881329f1bb.1318176666.git.thomas.petazzoni@free-electrons.com>
On Sunday 09 October 2011 18:17:27, Thomas Petazzoni wrote:
> Instrument the package infrastructure to generate a
> $(O)/build-time.data file which contains one line for each step of
> each package and the corresponding duration in milliseconds.
>
> The instrumentation is not perfect yet, as it doesn't account for
> packages with overriden source directory
Why is that relevant? The output goes to $(O) anyway. But this makes me
think: wouldn't it be better to
> and the build-time.data is
> never removed, so results will accumulate if several partial builds
> are done.
I would call that a feature :-) Partial builds typically mean that you're
hacking away at some package, and then it's very relevant to see the impact on
build time.
Of course, there would need to be a target buildtime-clean that removes the
files.
>
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> ---
> package/Makefile.package.in | 28 ++++++++++++++++++++++++++++
> 1 files changed, 28 insertions(+), 0 deletions(-)
>
> diff --git a/package/Makefile.package.in b/package/Makefile.package.in
> index b5ef57b..605b518 100644
> --- a/package/Makefile.package.in
> +++ b/package/Makefile.package.in
> @@ -254,6 +254,18 @@ define sep
>
> endef
>
> +define savetime
> + echo $$(($$(date +%s%N)/1000000)) > $(O)/.br.time
> +endef
> +
> +define outputtime
> + newtime=`echo $$(($$(date +%s%N)/1000000))` ; \
> + oldtime=`cat $(O)/.br.time` ; \
> + rm -f .br.time ; \
> + timediff=$$(($$newtime-$$oldtime)) ; \
> + echo "$(1),$(2),$$timediff" >> $(O)/build-time.data
Is there a particular reason to use a make function parameter in a place like
this instead of using $($(PKG)_NAME) directly? I've seen this in other places
in buildroot as well...
[snip]
Regards,
Arnout
--
Arnout Vandecappelle arnout at mind be
Senior Embedded Software Architect +32-16-286540
Essensium/Mind http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint: 31BB CF53 8660 6F88 345D 54CC A836 5879 20D7 CF43
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20111011/018079a2/attachment-0001.html>
next prev parent reply other threads:[~2011-10-11 5:59 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-09 16:17 [Buildroot] [RFC] Build time graph generation Thomas Petazzoni
2011-10-09 16:17 ` [Buildroot] [PATCH 1/2] package: instrument to gather timing data Thomas Petazzoni
2011-10-10 13:41 ` Thomas De Schampheleire
2011-10-11 5:59 ` Arnout Vandecappelle
2011-10-11 5:59 ` Arnout Vandecappelle [this message]
2011-10-11 7:34 ` Thomas Petazzoni
2011-10-11 8:29 ` Thomas De Schampheleire
2011-10-11 16:12 ` Arnout Vandecappelle
2011-10-11 18:17 ` Thomas Petazzoni
2011-10-09 16:17 ` [Buildroot] [PATCH 2/2] graph-build-time: generate graphs based on " Thomas Petazzoni
2011-10-10 13:12 ` Thomas De Schampheleire
2011-10-10 9:32 ` [Buildroot] [RFC] Build time graph generation Diego Iastrubni
2011-10-10 13:55 ` Thomas De Schampheleire
2011-10-10 14:20 ` Thomas Petazzoni
2011-10-10 15:19 ` Thomas De Schampheleire
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=201110110759.23066.arnout@mind.be \
--to=arnout@mind.be \
--cc=buildroot@busybox.net \
/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.