Force method compilation in HotSpot JVM

Igor Veresov igor.veresov at oracle.com
Fri Jun 10 09:46:09 PDT 2011


On 6/10/11 8:52 AM, antoine artaud-macari wrote:
>
>   Dear HotSpot developers !
>
> We are working on performance optimization for a Java critical system
> and we would like to force the compilation of some Java methods (chosen
> by our own algorithm).
> So we have looked at the OpenJDK HotSpot source code and for time being
> we succeeded in forcing compilation of these methods but the interpreter
> still executes the bytecode.
> For example, we used :
>
>     nmethod * nm = CompileBroker::compile_method(m, 0, m, 0,"forced
>     compilation", THREAD);
>
> where m is a methodHandle on the method to be compiled.
>
> Would you please send us some technical reference or documentation about
> compilation process or how compiled method are executed ?
>
>

For osr_bci parameter you should specify the InvocationEntryBci constant 
(which is -1).

igor



>
> Best regards,
>
> --
> *Antoine ARTAUD-MACARI *****
>
>
>



More information about the hotspot-compiler-dev mailing list