How to change compilation policy to trigger C2 compilation ASAP?

Aleksey Shipilev aleksey.shipilev at oracle.com
Tue May 19 13:10:14 UTC 2015


On 19.05.2015 15:58, Tangwei (Euler) wrote:
> In order to make C2 compiler compile hot function as early as possible,
> I hope to reduce the threshold of function invocation
> 
> count in interpreter and C1 to drive the JIT compiler transitioned to
> Level 4 (C2) ASAP. Following is the option list I try, but
> 
> failed to find a right combination to meet my requirement. Anyone can
> help to figure out what options I can use?

Cut the C1 from the compilation pipeline by disabling tiered compilation
altogether? It will still profile the code with interpreter, and so
compilation thresholds are still in effect:
  -XX:-TieredCompilation

The same, but force runtime to compile the methods as soon as it calls
into them, plus disable background compilation. This will stall the
method execution until the compiled version is available. No profiling
is done:
  -XX:-TieredCompilation -Xbatch -Xcomp

But, there is intrinsic tradeoff between the time you spend profiling on
lower compilation/interpretation levels and the profile accuracy. This
translates to the tradeoff between the compiled code efficiency and
time-to-performance. Skipping profiling altogether may and will have a
detrimental effect on performance tests.

Thanks,
-Aleksey

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/attachments/20150519/de75276e/signature.asc>


More information about the hotspot-compiler-dev mailing list