Re: [ccache] does ccache include source code modified time into hash?

2014-11-13 Thread Egmont Koblinger
On Thu, Nov 13, 2014 at 2:27 PM, Andrew Stubbs  wrote:

>  Probably there was a timestamp in a generated header somewhere.


Another similar issue might be if you embed the build ID (the git commit
ID) in some weird way, like e.g. midnight commander does, so that every
tiny git commit causes a total loss of the cache.

e.
___
ccache mailing list
ccache@lists.samba.org
https://lists.samba.org/mailman/listinfo/ccache


Re: [ccache] does ccache include source code modified time into hash?

2014-11-13 Thread Andrew Stubbs

On 13/11/14 01:28, Makson Lee wrote:

2014-11-13 4:44 GMT+08:00 Andrew Stubbs mailto:a...@codesourcery.com>>:

However, it might appropriate to list the factors that can lead to a
cache miss, and mention some of the factors that explicitly do not
cause a miss.


Yes, i think the factors that can lead to a cache miss would be enough,
currently, we are using some kind of version control tool, each time we
reload the same code and recompile it, we get lots of cache miss, so we
need that information to find out why cache miss happens, in direct
mode, maybe a tool can show us all the factors for a source file before
compile would be help too.


The usual cause is that you don't always use the exact same checkout 
location (pathnames *are* factored into the signatures). CCACHE_BASEDIR 
is designed to fix that, but it does have documented side-effects.


Some compiler flags are also uncachable (or unsupported). You should be 
able to see if that's what you're getting using "ccache -s".


And then, some projects just seems to like to resist caching. The Linux 
kernel is one. You can make once, then make clean, and the cache will 
work, but it will never cache the initial build of a fresh tree. I 
forget why (I did know once), but I seem to recall that there was 
nothing to do about it. Probably there was a timestamp in a generated 
header somewhere.


Andrew
___
ccache mailing list
ccache@lists.samba.org
https://lists.samba.org/mailman/listinfo/ccache