# HG changeset patch # User Christian Humer # Date 1412868359 -7200 # Node ID 79ac83ff7a99b18704759e742cc1ba7767b17df4 # Parent ce70580051153e3a903e9078b7c50dfc3f125ea2 Truffle: fix TraceTruffleCompilationCallTree for context sensitive inlining. diff -r ce7058005115 -r 79ac83ff7a99 graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/OptimizedCallTargetLog.java --- a/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/OptimizedCallTargetLog.java Thu Oct 09 17:25:53 2014 +0200 +++ b/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/OptimizedCallTargetLog.java Thu Oct 09 17:25:59 2014 +0200 @@ -82,7 +82,7 @@ public boolean visit(List decisionStack, Node node) { if (node instanceof OptimizedDirectCallNode) { OptimizedDirectCallNode callNode = ((OptimizedDirectCallNode) node); - int depth = decisionStack == null ? 0 : decisionStack.size(); + int depth = decisionStack == null ? 0 : decisionStack.size() - 1; TruffleInliningDecision inlining = CallTreeNodeVisitor.getCurrentInliningDecision(decisionStack); String dispatched = ""; if (inlining != null && inlining.isInline()) { @@ -92,10 +92,10 @@ addASTSizeProperty(callNode.getCurrentCallTarget(), properties); properties.putAll(callNode.getCurrentCallTarget().getDebugProperties()); properties.put("Stamp", callNode.getCurrentCallTarget().getArgumentStamp()); - log((depth * 2), "call", callNode.getCurrentCallTarget().toString() + dispatched, properties); + log((depth * 2), "opt call tree", callNode.getCurrentCallTarget().toString() + dispatched, properties); } else if (node instanceof OptimizedIndirectCallNode) { - int depth = decisionStack == null ? 0 : decisionStack.size(); - log((depth * 2), "call", "", new LinkedHashMap()); + int depth = decisionStack == null ? 0 : decisionStack.size() - 1; + log((depth * 2), "opt call tree", "", new LinkedHashMap()); } return true; }