How to Control Native Compilation in the Oracle JVM Just-in-Time Compiler (JIT)

(Doc ID 1309858.1)

Last updated on JUNE 22, 2017

Applies to:

Oracle Database - Enterprise Edition - Version 11.1.0.6 and later
Information in this document applies to any platform.
JAVA_JIT_ENABLED

Checked for relevance on 22-Jun-2017

Goal

Beginning with 11g Release 1, Oracle Database replaced NCOMP with the JIT compiler.  Oracle Database now examines the execution profile of Java methods which are running or have run within the database and determines which might be better served by being compiled into native machine code.  The column IS_COMPILED in DBA_JAVA_METHODS indicates whether or not the method has been compiled by the JIT.

When encountering a problem executing JIT compiled code, machine-dependent code within the JVM, sometimes it may be helpful to test the same Java method using byte code (otherwise referred to as interpreted) instead.  The parameter JAVA_JIT_ENABLED controls which type of code is executed.  This may be specified at either the SYSTEM or the SESSION level.  There are three situations worth discussing here:

  1. How to execute an interpreted method when JAVA_JIT_ENABLED=TRUE at the system level.
  2. How to execute a JIT compiled method when JAVA_JIT_ENABLED=FALSE at the system level.
  3. How to tell the JVM not to compile any more methods when JAVA_JIT_ENABLED=TRUE at the system level.

Solution

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms