Skip to content

Commit 801bf15

Browse files
committed
8332105: Exploded JDK does not include CDS
Reviewed-by: dholmes, iklam
1 parent c94af6f commit 801bf15

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

src/hotspot/share/prims/whitebox.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
#include "cds/filemap.hpp"
3030
#include "cds/heapShared.hpp"
3131
#include "cds/metaspaceShared.hpp"
32+
#include "classfile/classLoader.hpp"
3233
#include "classfile/classLoaderDataGraph.hpp"
3334
#include "classfile/classLoaderStats.hpp"
3435
#include "classfile/classPrinter.hpp"
@@ -2115,7 +2116,10 @@ WB_END
21152116

21162117
WB_ENTRY(jboolean, WB_IsCDSIncluded(JNIEnv* env))
21172118
#if INCLUDE_CDS
2118-
return true;
2119+
// An exploded build inhibits use of CDS. Therefore, for the
2120+
// purpose of testing, the JVM can be treated as not having CDS
2121+
// built in at all.
2122+
return ClassLoader::has_jrt_entry();
21192123
#else
21202124
return false;
21212125
#endif // INCLUDE_CDS

test/hotspot/jtreg/runtime/CompressedOops/CompressedCPUSpecificClassSpaceReservation.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
* @summary Test the various CPU-specific reservation schemes
2727
* @requires vm.bits == 64 & !vm.graal.enabled & vm.debug == true
2828
* @requires vm.flagless
29+
* @requires vm.cds
2930
* @requires (os.family != "windows") & (os.family != "aix")
3031
* @library /test/lib
3132
* @modules java.base/jdk.internal.misc

0 commit comments

Comments
 (0)