From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] ccache problem with codesourcery toolchain
Date: Sun, 5 Feb 2012 08:45:46 +0100 [thread overview]
Message-ID: <20120205084546.2db4fec8@skate> (raw)
In-Reply-To: <1328403901.12122.YahooMailNeo@web160901.mail.bf1.yahoo.com>
Hello Danomi,
Le Sat, 4 Feb 2012 17:05:01 -0800 (PST),
D M <d_mo1234@yahoo.com> a ?crit :
> I am working on a project based on the 2011.08 release of buildroot.
> ?We found that the ccache savings was not as good as with our older
> version of buildroot (which used an older version of ccache). ?For
> example, starting from an empty cache directory, our compile takes
> about half an hour. ?With the newer version of ccache, we only save
> about 3 minutes; with the older version, we saved about 13 minutes.
> ?We traced the problem to a feature introduced in ccache 3.0,
> the?CCACHE_COMPILERCHECK option. ?Quoting from ccache manual:?
>
> ? ?"By default, ccache includes the modification time (?mtime?) and
> size of the compiler in the hash to ensure that results retrieved
> from the cache are accurate. The CACHE_COMPILERCHECK environment
> variable can be used to select another strategy." ?
>
> The default is "mtime", but if we select "none", we get back all of
> our savings. ?Again quoting from the manual: ?
>
> ? ? "none - Don?t hash anything. This may be good for situations
> where you can safely use the cached results even though the
> compiler?s mtime or size has changed (e.g. if the compiler is built
> as part of your build system and the compiler?s source has not
> changed, or if the compiler only has changes that don?t affect code
> generation)."
>
> Since we are using buildroot's capability to automatically download
> and extract the CodeSourcery ARM toolchain, the "mtime" used in the
> hash is different every time we do a full recompile. ?So a value of
> "none" seems appropriate when use buildroot this way.
>
> Have others ran into this? ?Since buildroot has this kind of
> CodeSourcery toolchain support, I was wondering if there should be an
> option in menuconfig to specify CCACHE_COMPILERCHECK, to, for
> example, prepend a "CCACHE_COMPILERCHECK=none" to the beginning of
> the CCACHE variable that is used to make TARGET_CC, TARGET_CXX,
> HOSTCC, HOSTCXX.
Good research! Obviously, using the default value of
CCACHE_COMPILERCHECK=mtime will completely defeat the compiler cache in
the context of Buildroot, because the compiler gets re-created pretty
much at every build, so definitely we should arrange for
CCACHE_COMPILERCHECK=none to be set in the ccache environment, or even
directly modify the ccache code to make it the default.
The thing I am curious about is where do the 3 minutes time reduction
come from even when CCACHE_COMPILERCHECK=mtime? Maybe it's the time
reduction gained on compiling host packages, since those always use the
same host compiler.
Thomas
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
next prev parent reply other threads:[~2012-02-05 7:45 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-05 1:05 [Buildroot] ccache problem with codesourcery toolchain D M
2012-02-05 7:45 ` Thomas Petazzoni [this message]
2012-02-05 18:11 ` D M
2012-02-07 17:21 ` Arnout Vandecappelle
2012-02-09 2:39 ` D M
2012-02-10 21:20 ` Arnout Vandecappelle
2012-02-10 21:21 ` [Buildroot] [PATCH] ext-toolchain: set mtime of toolchain wrapper for ccache Arnout Vandecappelle
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=20120205084546.2db4fec8@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 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.