Mercurial > hg > truffle
changeset 16607:07de1d5d53ef
make scheduling before dumping optional to speed up dumping
author | Tom Rodriguez <tom.rodriguez@oracle.com> |
---|---|
date | Mon, 28 Jul 2014 13:52:26 -0700 |
parents | 7036c4594919 |
children | 19410ce05a68 |
files | graal/com.oracle.graal.compiler.common/src/com/oracle/graal/compiler/common/GraalOptions.java graal/com.oracle.graal.printer/src/com/oracle/graal/printer/BinaryGraphPrinter.java graal/com.oracle.graal.printer/src/com/oracle/graal/printer/IdealGraphPrinter.java |
diffstat | 3 files changed, 16 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/graal/com.oracle.graal.compiler.common/src/com/oracle/graal/compiler/common/GraalOptions.java Mon Jul 28 13:51:36 2014 -0700 +++ b/graal/com.oracle.graal.compiler.common/src/com/oracle/graal/compiler/common/GraalOptions.java Mon Jul 28 13:52:26 2014 -0700 @@ -150,6 +150,8 @@ public static final OptionValue<Integer> PrintIdealGraphPort = new OptionValue<>(4444); @Option(help = "") public static final OptionValue<Integer> PrintBinaryGraphPort = new OptionValue<>(4445); + @Option(help = "") + public static final OptionValue<Boolean> PrintIdealGraphSchedule = new OptionValue<>(false); // Other printing settings @Option(help = "")
--- a/graal/com.oracle.graal.printer/src/com/oracle/graal/printer/BinaryGraphPrinter.java Mon Jul 28 13:51:36 2014 -0700 +++ b/graal/com.oracle.graal.printer/src/com/oracle/graal/printer/BinaryGraphPrinter.java Mon Jul 28 13:52:26 2014 -0700 @@ -129,10 +129,12 @@ private void writeGraph(Graph graph, SchedulePhase predefinedSchedule) throws IOException { SchedulePhase schedule = predefinedSchedule; if (schedule == null) { - try { - schedule = new SchedulePhase(); - schedule.apply((StructuredGraph) graph); - } catch (Throwable t) { + if (PrintIdealGraphSchedule.getValue()) { + try { + schedule = new SchedulePhase(); + schedule.apply((StructuredGraph) graph); + } catch (Throwable t) { + } } } ControlFlowGraph cfg = schedule == null ? null : schedule.getCFG();
--- a/graal/com.oracle.graal.printer/src/com/oracle/graal/printer/IdealGraphPrinter.java Mon Jul 28 13:51:36 2014 -0700 +++ b/graal/com.oracle.graal.printer/src/com/oracle/graal/printer/IdealGraphPrinter.java Mon Jul 28 13:52:26 2014 -0700 @@ -22,6 +22,8 @@ */ package com.oracle.graal.printer; +import static com.oracle.graal.compiler.common.GraalOptions.*; + import java.io.*; import java.util.*; import java.util.Map.Entry; @@ -87,10 +89,12 @@ Set<Node> noBlockNodes = new HashSet<>(); SchedulePhase schedule = predefinedSchedule; if (schedule == null && tryToSchedule) { - try { - schedule = new SchedulePhase(); - schedule.apply((StructuredGraph) graph); - } catch (Throwable t) { + if (PrintIdealGraphSchedule.getValue()) { + try { + schedule = new SchedulePhase(); + schedule.apply((StructuredGraph) graph); + } catch (Throwable t) { + } } } ControlFlowGraph cfg = schedule == null ? null : schedule.getCFG();