# HG changeset patch # User Gilles Duboscq # Date 1338564179 -7200 # Node ID a7c79bcf55acb278d9c939d8be302205ec2e48ea # Parent 13327e512621edcfd2cf8fdf1733027d652cc702 Add snippet graph to the scope so that they can be dumped on error diff -r 13327e512621 -r a7c79bcf55ac graal/com.oracle.graal.snippets/src/com/oracle/graal/snippets/Snippets.java --- 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() { - + final StructuredGraph graph = new StructuredGraph(snippetRiMethod); + return Debug.scope("BuildSnippetGraph", new Object[] {snippetRiMethod, graph}, new Callable() { @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());