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

Enable CDS even when UseCompressedClassPointers and/or UseCompressedOops are false


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


      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).


          Issue Links



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


                • Created: