Does the JVM ever re-compiles compiled code?
Remi Forax
forax at univ-mlv.fr
Thu Apr 11 15:00:25 PDT 2013
On 04/11/2013 10:39 PM, Ion Ionascu wrote:
> Hi,
>
>
> I hope this is the right mailing list to ask this question.
>
> Could you please tell me if the JVM ever re-compiles already compiled
> bytecode?
yes, in two cases, if an optimistic assumption (like a branch of a if
was never taken,
a value is never null, etc) is broken or if the JVM is configured in
tiered mode,
in that case the JVM JIT the code once with the client compiler (c1) and
also add probes in the compiled code to still profile the application.
> And, is the compiled code ever brought back to a state where it is
> just interpreted?
yes, it's the normal mode, not in tiered compilation, in that case,
if an assumption is broken, the VM deoptimize the code i.e.
mark the JITed code as should not be used anymore and jum
from the compiled code to the interpreter, that will re-profile the
application
and if hot re-JIT the code.
>
> I am curious about re-compilation because the server compiler is set
> by default to compile code after 10000 accesses in order to
> statistically guarantee that enough information has been gathered to
> do the best optimisations. But, does the JVM continue to track code
> usage after it is compiled?
no, not by default.
>
>
> Thank you,
> Ion Ionascu
>
> www.ionionascu.eu <http://www.ionionascu.eu>
cheers,
Rémi
More information about the hotspot-compiler-dev
mailing list