JEP 317: Experimental Java-Based JIT Compiler

OwnerIgor Veresov
StatusClosed / Delivered
Componenthotspot / compiler
Discussionhotspot dash compiler dash dev at openjdk dot java dot net
Reviewed byJohn Rose, Mikael Vidstedt, Vladimir Kozlov
Endorsed byVladimir Kozlov
Created2017/10/20 20:03
Updated2018/03/28 01:58


Enable the Java-based JIT compiler, Graal, to be used as an experimental JIT compiler on the Linux/x64 platform.


It is not a goal to meet or beat the performance of the existing JIT compilers.


Graal, a Java-based JIT compiler, is the basis of the experimental Ahead-of-Time (AOT) compiler introduced in JDK 9. Enabling it to be used as an experimental JIT compiler is one of the initiatives of Project Metropolis, and is the next step in investigating the feasibility of a Java-based JIT for the JDK.


Enable Graal to be used as an experimental JIT compiler, starting with the Linux/x64 platform. Graal will use the JVM compiler interface (JVMCI) introduced in JDK 9. Graal is already in the JDK, so enabling it as an experimental JIT will primarily be a testing and debugging effort.

To enable Graal as the JIT compiler, use the following options on the java command line:

-XX:+UnlockExperimentalVMOptions -XX:+UseJVMCICompiler


Standard testing for compilers is planned for this work. This includes running all HotSpot and JDK tests with various flag options on Linux/x64. In addition to these standard tests, unit tests developed specifically for Graal will be run. Support to run these unit tests in the jtreg framework will be implemented. Initial performance testing and benchmarking will be performed as part of this effort.

Risks and Assumptions

Issues with slower startup performance and increased Java heap usage of this experimental offering could impact and/or limit initial developer evaluation. Some applications and benchmarks will see performance gaps in Graal compared with the existing HotSpot JIT compilers.