Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8348568 [lworld] Support UseCompactObjectHeaders for Valhalla
  3. JDK-8366727

Release Note: Document How to Manually Create Valhalla Supported CompactObjectHeaders CDS Archives

XMLWordPrintable

      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.

            matsaave Matias Saavedra Silva
            lfoltan Lois Foltan
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: