# HG changeset patch # User Tom Rodriguez # Date 1452633287 28800 # Node ID cbe77f332543e3c4c9aa998fd98ced1b86c78ed9 # Parent 7c0a2761a932c23adef323f5e7f4d562baef2e0e Update jvmci import: Add support for passing back bailout messages diff -r 7c0a2761a932 -r cbe77f332543 graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/CompilationTask.java --- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/CompilationTask.java Tue Jan 12 18:45:24 2016 +0100 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/CompilationTask.java Tue Jan 12 13:14:47 2016 -0800 @@ -35,6 +35,7 @@ import jdk.vm.ci.code.BailoutException; import jdk.vm.ci.code.CodeCacheProvider; +import jdk.vm.ci.code.CompilationRequestFailure; import jdk.vm.ci.code.CompilationResult; import jdk.vm.ci.code.InstalledCode; import jdk.vm.ci.hotspot.HotSpotCodeCacheProvider; @@ -153,7 +154,7 @@ public static final DebugTimer CodeInstallationTime = Debug.timer("CodeInstallation"); @SuppressWarnings("try") - public void runCompilation() { + public CompilationRequestFailure runCompilation() { HotSpotVMConfig config = jvmciRuntime.getConfig(); final long threadId = Thread.currentThread().getId(); long startCompilationTime = System.nanoTime(); @@ -169,7 +170,7 @@ // 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; + return null; } CompilationResult result = null; @@ -224,6 +225,7 @@ } } stats.finish(method, installedCode); + return null; } catch (BailoutException bailout) { BAILOUTS.increment(); if (ExitVMOnBailout.getValue()) { @@ -234,6 +236,10 @@ TTY.out.println(method.format("Bailout in %H.%n(%p)")); bailout.printStackTrace(TTY.out); } + /* + * Treat bailouts as retryable. + */ + return new CompilationRequestFailure(bailout.getMessage(), true); } catch (Throwable t) { // Log a failure event. CompilerFailureEvent event = eventProvider.newCompilerFailureEvent(); @@ -244,6 +250,11 @@ } handleException(t); + /* + * Treat random exceptions from the compiler as indicating a problem compiling this + * method. + */ + return new CompilationRequestFailure(t.getMessage(), false); } finally { try { int compiledBytecodes = 0; diff -r 7c0a2761a932 -r cbe77f332543 graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotGraalCompiler.java --- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotGraalCompiler.java Tue Jan 12 18:45:24 2016 +0100 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotGraalCompiler.java Tue Jan 12 13:14:47 2016 -0800 @@ -29,6 +29,7 @@ import jdk.vm.ci.code.CallingConvention; import jdk.vm.ci.code.CallingConvention.Type; import jdk.vm.ci.code.CompilationRequest; +import jdk.vm.ci.code.CompilationRequestFailure; import jdk.vm.ci.code.CompilationResult; import jdk.vm.ci.hotspot.HotSpotCodeCacheProvider; import jdk.vm.ci.hotspot.HotSpotCompilationRequest; @@ -84,7 +85,7 @@ @Override @SuppressWarnings("try") - public void compileMethod(CompilationRequest request) { + public CompilationRequestFailure compileMethod(CompilationRequest request) { // Ensure a debug configuration for this thread is initialized if (Debug.isEnabled() && DebugScope.getConfig() == null) { DebugEnvironment.initialize(TTY.out); @@ -92,7 +93,7 @@ CompilationTask task = new CompilationTask(jvmciRuntime, this, (HotSpotCompilationRequest) request, true, true); try (DebugConfigScope dcs = Debug.setConfig(new TopLevelDebugConfig())) { - task.runCompilation(); + return task.runCompilation(); } } diff -r 7c0a2761a932 -r cbe77f332543 mx.graal/suite.py --- a/mx.graal/suite.py Tue Jan 12 18:45:24 2016 +0100 +++ b/mx.graal/suite.py Tue Jan 12 13:14:47 2016 -0800 @@ -39,7 +39,7 @@ { "name" : "jvmci", "optional" : "true", - "version" : "7d02b40973092b688f7d941ffb3a479b41f14bd7", + "version" : "d88299d598d6acd9197f9cea455ea40d1a2492aa", "urls" : [ {"url" : "http://lafo.ssw.uni-linz.ac.at/hg/graal-jvmci-8", "kind" : "hg"}, {"url" : "https://curio.ssw.jku.at/nexus/content/repositories/snapshots", "kind" : "binary"},