JDK-8341555 : Release Note: UseCompactObjectHeaders CDS Archives Creation
  • Type: Sub-task
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 24
  • Priority: P4
  • Status: Resolved
  • Resolution: Delivered
  • Submitted: 2024-10-04
  • Updated: 2025-04-09
  • Resolved: 2025-01-22
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 24
24Resolved
Related Reports
Relates :  
Description
The CDS archives for the Compact Object Headers feature are not included in the JDK released by Oracle.
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 -XX:+UnlockExperimentalVMOptions -XX:+UseCompactObjectHeaders`

The above command generates the `classes_coh.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 -XX:+UnlockExperimentalVMOptions -XX:+UseCompactObjectHeaders -XX:-UseCompressedOops`

The above command generates the `classes_nocoops_coh.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.
Comments
Made an update to this text, the text was incorrectly saying the file generated from the second command was: class_nocoops_coh.jsa, when its classes_nocoops_coh.jsa (class -> classes) [~ccheung]
12-03-2025

I think this text looks good.
22-01-2025