8332105: Exploded JDK does not include CDS

Reviewed-by: dholmes, iklam
This commit is contained in:
Thomas Stuefe 2024-06-17 17:27:01 +00:00
parent c94af6f943
commit 801bf15f02
2 changed files with 6 additions and 1 deletions

View File

@ -29,6 +29,7 @@
#include "cds/filemap.hpp"
#include "cds/heapShared.hpp"
#include "cds/metaspaceShared.hpp"
#include "classfile/classLoader.hpp"
#include "classfile/classLoaderDataGraph.hpp"
#include "classfile/classLoaderStats.hpp"
#include "classfile/classPrinter.hpp"
@ -2115,7 +2116,10 @@ WB_END
WB_ENTRY(jboolean, WB_IsCDSIncluded(JNIEnv* env))
#if INCLUDE_CDS
return true;
// An exploded build inhibits use of CDS. Therefore, for the
// purpose of testing, the JVM can be treated as not having CDS
// built in at all.
return ClassLoader::has_jrt_entry();
#else
return false;
#endif // INCLUDE_CDS

View File

@ -26,6 +26,7 @@
* @summary Test the various CPU-specific reservation schemes
* @requires vm.bits == 64 & !vm.graal.enabled & vm.debug == true
* @requires vm.flagless
* @requires vm.cds
* @requires (os.family != "windows") & (os.family != "aix")
* @library /test/lib
* @modules java.base/jdk.internal.misc