RFR: 8257020: [JVMCI] enable a JVMCICompiler to specify which GCs it supports
Vladimir Kozlov
kvn at openjdk.java.net
Wed Nov 25 01:41:54 UTC 2020
On Tue, 24 Nov 2020 23:46:17 GMT, Doug Simon <dnsimon at openjdk.org> wrote:
> A number of jtreg tests require a specific GC. These tests should be ignored when EnableJVMCI is true and the JVMCI compiler does not support the required GC.
>
> This PR adds `JVMCICompiler.isGCSupported` and makes use of it in `WhiteBox.isGCSupported`.
>
> Prior to this PR, a test requiring a GC not yet supported by a JVMCI compiler fail as follows:
> Error occurred during initialization of VM
> JVMCI Compiler does not support selected GC: epsilon gc
For metropolis I have next code in jvmci_globals.cpp which switch off JVMCI if test uses unsupported GC:
static bool supported_gc() {
return (UseSerialGC || UseParallelGC || UseG1GC);
}
void JVMCIGlobals::check_jvmci_supported_gc() {
if (EnableJVMCI) {
// Check if selected GC is supported by JVMCI and Java compiler
if (!supported_gc()) {
if (FLAG_IS_DEFAULT(UseJVMCINativeLibrary) && !UseJVMCINativeLibrary) { // Just disable Graal when libgraal is present
vm_exit_during_initialization("JVMCI Compiler does not support selected GC", GCConfig::hs_err_name());
}
FLAG_SET_DEFAULT(EnableJVMCI, false);
FLAG_SET_DEFAULT(UseJVMCICompiler, false);
FLAG_SET_DEFAULT(UseJVMCINativeLibrary, false);
}
}
}
-------------
PR: https://git.openjdk.java.net/jdk/pull/1423
More information about the hotspot-dev
mailing list