-
Sub-task
-
Resolution: Delivered
-
P4
-
repo-valhalla
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.
`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.