Lowering Compilation Threshold in C2 for specific methods

Vladimir Kozlov vladimir.kozlov at oracle.com
Mon Mar 28 22:42:33 UTC 2016

There is a way to specify threshold per method:


But it scale all thresholds in Tiered system.

Note, C2 required profiling information for generating optimal code. Without it the code will be deoptimized frequently 
and executed in Interpreter.

And we don't need to have intrinsic in all executable parts. If C2 does not compile a method it means the method is not 
hot - optimizing it may not bring performance improvement for whole application.

So it is okay to implement intrinsics in C2 first. And do C1 and Interpreter later when requested.


On 3/28/16 3:03 PM, Ahmed Khawaja wrote:
> Greetings,
>          Is there currently a way to change the compilation threshold on a per method basis for C2? I am asking this
> question in the context of intrinsics, since instead of adding interp/C1 support for an intrinsic, there should be a way
> to just always use the C2 version of the method. Methods like CRC32 that have interp, C1, and C2 hooks that always call
> into the intrinsics if they are available, should have a mechanism for only providing a C2 intrinsic and changing the
> threshold so that C2 code is always used, seems like a much cleaner approach.
> Ahmed

More information about the hotspot-compiler-dev mailing list