8310108: Skip ReplaceCriticalClassesForSubgraphs when EnableJVMCI is specified

Reviewed-by: dnsimon, iklam
This commit is contained in:
Yudi Zheng 2023-07-13 07:20:18 +00:00 committed by Doug Simon
parent a38a421f62
commit 1b0dd7c254
4 changed files with 18 additions and 0 deletions

View File

@ -62,6 +62,7 @@ requires.properties= \
vm.gc.ZGenerational \
vm.gc.ZSinglegen \
vm.jvmci \
vm.jvmci.enabled \
vm.emulatedClient \
vm.cpu.features \
vm.pageSize \

View File

@ -27,6 +27,7 @@
* @summary Tests how CDS works when critical library classes are replaced with JVMTI ClassFileLoadHook
* @library /test/lib
* @requires vm.cds.write.archived.java.heap
* @requires !vm.jvmci.enabled
* @build jdk.test.whitebox.WhiteBox
* @run driver jdk.test.lib.helpers.ClassFileInstaller -jar whitebox.jar jdk.test.whitebox.WhiteBox
* @run main/othervm/native ReplaceCriticalClassesForSubgraphs

View File

@ -72,6 +72,7 @@ requires.properties= \
vm.hasSA \
vm.hasJFR \
vm.jvmci \
vm.jvmci.enabled \
vm.jvmti \
docker.support \
release.implementor \

View File

@ -102,6 +102,7 @@ public class VMProps implements Callable<Map<String, String>> {
map.put("vm.simpleArch", this::vmArch);
map.put("vm.debug", this::vmDebug);
map.put("vm.jvmci", this::vmJvmci);
map.put("vm.jvmci.enabled", this::vmJvmciEnabled);
map.put("vm.emulatedClient", this::vmEmulatedClient);
// vm.hasSA is "true" if the VM contains the serviceability agent
// and jhsdb.
@ -266,6 +267,20 @@ public class VMProps implements Callable<Map<String, String>> {
return "true";
}
/**
* @return true if JVMCI is enabled
*/
protected String vmJvmciEnabled() {
// builds with jvmci have this flag
if ("false".equals(vmJvmci())) {
return "false";
}
return "" + Compiler.isJVMCIEnabled();
}
/**
* @return true if VM runs in emulated-client mode and false otherwise.
*/