JDK-8348426 : Generate binary file for -XX:AOTMode=record -XX:AOTConfiguration=file
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 25
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2025-01-23
  • Updated: 2025-05-13
  • Resolved: 2025-02-25
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 b12Fixed
Related Reports
Blocks :  
Causes :  
Causes :  
Causes :  
Causes :  
Causes :  
Causes :  
Causes :  
Causes :  
Causes :  
Causes :  
Duplicate :  
Relates :  
Sub Tasks
JDK-8349953 :  
Description
Currently, with "java -XX:AOTMode=record -XX:AOTConfiguration=file ...", a text file is written. The file contains the names of loaded classes, indices of resolved constant pools entries, etc, that are easily represented in text.

With the upcoming 2nd JEP of the Leyden project, JDK-8325147 (Ahead-of-Time Method Profiling), the AOT config file needs to record complex data structures that are difficult to represent in text (we would need code for serializing hierarchical data structures to/from text). Also, a next step after JDK-8325147 would be to support hidden classes that have no predictable names. Representing such classes with textual names would become another challenge.

To prepare for JDK-8325147, this RFE writes the AOT configuration file in a binary format (essentially the same format as a CDS archive file). This allows arbitrary data associated with the cached classes to be processed and stored using the existing MetaspaceClosure API (which can recursively copy C++ objects). Such a change in the file format is allowed by JEP 483:

> the format of the configuration and cache files is not specified and is subject to change without notice.

Comments
Changeset: 86024ebd Branch: master Author: Ioi Lam <iklam@openjdk.org> Date: 2025-02-25 22:56:25 +0000 URL: https://git.openjdk.org/jdk/commit/86024ebdb0f06517925c03e52246fbda0bad8f7c
25-02-2025

A pull request was submitted for review. Branch: master URL: https://git.openjdk.org/jdk/pull/23484 Date: 2025-02-06 05:58:51 +0000
12-02-2025