Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 1/2] package: instrument to gather timing data
Date: Tue, 11 Oct 2011 09:34:12 +0200	[thread overview]
Message-ID: <20111011093412.06546b5a@skate> (raw)
In-Reply-To: <201110110759.23066.arnout@mind.be>

Le Tue, 11 Oct 2011 07:59:22 +0200,
Arnout Vandecappelle <arnout@mind.be> a ?crit :

> 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?

With an overidden source directory, the step of steps are different:
instead of download, extract, patch, configure, etc., it's rsync,
configure, etc.

>  The output goes to $(O) anyway.  But this makes me 
> think: wouldn't it be better to 

To ? :-)

>  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.

Ok.

>  Of course, there would need to be a target buildtime-clean that removes the 
> files.

Why not, yes.

> > +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...

No, I guess I could use $($(PKG)_NAME) directly.

Regards,

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

  reply	other threads:[~2011-10-11  7:34 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
2011-10-11  7:34     ` Thomas Petazzoni [this message]
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=20111011093412.06546b5a@skate \
    --to=thomas.petazzoni@free-electrons.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox