< prev index next >
src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/CompilationTask.java
Print this page
@@ -51,10 +51,11 @@
import jdk.vm.ci.code.CodeCacheProvider;
import jdk.vm.ci.hotspot.EventProvider;
import jdk.vm.ci.hotspot.HotSpotCompilationRequest;
import jdk.vm.ci.hotspot.HotSpotCompilationRequestResult;
import jdk.vm.ci.hotspot.HotSpotInstalledCode;
+import jdk.vm.ci.hotspot.HotSpotJVMCICompilerFactory;
import jdk.vm.ci.hotspot.HotSpotJVMCIRuntimeProvider;
import jdk.vm.ci.hotspot.HotSpotNmethod;
import jdk.vm.ci.hotspot.HotSpotResolvedJavaMethod;
import jdk.vm.ci.runtime.JVMCICompiler;
import jdk.vm.ci.services.JVMCIServiceLocator;
@@ -143,11 +144,11 @@
/*
* Automatically exit VM on non-bailout during bootstrap or when asserts are enabled but
* respect CompilationFailureAction if it has been explicitly set.
*/
if (actionKey == CompilationFailureAction && !actionKey.hasBeenSet(values)) {
- if (Assertions.ENABLED || compiler.getGraalRuntime().isBootstrapping()) {
+ if (Assertions.assertionsEnabled() || compiler.getGraalRuntime().isBootstrapping()) {
return ExitVM;
}
}
return super.lookupAction(values, actionKey);
}
@@ -303,10 +304,14 @@
// JVMCI compiles are always at the highest compile level, even in non-tiered mode so we
// only need to check for that value.
if (method.hasCodeAtLevel(entryBCI, config.compilationLevelFullOptimization)) {
return HotSpotCompilationRequestResult.failure("Already compiled", false);
}
+ if (HotSpotGraalCompilerFactory.checkGraalCompileOnlyFilter(method.getDeclaringClass().toJavaName(), method.getName(), method.getSignature().toString(),
+ HotSpotJVMCICompilerFactory.CompilationLevel.FullOptimization) != HotSpotJVMCICompilerFactory.CompilationLevel.FullOptimization) {
+ return HotSpotCompilationRequestResult.failure("GraalCompileOnly excluded", false);
+ }
}
HotSpotCompilationWrapper compilation = new HotSpotCompilationWrapper(compilationEvent);
try (DebugCloseable a = CompilationTime.start(debug)) {
return compilation.run(debug);
< prev index next >