Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Jason Wessel <jason.wessel@windriver.com>
To: Marko Lindqvist <cazfi74@gmail.com>
Cc: Patches and discussions about the oe-core layer
	<openembedded-core@lists.openembedded.org>
Subject: Re: [PATCH 0/2] bitbake.conf: gracefully work with ccache environment variables
Date: Mon, 14 May 2012 17:24:24 -0500	[thread overview]
Message-ID: <4FB18618.60604@windriver.com> (raw)
In-Reply-To: <CAF6bG8dfHW9S4onZTEeWqHFT_sqpbpjJTSYZpOXZA+BsKQOq3Q@mail.gmail.com>

On 05/14/2012 05:00 PM, Marko Lindqvist wrote:
> As you can see from my answer to last part I quote, I'm not against
> your patch, so don't read first parts of this email with that mindset.
> They are more generic discussion about ccache caches.


No worries.

> 
> On 14 May 2012 23:58, Jason Wessel <jason.wessel@windriver.com> wrote:
>>
>> This is only an issue if the compiler has changed.  In my case it is
>> not changing, or at least it should be the same each time.
> 
>  Several years back ccache detected if compiler is the same by binary
> size and timestamp, so compiler rebuild (with new timestamp) resulted
> contents of the cache getting invalidated. They talked about changing
> it to check md5sum of the compiler binary instead, but I haven't
> followed if that's implemented already.


I am not exactly sure if ccache is invaliding based on the compiler or
not.  It is entirely possible the cache is completely invalid for that
case.  For my local use case this is not an issue because the compiler
is _always_ use the same pre-built version.

A modern ccache does have some extra configuration for doing "wild"
things like relative locations (from ccache docs see CCACHE_BASEDIR)
where you can literally share the cache across multiple build
directories.  I have no idea if this feature actually works though.  I
tend to only use basic features of the ccache and build in the same
set of directories every time.

>>
>> Right now with the external ccache my kernel compiles alone go from >
>> 6 min down to < 30 seconds, so there is a definite desire on my side
>> to have this work.
> 
>  Yes, I just wanted to make sure it works best way possible in every
> possible use-case.
> 
>  Optimal results would come from using external (what I refer here as
> my "normal" cache) cache for anything outside OpenEmbedded scope, and
> for initial cross-compiler builds of OpenEmbedded (as that is done
> with external compiler that will remain the same even when one does
> complete rebuild), and second ("internal") cache for the rest of
> OpenEmbedded build. Contents of latter gets invalid when one does full
> rebuild, so it can be removed before one.
>  I don't know, but assume that it would be a bit hard to select
> correct one from two caches in OpenEmbedded builds (external one for
> some builds, internal for others) so optimal realistic setup is that
> user's normal external cache is not used at all inside OpenEmbedded.
> Now, if user wants to override cache location (and thus create what
> one may consider "external" cache) he should be allowed to do so, but
> thing here is that the cache one uses normally does not get polluted
> accidentally.


It appears that the default way the ccache is setup, it is already
doing the right thing, meaning the defaults for bitbake are fine.

For me, there are two basic cases.

 1) create a "project" directory make a ccache dir in there and then
    set CCACHE_DIR in the local.conf
 2) Use an external shared directory for the ccache with a deeper
    than the default hash and size

Both these configurations greatly speed up the incremental rebuilds
and build from scratch cases.

Jason.



      reply	other threads:[~2012-05-14 22:34 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-14 16:09 [PATCH 0/2] bitbake.conf: gracefully work with ccache environment variables Jason Wessel
2012-05-14 16:09 ` [PATCH 1/2] bitbake.conf: Move default hash policy initialization before conf file inclusion Jason Wessel
2012-05-14 16:09 ` [PATCH 2/2] bitbake.conf: Add CCACHE_DIR to BB_HASHBASE_WHITELIST Jason Wessel
2012-05-14 16:49 ` [PATCH 0/2] bitbake.conf: gracefully work with ccache environment variables Jason Wessel
2012-05-14 17:18 ` Marko Lindqvist
2012-05-14 17:35   ` Chris Larson
2012-05-14 20:58   ` Jason Wessel
2012-05-14 22:00     ` Marko Lindqvist
2012-05-14 22:24       ` Jason Wessel [this message]

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=4FB18618.60604@windriver.com \
    --to=jason.wessel@windriver.com \
    --cc=cazfi74@gmail.com \
    --cc=openembedded-core@lists.openembedded.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox