[ccache] ccache and gcc triplet
g.esp at free.fr
Tue Jan 25 00:32:37 MST 2011
----- Original Message -----
From: "Joel Rosdahl" <joel at rosdahl.net>
To: <ccache at lists.samba.org>
Sent: Monday, January 24, 2011 10:36 PM
Subject: Re: [ccache] ccache and gcc triplet
> On 2011-01-23 22:43, Gilles Espinasse wrote:
> > [...]
> > I had think to add triplet symlink (i486-linux-gnu-gcc) to ccache.
> > Is there another solution?
> The other option is to add ccache as a prefix to the compilation row, so
> i486-linux-gnu-gcc arg ...
> ccache i486-linux-gnu-gcc arg ...
> instead. How to do that depends on the build system, of course.
Yes but I was unsure that would not break on non-enought quoted test
somewhere due to the space between ccache and triplet.
So I go to the symlink choice. That simplier too, I don't have to change
each --build option.
Then I had the issue that the 1 G default size is slightly less than what is
If you look at the stats after the full distrib build, you may see a 'cache
size' a bit below the limit and think the size is enought. But that may be
Tracing stats after each packet build, I haven't seen a size bigger than 922
Then size decrease to approximately 850 MB due old hits purge and increase
again with usage.
How do you know that 'max size' is too small?
Is-it when you reach more than 'max size' x 0.85?
This is very bad for performance to have the cache size slightly too small,
as there is a constant purge of old hits that will miss on next build. Total
'cache miss' was 42296.
I then set max-size to 5 G, clean the cache and after 2 full build :
- the most 'cache miss' is 16, total 'cache miss' is 155,
- cache size is 1020.5 Mbytes
If I run each package tests suite, that should increase a bit.
ccache work really great.
Toolchain build time is divided by more than 2, comparing from cold cache.
> > Should not that issue be referenced in the doc?
> I think that adding that kind of detail to the docs would not be very
> useful since it's not a common scenario, but maybe we could improve the
> current manual (http://ccache.samba.org/manual.html#_run_modes) in more
> generic terms. Do you have any ideas on how?
> -- Joel
I will think what I could add to the manual and come back.
I just saw yesterday that ccache-3 ubuntu package have an
update-ccache-symlink that parse /usr/lib/gcc to find installed compiler
triplet (with some c89/c99 variations).
More information about the ccache