# HG changeset patch # User Josef Eisl # Date 1421686828 -3600 # Node ID 9afe8fbe088c4567546fa468fb9bcdd1f368a5d6 # Parent 0e9ae9a7e675efe9f30d4040258dcddf66f9cf8c Add -G:[-/+]PrintIdealGraph option. diff -r 0e9ae9a7e675 -r 9afe8fbe088c graal/com.oracle.graal.compiler.common/src/com/oracle/graal/compiler/common/GraalOptions.java --- a/graal/com.oracle.graal.compiler.common/src/com/oracle/graal/compiler/common/GraalOptions.java Tue Jan 20 16:53:28 2015 +0100 +++ b/graal/com.oracle.graal.compiler.common/src/com/oracle/graal/compiler/common/GraalOptions.java Mon Jan 19 18:00:28 2015 +0100 @@ -172,6 +172,9 @@ @Option(help = "Enable dumping LIR, register allocation and code generation info to the C1Visualizer.", type = OptionType.Debug) public static final OptionValue PrintBackendCFG = new OptionValue<>(true); + @Option(help = "Enable dumping to the IdealGraphVisualizer.", type = OptionType.Debug) + public static final OptionValue PrintIdealGraph = new OptionValue<>(true); + @Option(help = "", type = OptionType.Debug) public static final OptionValue PrintIdealGraphFile = new OptionValue<>(false); diff -r 0e9ae9a7e675 -r 9afe8fbe088c graal/com.oracle.graal.printer/src/com/oracle/graal/printer/GraphPrinterDumpHandler.java --- a/graal/com.oracle.graal.printer/src/com/oracle/graal/printer/GraphPrinterDumpHandler.java Tue Jan 20 16:53:28 2015 +0100 +++ b/graal/com.oracle.graal.printer/src/com/oracle/graal/printer/GraphPrinterDumpHandler.java Mon Jan 19 18:00:28 2015 +0100 @@ -152,7 +152,7 @@ @Override public void dump(Object object, final String message) { - if (object instanceof Graph) { + if (object instanceof Graph && PrintIdealGraph.getValue()) { ensureInitialized(); if (printer == null) { return;