Mercurial > hg > truffle
changeset 5477:a7c79bcf55ac
Add snippet graph to the scope so that they can be dumped on error
author | Gilles Duboscq <duboscq@ssw.jku.at> |
---|---|
date | Fri, 01 Jun 2012 17:22:59 +0200 |
parents | 13327e512621 |
children | 4a99bfc329f0 |
files | graal/com.oracle.graal.snippets/src/com/oracle/graal/snippets/Snippets.java |
diffstat | 1 files changed, 2 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/graal/com.oracle.graal.snippets/src/com/oracle/graal/snippets/Snippets.java Fri Jun 01 16:35:31 2012 +0200 +++ b/graal/com.oracle.graal.snippets/src/com/oracle/graal/snippets/Snippets.java Fri Jun 01 17:22:59 2012 +0200 @@ -91,13 +91,12 @@ } private static StructuredGraph buildSnippetGraph(final RiResolvedMethod snippetRiMethod, final GraalRuntime runtime, final CiTarget target, final BoxingMethodPool pool) { - return Debug.scope("BuildSnippetGraph", snippetRiMethod, new Callable<StructuredGraph>() { - + final StructuredGraph graph = new StructuredGraph(snippetRiMethod); + return Debug.scope("BuildSnippetGraph", new Object[] {snippetRiMethod, graph}, new Callable<StructuredGraph>() { @Override public StructuredGraph call() throws Exception { GraphBuilderConfiguration config = GraphBuilderConfiguration.getSnippetDefault(); GraphBuilderPhase graphBuilder = new GraphBuilderPhase(runtime, config, OptimisticOptimizations.NONE); - StructuredGraph graph = new StructuredGraph(snippetRiMethod); graphBuilder.apply(graph); Debug.dump(graph, "%s: %s", snippetRiMethod.name(), GraphBuilderPhase.class.getSimpleName());