JDK-8366727 : Release Note: Document How to Manually Create Valhalla Supported CompactObjectHeaders CDS Archives
  • Type: Sub-task
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: repo-valhalla
  • Priority: P4
  • Status: Open
  • Resolution: Unresolved
  • Submitted: 2025-09-02
  • Updated: 2025-09-15
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
repo-valhallaUnresolved
Description
The CDS archives for the Compact Object Headers feature are not included in the JDK released by Oracle when the JEP 401: Value Classes and Objects (Preview) is enabled.  In order to take advantage of the start-up performance offered by CDS, the user can build the CDS archives with Compact Object Headers as follows:

`java -Xshare:dump --enable-preview -XX:+UnlockExperimentalVMOptions -XX:+UseCompactObjectHeaders`

The above command generates the `classes_coh_valhalla.jsa` which is located in the same directory as the default
CDS archive (`classes.jsa`). For example, on Linux, it is located in the `<jdk>/lib/server` directory.

To generate a CDS archive with Compact Object Headers and with compressed oops disabled:

`java -Xshare:dump --enable-preview -XX:+UnlockExperimentalVMOptions -XX:+UseCompactObjectHeaders -XX:-UseCompressedOops`

The above command generates the `classes_nocoops_coh_valhalla.jsa` which is located in the same directory as the default
CDS archive with compressed oops disabled (`classes_nocoops.jsa`). For example, on Linux, it is located in the
`<jdk>/lib/server` directory.