Mercurial > hg > graal-compiler
changeset 17337:8043c997764d
Truffle: fix dump output for truffle compilations.
author | Christian Humer <christian.humer@gmail.com> |
---|---|
date | Fri, 03 Oct 2014 23:44:49 +0200 |
parents | 329eee851ee1 |
children | 1778c3208bc5 |
files | graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/PartialEvaluator.java graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/TruffleTreeDumpHandler.java |
diffstat | 2 files changed, 12 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/PartialEvaluator.java Fri Oct 03 09:56:14 2014 -0700 +++ b/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/PartialEvaluator.java Fri Oct 03 23:44:49 2014 +0200 @@ -97,7 +97,7 @@ final StructuredGraph graph = truffleCache.createRootGraph(callTarget.toString()); assert graph != null : "no graph for root method"; - try (Scope s = Debug.scope("CreateGraph", graph); Indent indent = Debug.logAndIndent("createGraph %s", graph.method())) { + try (Scope s = Debug.scope("CreateGraph", graph); Indent indent = Debug.logAndIndent("createGraph %s", graph)) { // Canonicalize / constant propagate. PhaseContext baseContext = new PhaseContext(providers, assumptions); @@ -330,12 +330,16 @@ } private StructuredGraph createInlineGraph(PhaseContext phaseContext, Assumptions assumptions, TruffleInliningCache cache, InliningDecision decision) { - OptimizedCallTarget target = decision.getTarget(); - StructuredGraph inlineGraph = truffleCache.createInlineGraph(target.toString()); - injectConstantCallTarget(inlineGraph, decision.getTarget(), phaseContext); - expandTree(inlineGraph, assumptions); - expandDirectCalls(inlineGraph, assumptions, cache, decision); - return inlineGraph; + try (Scope s = Debug.scope("GuestLanguageInlinedGraph", new DebugDumpScope(decision.getTarget().toString()))) { + OptimizedCallTarget target = decision.getTarget(); + StructuredGraph inlineGraph = truffleCache.createInlineGraph(target.toString()); + injectConstantCallTarget(inlineGraph, decision.getTarget(), phaseContext); + expandTree(inlineGraph, assumptions); + expandDirectCalls(inlineGraph, assumptions, cache, decision); + return inlineGraph; + } catch (Throwable e) { + throw Debug.handle(e); + } } private OptimizedDirectCallNode resolveConstantCallNode(MethodCallTargetNode methodCallTargetNode) {
--- a/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/TruffleTreeDumpHandler.java Fri Oct 03 09:56:14 2014 -0700 +++ b/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/TruffleTreeDumpHandler.java Fri Oct 03 23:44:49 2014 +0200 @@ -50,6 +50,7 @@ } private static void dumpFullTree(final GraphPrintVisitor visitor, final String message, final OptimizedCallTarget oct) { + visitor.setChildSupplier(new ChildSupplier() { public Object startNode(Object callNode) {