--- a/src/hotspot/share/jvmci/jvmci_globals.cpp Fri Jun 15 08:28:08 2018 -0700
+++ b/src/hotspot/share/jvmci/jvmci_globals.cpp Fri Jun 15 09:16:48 2018 -0700
@@ -25,6 +25,7 @@
#include "precompiled.hpp"
#include "jvm.h"
#include "jvmci/jvmci_globals.hpp"
+#include "gc/shared/gcConfig.hpp"
#include "utilities/defaultStream.hpp"
#include "runtime/globals_extension.hpp"
@@ -113,3 +114,13 @@
#undef CHECK_NOT_SET
return true;
}
+void JVMCIGlobals::check_jvmci_supported_gc() {
+ if (EnableJVMCI) {
+ // Check if selected GC is supported by JVMCI and Java compiler
+ if (!(UseSerialGC || UseParallelGC || UseParallelOldGC || UseG1GC)) {
+ 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);
+ }
+ }
+}