We REALLY nead a NON-PCH build in JPRT NOW!

Magnus Ihse Bursie magnus.ihse.bursie at oracle.com
Wed Apr 8 20:53:50 UTC 2015

On 2015-04-03 00:36, Kim Barrett wrote:
> On Apr 2, 2015, at 12:06 PM, Volker Simonis <volker.simonis at gmail.com> wrote:
>> while precompiled headers (PCH) are a nice and effective way of
>> improving hotspot build times
> Are we sure about that?

No, we're not. :-)

We in the build team, mainly Erik, have done testing on several 
occasions for the two major special tricks for enhancing build 
performance: PCH and ccache. Erik can probably quote you some numbers, 
but what I remember as the bottom line is that it is very much YMMV. 
There are many different scenarios:
* occasionally doing full builds from scratch
* incremental rebuilds
* repeatingly building full builds from scrach (which benefits ccache)

There are also different versions of compilers and ccache, and different 
operating systems with different file caching policies, and different 
hardware profiles (is your CPU or disk the bottleneck, etc).

Also, it is worth noting that ccache and PCH genereally do not play very 
well together. Sometimes enabling both will result in worse performance 
than just enabling one of them.

So there is no golden answer, the one thing that is most efficient in 
all circumstances.

We try to provide a reasonable default which works well in most cases 
(this currently means ccache off by default and PCH on, for hotspot). If 
you care about performance, the best thing you can do is to measure with 
and without PCH and ccache on your typical work case.

Regarding PCH and JPRT, there seem to be agreement that it typically 
improves compilation performance, at least on some platforms.


More information about the hotspot-dev mailing list