IBM User Guide for Java V7 on Windows > Troubleshooting and support > Using diagnostic tools > JIT and AOT problem determination > Diagnosing a JIT or AOT problem



Disabling the JIT or AOT compiler

If you suspect that a problem is occurring in the JIT or AOT compiler, disable compilation to see if the problem remains. If the problem still occurs, you know that the compiler is not the cause of it.

The JIT compiler is enabled by default. The AOT compiler is also enabled, but, is not active unless shared classes have been enabled. For efficiency reasons, not all methods in a Javaâ„¢ application are compiled. The JVM maintains a call count for each method in the application; every time a method is called and interpreted, the call count for that method is incremented. When the count reaches the compilation threshold, the method is compiled and executed natively.

The call count mechanism spreads compilation of methods throughout the life of an application, giving higher priority to methods that are used most frequently. Some infrequently used methods might never be compiled at all. As a result, when a Java program fails, the problem might be in the JIT or AOT compiler or it might be elsewhere in the JVM.

The first step in diagnosing the failure is to determine where the problem is. To do this, you must first run your Java program in purely interpreted mode (that is, with the JIT and AOT compilers disabled).


Tasks

  1. Remove any -Xjit and -Xaot options (and accompanying parameters) from your command line.
  2. Use the -Xint command-line option to disable the JIT and AOT compilers. For performance reasons, do not use the -Xint option in a production environment.


What to do next

Running the Java program with the compilation disabled leads to one of the following situations:


Parent: Diagnosing a JIT or AOT problem

Next topic: Selectively disabling the JIT or AOT compiler








Error 404 - Not Found

Error 404 - Not Found

The document you are looking for may have been removed or re-named. Please contact the web site owner for further assistance.