JDK-8353598 : Allow AOT cache to be used in training run
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: runtime
  • Priority: P4
  • Status: Open
  • Resolution: Unresolved
  • Submitted: 2025-04-03
  • Updated: 2025-12-09
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
tbdUnresolved
Related Reports
Relates :  
Description
In JDK 24, you cannot use -XX:AOTCache in the training run:

$ java -XX:AOTCache=foo.aot -cp HelloWorld.jar \
    -XX:AOTMode=record -XX:AOTConfiguration=hw.aotconfig \
    HelloWorld
AOTCache must not be specified when using -XX:AOTMode=record

In anticipation of the JEP "Ahead-of-time Command Line Ergonomics" (JDK-8350022), we should allow -XX:AOTCache to be used in the training run, so you can train more than once to build more optimized caches.
Comments
Note: this complicates the integration of JDK-8325147 (Ahead-of-Time Method Profiling), as re-training would require adding extra data to the cached profile. Hence, this RFE should be integrated after JDK-8325147.
10-04-2025