[ccache] Re: ccache misses most of the time

Jon Ringle jon.ringle at comdial.com
Wed Jun 9 07:15:45 GMT 2004


On Tuesday 08 June 2004 03:54 pm, Jon Ringle wrote:
> Hello,
>
> I am having a problem getting ccache to retrieve cached results after a
> make clean && make. But instead I mostly get cache misses and my cache size
> increases. I am using ccache in front of cross compiler hosted on i686
> target arm-linux using the masquerading technique. Any insights as to why
> this is happening would be appreciated.

I found that if I forced check_extensions to set direct_i to 1 the cache hits 
happen as I expect. But I'm not sure why this is so.

diff -ur ccache-2.3/ccache.c ccache-2.3-jon/ccache.c
--- ccache-2.3/ccache.c 2003-09-28 00:48:17.000000000 -0400
+++ ccache-2.3-jon/ccache.c     2004-06-09 03:12:33.000000000 -0400
@@ -586,7 +586,7 @@
        const char *p;

        if (direct_i) {
-               *direct_i = 0;
+               *direct_i = 1;
        }

        p = strrchr(fname, '.');


>
> Thanks,
>
> Jon
>
> $ ccache -V
> ccache version 2.3
> Copyright Andrew Tridgell 2002
> Released under the GNU GPL v2 or later
> $ ls -l `which arm-linux-gcc`
> lrwxrwxrwx    1 root     root           15 Jun  8 14:36
> /usr/local/ccache/bin/arm-linux-gcc -> /opt/bin/ccache*
> $ arm-linux-gcc -v
> Reading specs from /usr/lib/gcc-lib/arm-linux/2.95.2/specs
> gcc version 2.95.2 19991024 (release)
> $ ccache -C
> Cleared cache
> $ ccache -z
> Statistics cleared
> $ make clean && make
> (build application to fill cache)
>
> $ ccache -s
> cache hit                              0
> cache miss                           320
> not a C/C++ file                      28
> no input file                          5
> files in cache                       640
> cache size                          38.4 Mbytes
> max files                           2000
> max cache size                    1024.0 Mbytes
> $ make clean && make
> (build application again expecting mostly cache hits)
>
> $ ccache -s
> cache hit                              5
> cache miss                           635
> not a C/C++ file                      56
> no input file                         10
> files in cache                      1270
> cache size                          76.2 Mbytes
> max files                           2000
> max cache size                    1024.0 Mbytes


More information about the ccache mailing list