8240563: [TESTBUG] WB_IsCDSIncludedInVmBuild should support uncompressed oops/klasses

With 8232069, CDS works with uncompressed oops/kalsses, detecting CDS code no longer bases on the two flags.

Reviewed-by: iklam
This commit is contained in:
Yumin Qi 2020-03-12 09:07:11 -07:00
parent c68e15c0c3
commit 90a39195c1
4 changed files with 4 additions and 6 deletions
src/hotspot/share/prims
test/hotspot/jtreg

@ -2003,12 +2003,6 @@ WB_END
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;

@ -40,6 +40,7 @@ serviceability/sa/ClhsdbThread.java 8220624 generic-
serviceability/sa/ClhsdbWhere.java 8220624 generic-all
serviceability/sa/DeadlockDetectionTest.java 8220624 generic-all
serviceability/sa/JhsdbThreadInfoTest.java 8220624 generic-all
serviceability/sa/ClhsdbCDSCore.java 8220624 generic-all
serviceability/sa/TestClhsdbJstackLock.java 8220624 generic-all
serviceability/sa/TestHeapDumpForInvokeDynamic.java 8220624 generic-all
serviceability/sa/TestHeapDumpForLargeArray.java 8220624 generic-all

@ -29,6 +29,7 @@
* E.g. use compressed oops for creating and archive, but then
* execute w/o compressed oops
* @requires vm.cds
* @requires !vm.gc.Z
* @library /test/lib
* @compile test-classes/Hello.java
* @run driver CommandLineFlagComboNegative

@ -62,6 +62,8 @@ public class TestZGCWithCDS {
.exec(helloJar,
"-XX:+UnlockExperimentalVMOptions",
"-XX:-UseZGC",
"-XX:+UseCompressedOops", // in case turned off by vmoptions
"-XX:+UseCompressedClassPointers", // by jtreg
"-Xlog:cds",
"Hello");
out.shouldContain(UNABLE_TO_USE_ARCHIVE);