From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] [pull request] Pull request for branch for-2011.02/fix-ccache-support
Date: Fri, 3 Dec 2010 20:09:37 +0100 [thread overview]
Message-ID: <cover.1291403357.git.thomas.petazzoni@free-electrons.com> (raw)
Hello,
Here is a patch that reworks the ccache support to make it work and
make it useful. It is now a "Build options" rather than a "Toolchain
option". I have tested it with both internal toolchain and external
toolchain. The principle is simply to build ccache as early as
possible in the build process, and then use it to cache host and
target compiled files.
The ccache cache is kept in ~/.buildroot-ccache/, so that it can be
shared between different builds.
I'm not using the symlink technique that was used in the past, but
rather prefixing all invocation to host gcc and target gcc with
"$(HOST_DIR)/usr/bin/ccache".
Here are some speed-up results :
*) First test on my laptop (dual core, 2 GB of RAM), using an ARM
external toolchain, building Busybox and a couple of packages.
-> ccache disabled: 5 minutes 29 seconds
-> ccache enabled, cold cache: 5 minutes 47 seconds
-> ccache enabled, hot cache: 3 minutes 40 seconds
The test with "cold cache" is done after removing
~/.buildroot-ccache/. The test with "hot cache" is done after
cleaning up the Buildroot build tree, but keeping the cache of the
previous build.
Here we see that ccache has a little cost, but that once the cache
is hot from previous builds, the build speed-up is interesting.
*) Second test on my build server (quad core i7, 12 GB of RAM), using
an ARM internal toolchain, building Busybox and an ext2
filesystem.
-> ccache disabled: 7 minutes 10 seconds
-> ccache enabled, cold cache: 5 minutes 43 seconds
-> ccache enabled, hot cache: 4 minutes 24 seconds
In this case we see that even when the cache is cold, ccache is
useful. It's probably because gcc gets recompiled twice during the
toolchain build process.
Regards,
Thomas
The following changes since commit 7e9c3a387820154fd1355f23c2669072c0c3a5f7:
Peter Korsgaard (1):
docs/news.html: add 2010.11 announce link
are available in the git repository at:
git://git.busybox.net/~tpetazzoni/git/buildroot for-2011.02/fix-ccache-support
Thomas Petazzoni (1):
ccache: rework ccache management
Config.in | 8 ++
Makefile | 27 +++-
docs/buildroot.html | 26 ++++
package/Config.in | 2 +-
package/Makefile.in | 9 ++-
package/busybox/Config.in | 2 +-
package/ccache/Config.in | 5 +
package/ccache/ccache.mk | 32 +++++
toolchain/ccache/Config.in | 16 ---
toolchain/ccache/Config.in.2 | 13 --
toolchain/ccache/ccache.mk | 196 ------------------------------
toolchain/dependencies/dependencies.sh | 2 +-
toolchain/toolchain-buildroot.mk | 1 -
toolchain/toolchain-buildroot/Config.in | 1 -
toolchain/toolchain-crosstool-ng.mk | 1 -
toolchain/toolchain-external.mk | 1 -
toolchain/toolchain-external/ext-tool.mk | 2 +-
17 files changed, 103 insertions(+), 241 deletions(-)
create mode 100644 package/ccache/Config.in
create mode 100644 package/ccache/ccache.mk
delete mode 100644 toolchain/ccache/Config.in
delete mode 100644 toolchain/ccache/Config.in.2
delete mode 100644 toolchain/ccache/ccache.mk
Thanks,
--
Thomas Petazzoni
next reply other threads:[~2010-12-03 19:09 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-03 19:09 Thomas Petazzoni [this message]
2010-12-03 19:09 ` [Buildroot] [PATCH 1/1] ccache: rework ccache management Thomas Petazzoni
-- strict thread matches above, loose matches on Subject: below --
2010-12-07 20:09 [Buildroot] [pull request] Pull request for branch for-2011.02/fix-ccache-support Thomas Petazzoni
2010-12-08 21:55 ` Peter Korsgaard
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=cover.1291403357.git.thomas.petazzoni@free-electrons.com \
--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