JDK-8263327 : JEP 410: Remove the Experimental AOT and JIT Compiler
  • Type: JEP
  • Component: hotspot
  • Sub-Component: compiler
  • Priority: P4
  • Status: Closed
  • Resolution: Delivered
  • Fix Versions: 17
  • Submitted: 2021-03-10
  • Updated: 2021-08-05
  • Resolved: 2021-08-05
Related Reports
Relates :  
Sub Tasks
JDK-8264805 :  
JDK-8264806 :  
JDK-8265149 :  
Description
Summary
-------

Remove the experimental Java-based ahead-of-time (AOT) and just-in-time (JIT) compiler.  This compiler has seen little use since its introduction and the effort required to maintain it is significant.  Retain the experimental Java-level JVM compiler interface (JVMCI) so that developers can continue to use externally-built versions of the compiler for JIT compilation.


Motivation
----------

Ahead-of-time compilation (the `jaotc` tool) was incorporated into JDK 9 as an experimental feature via [JEP 295][jep-aot].  The `jaotc` tool uses the Graal compiler, which is itself written in Java, for AOT compilation.

The Graal compiler was made available as an experimental JIT compiler in JDK 10 via [JEP 317][jep-graal].

We have seen little use of these experimental features since they were introduced, and the effort required to maintain and enhance them is significant.  These features were [not included][jdk16] in the JDK 16 builds published by Oracle, and no one complained.


Description
-----------

Remove three JDK modules:

 - `jdk.aot` ��� the `jaotc` tool
 - `jdk.internal.vm.compiler` ��� the Graal compiler
 - `jdk.internal.vm.compiler.management` ��� Graal's `MBean`

Preserve these two Graal-related source files so that the JVMCI module (`jdk.internal.vm.ci`, [JEP 243][jep-jvmci]) continues to build:

 - `src/jdk.internal.vm.compiler/share/classes/module-info.java`
 - `src/jdk.internal.vm.compiler.management/share/classes/module-info.java`

Remove HotSpot code related to AOT compilation:

 - `src/hotspot/share/aot` ��� dumps and loads AOT code
 - Additional code guarded by `#if INCLUDE_AOT`

Finally, remove tests as well as code in makefiles related to Graal and AOT compilation.


Alternatives
------------

Developers who wish to use the Graal compiler for either AOT or JIT compilation can use [GraalVM][graalvm].


Risks and Assumptions
---------------------

We assume that developers actively using these features have had sufficient notice of this removal.


[jep-aot]: https://openjdk.java.net/jeps/295
[jep-graal]: https://openjdk.java.net/jeps/317
[jep-jvmci]: http://openjdk.java.net/jeps/243
[jdk16]: https://bugs.openjdk.java.net/browse/JDK-8255616
[graalvm]: https://www.graalvm.org

Comments
PRs to remove AOT and Graal are reviewed and approved: https://github.com/openjdk/jdk/pull/3398 https://github.com/openjdk/jdk/pull/3421 CSR to remove AOT product flags is approved: JDK-8265000 JEP is ready for integration. Moving it to 'Propose To Target'.
14-04-2021