8240691: ClhsdbCDSJstackPrintAll incorrectly thinks CDS is in use

Fix by checking "UseSharedSpaces = false" for CDS enabled.

Reviewed-by: iklam
This commit is contained in:
Yumin Qi 2020-03-10 11:52:53 -07:00
parent 02916dbb0b
commit 0e3529ad10
3 changed files with 3 additions and 9 deletions

View File

@ -1990,12 +1990,6 @@ WB_END
WB_ENTRY(jboolean, WB_IsCDSIncludedInVmBuild(JNIEnv* env)) WB_ENTRY(jboolean, WB_IsCDSIncludedInVmBuild(JNIEnv* env))
#if INCLUDE_CDS #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; return true;
#else #else
return false; return false;

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2018, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -163,7 +163,7 @@ public class ClhsdbCDSCore {
throw new SkippedException("Could not determine the UseSharedSpaces value"); throw new SkippedException("Could not determine the UseSharedSpaces value");
} }
if (!useSharedSpacesOutput.contains("true")) { if (useSharedSpacesOutput.contains("UseSharedSpaces = false")) {
// CDS archive is not mapped. Skip the rest of the test. // CDS archive is not mapped. Skip the rest of the test.
cleanup(); cleanup();
throw new SkippedException("The CDS archive is not mapped"); throw new SkippedException("The CDS archive is not mapped");

View File

@ -69,7 +69,7 @@ public class ClhsdbCDSJstackPrintAll {
throw new SkippedException("Could not determine the UseSharedSpaces value"); throw new SkippedException("Could not determine the UseSharedSpaces value");
} }
if (!useSharedSpacesOutput.contains("true")) { if (useSharedSpacesOutput.contains("UseSharedSpaces = false")) {
// CDS archive is not mapped. Skip the rest of the test. // CDS archive is not mapped. Skip the rest of the test.
LingeredApp.stopApp(theApp); LingeredApp.stopApp(theApp);
throw new SkippedException("The CDS archive is not mapped"); throw new SkippedException("The CDS archive is not mapped");