JDK-8240563 : [TESTBUG] WB_IsCDSIncludedInVmBuild should support uncompressed oops/klasses
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 15
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2020-03-05
  • Updated: 2020-03-24
  • Resolved: 2020-03-12
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 b15Fixed
Related Reports
Duplicate :  
Relates :  
Relates :  
Relates :  
Relates :  
Description
http://hg.openjdk.java.net/jdk/jdk/file/73bcb3e4e596/src/hotspot/share/prims/whitebox.cpp#l1975

WB_ENTRY(jboolean, WB_IsCDSIncludedInVmBuild(JNIEnv* env))
#if INCLUDE_CDS
# ifdef _LP64
    if (!UseCompressedOops || !UseCompressedClassPointers) {
      // On 64-bit VMs, CDS is supported only with compressed oops/pointers
      return false;
    }
# endif // _LP64
  return true;
#else
  return false;
#endif // INCLUDE_CDS
WB_END

The test for (!UseCompressedOops || !UseCompressedClassPointers) should be removed because CDS started supporting them after JDK-8232069.

To validate, run all CDS tests with

jtreg -vmoptions:-XX:+UseZGC
jtreg -vmoptions:-XX:-UseCompressedOops
jtreg -vmoptions:-XX:-UseCompressedClassPointers

Comments
This fix was pushed in the jdk-15+15-571 CI job set.
13-03-2020

URL: https://hg.openjdk.java.net/jdk/jdk/rev/fa70160bcf72 User: minqi Date: 2020-03-12 16:08:40 +0000
12-03-2020

Some CDS test cases may need to be modified or excluded (with @require keyword) as the result of this proposed change, but most test cases should be executed to improve test coverage of CDS. Currently -XX:+UseZGC is used to run all tests under open/test/hotspot/jtreg/:hotspot_runtime in test tier-3. However, almost all tests under open/test/hotspot/jtreg/runtime/cds are excluded due to this issue.
05-03-2020

When run jtreg -vmoptions:"-XX:+UnlockExperimentalVMOptions -XX:+UseZGC" for cds, one test case runtime/cds/appcds/CommandLineFlagComboNegative.java failed: stderr: [openjdk version "15-internal" 2020-09-15 OpenJDK Runtime Environment (build 15-internal+0-adhoc.minqi.jdk15) OpenJDK 64-Bit Server VM (build 15-internal+0-adhoc.minqi.jdk15, mixed mode, sharing) ] exitValue = 0 java.lang.RuntimeException: 'The saved state of UseCompressedOops and UseCompressedClassPointers is different from runtime, CDS will be disabled.' missing from stdout/stderr at jdk.test.lib.process.OutputAnalyzer.shouldContain(OutputAnalyzer.java:187) at CommandLineFlagComboNegative.lambda$runTests$0(CommandLineFlagComboNegative.java:94) at jdk.test.lib.cds.CDSTestUtils$Result.assertAbnormalExit(CDSTestUtils.java:151) at CommandLineFlagComboNegative.runTests(CommandLineFlagComboNegative.java:93) at CommandLineFlagComboNegative.main(CommandLineFlagComboNegative.java:103) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:564) at com.sun.javatest.regtest.agent.MainActionHelper$AgentVMRunnable.run(MainActionHelper.java:298) at java.base/java.lang.Thread.run(Thread.java:832) The ZGC flag will turn off UseCompressedOops and UseCompressedClassPointers even they are explicitly turned on in command line.
05-03-2020