JDK-8353597 : Refactor handling VM options for AOT cache input and output
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: runtime
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2025-04-03
  • Updated: 2025-06-02
  • Resolved: 2025-04-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.
JDK 25
25 b18Fixed
Related Reports
Blocks :  
Duplicate :  
Description
Since JEP 483 (JDK-8315737), VM options such as -XX:AOTCache are implemented as aliases of "classical" CDS options such as -XX:SharedArchiveFile.

Example:
https://github.com/openjdk/jdk/blob/b01026abaab0b65f9ec0920d66a8ff1fa868d351/src/hotspot/share/cds/cdsConfig.cpp#L414-L417

In anticipation of the JEP "Ahead-of-time Command Line Ergonomics" (JDK-8350022), we should refactor the code that deals with the AOT options. Specifically, as we expect the JVM to be able to load from an "input AOT cache" and write to an "output AOT cache", we should clearly  identify the input and output caches in separate APIs:

    const char* CDSConfig::input_static_archive_path();
    const char* CDSConfig::input_dynamic_archive_path();
    const char* CDSConfig::output_archive_path();

(Currently, the above information is obtained from global variables such as SharedArchiveFile, ArchiveClassesAtExit, and AOTCache, so the logic is difficult to understand).
Comments
Changeset: 567c6885 Branch: master Author: Ioi Lam <iklam@openjdk.org> Date: 2025-04-09 15:03:38 +0000 URL: https://git.openjdk.org/jdk/commit/567c6885a377e5641deef9cd3498f79c5346cd6a
09-04-2025

A pull request was submitted for review. Branch: master URL: https://git.openjdk.org/jdk/pull/24401 Date: 2025-04-03 04:00:59 +0000
09-04-2025