# HG changeset patch # User Gilles Duboscq # Date 1305215878 -7200 # Node ID 35453d725a2aa4d0ca82e0f207a2d5d165ee5de8 # Parent d8601d421b96e1f0da7da0bb1f16eda2f3527224 Add a BailoutOnException option on C1X to be able to tell expected exceptions (bailouts on jsr etc.) appart from true/unexpected exceptions diff -r d8601d421b96 -r 35453d725a2a graal/GraalCompiler/src/com/sun/c1x/C1XCompilation.java --- a/graal/GraalCompiler/src/com/sun/c1x/C1XCompilation.java Thu May 12 17:17:50 2011 +0200 +++ b/graal/GraalCompiler/src/com/sun/c1x/C1XCompilation.java Thu May 12 17:57:58 2011 +0200 @@ -218,7 +218,11 @@ } catch (CiBailout b) { return new CiResult(null, b, stats); } catch (Throwable t) { - return new CiResult(null, new CiBailout("Exception while compiling: " + method, t), stats); + if (C1XOptions.BailoutOnException) { + return new CiResult(null, new CiBailout("Exception while compiling: " + method, t), stats); + } else { + throw new RuntimeException(t); + } } finally { if (compiler.isObserved()) { compiler.fireCompilationFinished(new CompilationEvent(this)); diff -r d8601d421b96 -r 35453d725a2a graal/GraalCompiler/src/com/sun/c1x/C1XOptions.java --- a/graal/GraalCompiler/src/com/sun/c1x/C1XOptions.java Thu May 12 17:17:50 2011 +0200 +++ b/graal/GraalCompiler/src/com/sun/c1x/C1XOptions.java Thu May 12 17:57:58 2011 +0200 @@ -55,6 +55,7 @@ public static int MethodEndBreakpointGuards = 0; public static boolean ZapStackOnMethodEntry = ____; public static boolean StressLinearScan = ____; + public static boolean BailoutOnException = ____; /** * See {@link Filter#Filter(String, Object)}. diff -r d8601d421b96 -r 35453d725a2a rundacapo.sh --- a/rundacapo.sh Thu May 12 17:17:50 2011 +0200 +++ b/rundacapo.sh Thu May 12 17:57:58 2011 +0200 @@ -15,4 +15,4 @@ echo "DACAPO is not defined. It must point to a Dacapo benchmark directory." exit 1; fi -${JDK7}/bin/java -client -d64 -graal -XX:-C1XBailoutIsFatal -XX:+PrintCompilation -C1X:-QuietBailout -Xms1g -Xmx2g -esa -classpath ${DACAPO}/dacapo-9.12-bach.jar Harness $* +${JDK7}/bin/java -client -d64 -graal -XX:-C1XBailoutIsFatal -XX:-PrintCompilation -C1X:+QuietBailout -Xms1g -Xmx2g -esa -classpath ${DACAPO}/dacapo-9.12-bach.jar Harness $*