How to change compilation policy to trigger C2 compilation ASAP?

Tangwei (Euler) tangwei6 at huawei.com
Wed May 20 00:34:52 UTC 2015



> -----Original Message-----
> From: Aleksey Shipilev [mailto:aleksey.shipilev at oracle.com]
> Sent: Tuesday, May 19, 2015 9:10 PM
> To: Tangwei (Euler); hotspot-compiler-dev at openjdk.java.net
> Subject: Re: How to change compilation policy to trigger C2 compilation ASAP?
> 
> 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
> 
Is that possible to keep tiered compilation policy, and just change threshold value to reduce transition time between different execution level? 

> 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
> 
I think this will compile all methods instead of some hot ones. 

> 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



More information about the hotspot-compiler-dev mailing list