JDK-8232069 : Enable CDS even when UseCompressedClassPointers and/or UseCompressedOops are false
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 14
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2019-10-09
  • Updated: 2020-07-22
  • Resolved: 2020-02-11
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 15
15 b10Fixed
Related Reports
Cloners :  
Duplicate :  
Duplicate :  
Relates :  
Relates :  
Relates :  
Relates :  
Sub Tasks
JDK-8265717 :  
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).

Comments
URL: https://hg.openjdk.java.net/jdk/jdk/rev/73bcb3e4e596 User: minqi Date: 2020-02-11 20:16:34 +0000
11-02-2020

[~pliden] I created JDK-8232152 -- Enable CDS even when UseCompressedClassPointers is false
11-10-2019

[~iklam] Thanks for clarifying. ZGC currently requires both UseCompressedOops and UseCompressedClassPointers to be false.
10-10-2019

[~pliden] Support for UseCompressedClassPointers==false is not part of this RFE. Do you expect that to be used often (e.g., with ZGC?). If so, we can open up a separate RFE, as it affect different parts of the CDS code.
10-10-2019

Does this enhancement also cover the case where UseCompressedClassPointers is false?
10-10-2019