# HG changeset patch # User Gilles Duboscq # Date 1328791852 -3600 # Node ID c106c5e4f6219186707e81a61efe7fad7dabe592 # Parent 5d8eaed30aee7289bdaeff4f76a857ea7961297b# Parent 1b2abdc91451f6b193982e700f315ee3313bec84 Merge diff -r 1b2abdc91451 -r c106c5e4f621 graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/GraalOptions.java --- a/graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/GraalOptions.java Thu Feb 09 13:21:42 2012 +0100 +++ b/graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/GraalOptions.java Thu Feb 09 13:50:52 2012 +0100 @@ -131,7 +131,6 @@ public static boolean UseExceptionProbability = true; public static boolean AllowExplicitExceptionChecks = true; public static boolean OmitHotExceptionStacktrace = ____; - public static int MatureInvocationCount = 100; public static boolean GenSafepoints = true; public static boolean GenLoopSafepoints = true; public static boolean UseTypeCheckHints = true; diff -r 1b2abdc91451 -r c106c5e4f621 graal/com.oracle.max.graal.java/src/com/oracle/max/graal/java/BciBlockMapping.java --- a/graal/com.oracle.max.graal.java/src/com/oracle/max/graal/java/BciBlockMapping.java Thu Feb 09 13:21:42 2012 +0100 +++ b/graal/com.oracle.max.graal.java/src/com/oracle/max/graal/java/BciBlockMapping.java Thu Feb 09 13:50:52 2012 +0100 @@ -388,7 +388,7 @@ case PUTFIELD: case GETFIELD: { if (GraalOptions.AllowExplicitExceptionChecks) { - return profilingInfo.getExceptionSeen(bci) != RiExceptionSeen.FALSE; + return profilingInfo.getExceptionSeen(bci) == RiExceptionSeen.TRUE; } } } diff -r 1b2abdc91451 -r c106c5e4f621 graal/com.oracle.max.graal.java/src/com/oracle/max/graal/java/GraphBuilderPhase.java --- a/graal/com.oracle.max.graal.java/src/com/oracle/max/graal/java/GraphBuilderPhase.java Thu Feb 09 13:21:42 2012 +0100 +++ b/graal/com.oracle.max.graal.java/src/com/oracle/max/graal/java/GraphBuilderPhase.java Thu Feb 09 13:50:52 2012 +0100 @@ -322,10 +322,12 @@ private BeginNode handleException(ValueNode exceptionObject, int bci) { assert bci == FrameState.BEFORE_BCI || bci == bci() : "invalid bci"; - if (GraalOptions.UseExceptionProbability && method.invocationCount() > GraalOptions.MatureInvocationCount) { + if (GraalOptions.UseExceptionProbability) { // be conservative if information was not recorded (could result in endless recompiles otherwise) - if (bci != FrameState.BEFORE_BCI && exceptionObject == null && profilingInfo.getExceptionSeen(bci) == RiExceptionSeen.FALSE) { + if (bci != FrameState.BEFORE_BCI && exceptionObject == null && profilingInfo.getExceptionSeen(bci) != RiExceptionSeen.TRUE) { return null; + } else { + Debug.log("Creating exception edges at %d, exception object=%s, exception seen=%s", bci, exceptionObject, profilingInfo.getExceptionSeen(bci)); } } diff -r 1b2abdc91451 -r c106c5e4f621 graal/com.oracle.max.graal.tests/src/com/oracle/max/graal/compiler/tests/DegeneratedLoopsTest.java --- a/graal/com.oracle.max.graal.tests/src/com/oracle/max/graal/compiler/tests/DegeneratedLoopsTest.java Thu Feb 09 13:21:42 2012 +0100 +++ b/graal/com.oracle.max.graal.tests/src/com/oracle/max/graal/compiler/tests/DegeneratedLoopsTest.java Thu Feb 09 13:50:52 2012 +0100 @@ -46,7 +46,7 @@ return 1; } - @Test(expected = AssertionFailedError.class) + @Test public void test1() { test("test1Snippet"); } diff -r 1b2abdc91451 -r c106c5e4f621 graal/com.oracle.max.graal.tests/src/com/oracle/max/graal/compiler/tests/NestedLoopTest.java --- a/graal/com.oracle.max.graal.tests/src/com/oracle/max/graal/compiler/tests/NestedLoopTest.java Thu Feb 09 13:21:42 2012 +0100 +++ b/graal/com.oracle.max.graal.tests/src/com/oracle/max/graal/compiler/tests/NestedLoopTest.java Thu Feb 09 13:50:52 2012 +0100 @@ -33,22 +33,22 @@ @Test public void test1() { - test("test1Snippet", 5, 5, 4); + test("test1Snippet", 1, 2, 2); } @Test public void test2() { - test("test2Snippet", 2, 5, 4); + test("test2Snippet", 1, 2, 2); } @Test public void test3() { - test("test3Snippet", 1, 5, 4); + test("test3Snippet", 1, 2, 2); } @Test public void test4() { - test("test4Snippet", 1, 6, 4); + test("test4Snippet", 1, 3, 2); } @SuppressWarnings("all")