# HG changeset patch # User Lukas Stadler # Date 1398241579 -7200 # Node ID be2434ceaffaad7c7255af7c9479f0958b7577fa # Parent 2a6897a82a7ebb74f0253bab1cc0c1637ede6d93 additional scope in inlining to get caller graph upon exceptions diff -r 2a6897a82a7e -r be2434ceaffa graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/InliningPhase.java --- a/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/InliningPhase.java Wed Apr 23 10:26:19 2014 +0200 +++ b/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/InliningPhase.java Wed Apr 23 10:26:19 2014 +0200 @@ -174,28 +174,30 @@ Mark markBeforeInlining = callerGraph.getMark(); InlineInfo callee = calleeInfo.callee(); try { - List invokeUsages = callee.invoke().asNode().usages().snapshot(); - callee.inline(new Providers(context), callerAssumptions); - callerAssumptions.record(calleeInfo.assumptions()); - metricInliningRuns.increment(); - Debug.dump(callerGraph, "after %s", callee); + try (Scope scope = Debug.scope("doInline", callerGraph)) { + List invokeUsages = callee.invoke().asNode().usages().snapshot(); + callee.inline(new Providers(context), callerAssumptions); + callerAssumptions.record(calleeInfo.assumptions()); + metricInliningRuns.increment(); + Debug.dump(callerGraph, "after %s", callee); - if (OptCanonicalizer.getValue()) { - Mark markBeforeCanonicalization = callerGraph.getMark(); - canonicalizer.applyIncremental(callerGraph, context, invokeUsages, markBeforeInlining); + if (OptCanonicalizer.getValue()) { + Mark markBeforeCanonicalization = callerGraph.getMark(); + canonicalizer.applyIncremental(callerGraph, context, invokeUsages, markBeforeInlining); - // process invokes that are possibly created during canonicalization - for (Node newNode : callerGraph.getNewNodes(markBeforeCanonicalization)) { - if (newNode instanceof Invoke) { - callerGraphInfo.pushInvoke((Invoke) newNode); + // process invokes that are possibly created during canonicalization + for (Node newNode : callerGraph.getNewNodes(markBeforeCanonicalization)) { + if (newNode instanceof Invoke) { + callerGraphInfo.pushInvoke((Invoke) newNode); + } } } - } + + callerGraphInfo.computeProbabilities(); - callerGraphInfo.computeProbabilities(); - - inliningCount++; - metricInliningPerformed.increment(); + inliningCount++; + metricInliningPerformed.increment(); + } } catch (BailoutException bailout) { throw bailout; } catch (AssertionError | RuntimeException e) {