# HG changeset patch # User Tom Rodriguez # Date 1410256319 -7200 # Node ID 1b7b4eb6e0efad267e1aaec27a06e6aebadc1f2b # Parent 6e45ae59781cb5784d78ad62b847f27e1f778509 Enable scheduling when dumping for DumpOnError diff -r 6e45ae59781c -r 1b7b4eb6e0ef graal/com.oracle.graal.printer/src/com/oracle/graal/printer/BinaryGraphPrinter.java --- a/graal/com.oracle.graal.printer/src/com/oracle/graal/printer/BinaryGraphPrinter.java Tue Sep 09 11:37:57 2014 +0200 +++ b/graal/com.oracle.graal.printer/src/com/oracle/graal/printer/BinaryGraphPrinter.java Tue Sep 09 11:51:59 2014 +0200 @@ -33,6 +33,7 @@ import com.oracle.graal.api.meta.*; import com.oracle.graal.compiler.common.cfg.*; +import com.oracle.graal.debug.*; import com.oracle.graal.graph.*; import com.oracle.graal.nodes.*; import com.oracle.graal.nodes.cfg.*; @@ -128,7 +129,8 @@ private void writeGraph(Graph graph, SchedulePhase predefinedSchedule) throws IOException { SchedulePhase schedule = predefinedSchedule; if (schedule == null) { - if (PrintIdealGraphSchedule.getValue()) { + // Also provide a schedule when an error occurs + if (PrintIdealGraphSchedule.getValue() || Debug.contextLookup(Throwable.class) != null) { try { schedule = new SchedulePhase(); schedule.apply((StructuredGraph) graph);