changeset 17403:79ac83ff7a99

Truffle: fix TraceTruffleCompilationCallTree for context sensitive inlining.
author Christian Humer <christian.humer@gmail.com>
date Thu, 09 Oct 2014 17:25:59 +0200
parents ce7058005115
children b725292b8a11
files graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/OptimizedCallTargetLog.java
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- 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<TruffleInlining> 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 = "<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", "<indirect>", new LinkedHashMap<String, Object>());
+                    int depth = decisionStack == null ? 0 : decisionStack.size() - 1;
+                    log((depth * 2), "opt call tree", "<indirect>", new LinkedHashMap<String, Object>());
                 }
                 return true;
             }