On 2015-05-22 17:47, Dan Smith wrote:
JDK-8027584 disabled ccache by default, I gather because it doesn't work in 
Cygwin, and secondarily because of vague general problems with it.

The documentation (README-builds.html) still unambiguously endorses it, 
although doesn't say anything about how to turn it on (configure with 
--enable-ccache).

I'm curious about the current state of affairs, and suggest updating the 
documentation to reflect the answer.

—Dan
From README-builds.html in jdk9:

                <h4>Building with ccache</h4>

                <p>The OpenJDK build supports building with ccache
                    when using gcc or clang. Using ccache can
                    radically speed up compilation of native code if
                    you often rebuild the same sources. Your milage
                    may vary however so we recommend evaluating it for
                    yourself. To enable it, make sure it's on the path
                    and configure with <code>--enable-ccache</code>.</p>

I wouldn't say that's endorsing ccache, but rather reflects the current state of things. It can be a great speed improvement, but it certainly varies. Especially in hotspot, if you touch a header file, you invalidate most of the cache, so it won't help the development usecase much. It doesn't play very well with precompiled headers as Magnus says, but I did fix the worst of that a while back so it's far from as bad as it used to be. I would not discourage trying them both together at this point.

In JDK 8, the documentation and defaults are probably still bad.

On a related note, a while back I experimented with modifications to ccache to make it work with Solaris Studio. I believe I got it to work, but it would certainly need more testing before we could trust it.

/Erik

Reply via email to