Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8232069

Enable CDS even when UseCompressedClassPointers and/or UseCompressedOops are false

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 14
    • Fix Version/s: 15
    • Component/s: hotspot
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      b10

      Description

      The contents of InstanceKlass::_fields are different depending on the value of UseCompressedOops and UseCompressedClassPointers. The version stored in the CDS archive is for UseCompressedOops==true && UseCompressedClassPointers=true. Currently, if we are using any other combination of these flags during run-time, we disable CDS because the archived _fields information is incorrect.

      We have 3 choices:

      1. Remember the compression mode at CDS dump time. At runtime, disable CDS if the compression mode is changed.
      2. Same as 1, but save more than one CDS archives in the JDK image. Choose the appropriate one at start-up
      3. Recompute re-compute InstanceKlass::_fields at runtime.

      #1 is the simplest to implement, and will allow us to measure the benefits of using ZGC and CDS. The downside of #1 is you cannot use the same CDS image between VMs that use zgc vs g1.

      If the results of #1 are promising, we can think about #2 (simpler to implement, more file footprint) and #2 (smaller file footprint, but rather complex to implement).

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                minqi Yumin Qi
                Reporter:
                iklam Ioi Lam
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: