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
- Remove any -Xjit and -Xaot options (and accompanying parameters) from your command line.
- 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:
- The failure remains. The problem is not in the JIT or AOT compiler. In some cases, the program might start failing in a different manner; nevertheless, the problem is not related to the compiler.
- The failure disappears. The problem is most likely in the JIT or AOT compiler.
If you are not using shared classes, the JIT compiler is at fault. If you are using shared classes, you must determine which compiler is at fault by running your application with only JIT compilation enabled. Run your application with the -Xnoaot option instead of the -Xint option. This leads to one of the following situations:
- The failure remains. The problem is in the JIT compiler. You can also use the -Xnojit instead of the -Xnoaot option to ensure that only the JIT compiler is at fault.
- The failure disappears. The problem is in the AOT compiler.
Parent: Diagnosing a JIT or AOT problemNext 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.