Frequently asked questions about the JIT compiler

Answers on subjects such as disabling the JIT compiler, use of alternative JIT compilers, control of JIT compilation and dynamic control of the JIT compiler.

Can I disable the JIT compiler?
Yes. The JIT compiler is turned on by default, but you can turn it off with the appropriate command-line parameter. For more information, see Disabling the JIT or AOT compiler.
Can I use another vendor's JIT compiler?
No.
Can I use any version of the JIT compiler with the JVM?
No. The two are tightly coupled. You must use the version of the JIT compiler that comes with the JVM package that you use.
Can the JIT compiler decompile methods?
Typically, the JIT compiler does not decompile methods. However, in rare instances the JIT compiler is forced to decompile a method. Such instances arise when the JIT compiler applies speculative optimizations based on compile-time assumptions, the assumptions are later violated, and the JIT compiler is then unable to recompile the method. Due to implementation restrictions, such methods remain interpreted until the end of the application.
Can I dynamically control the JIT compiler?
No. You can pass options to the JIT compiler to modify the behavior, but only at JVM startup time, because the JIT compiler is started up at the same time as the JVM. However, a Java™ program can use the java.lang.Compiler API to enable and disable the JIT compiler at run time.
How much memory does the code cache consume?
The JIT compiler uses memory intelligently. When the code cache is initialized, it uses relatively little memory. As more methods are compiled into native code, the code cache grows dynamically to accommodate the needs of the program. Space that is previously occupied by discarded or recompiled methods is reclaimed and reused. When the size of the code cache reaches a predefined maximum limit, it stops growing. The JIT compiler then stops compiling methods to avoid exhausting the system memory and affecting the stability of the application or the operating system. Start of changes for service refresh 5From z/OS® V2R3, residency mode for 64-bit applications (RMODE64) is enabled by default. This feature allows the JIT to allocate code caches above the 2 GB memory bar. You can disable this JIT behavior by specifying the -Xjit:disableRMODE64 suboption on the command line.End of changes for service refresh 5