# HG changeset patch # User Thomas Wuerthinger # Date 1427570756 -3600 # Node ID 4042339df3173277011e593a8aa3eca7a7d52350 # Parent c816aca2a3dbfa51808beb5106107aaa22a7c6e5 Improve coloring and filters in IGV. diff -r c816aca2a3db -r 4042339df317 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 Sat Mar 28 17:35:14 2015 +0100 +++ b/graal/com.oracle.graal.printer/src/com/oracle/graal/printer/BinaryGraphPrinter.java Sat Mar 28 20:25:56 2015 +0100 @@ -37,7 +37,9 @@ import com.oracle.graal.debug.*; import com.oracle.graal.graph.*; import com.oracle.graal.nodes.*; +import com.oracle.graal.nodes.calc.*; import com.oracle.graal.nodes.cfg.*; +import com.oracle.graal.nodes.spi.*; import com.oracle.graal.phases.graph.*; import com.oracle.graal.phases.schedule.*; @@ -432,6 +434,29 @@ } } } + + if (node instanceof ControlSinkNode) { + props.put("category", "controlSink"); + } else if (node instanceof ControlSplitNode) { + props.put("category", "controlSplit"); + } else if (node instanceof AbstractMergeNode) { + props.put("category", "merge"); + } else if (node instanceof AbstractBeginNode) { + props.put("category", "begin"); + } else if (node instanceof AbstractEndNode) { + props.put("category", "end"); + } else if (node instanceof FixedNode) { + props.put("category", "fixed"); + } else if (node instanceof VirtualState) { + props.put("category", "state"); + } else if (node instanceof PhiNode) { + props.put("category", "phi"); + } else if (node instanceof ProxyNode) { + props.put("category", "proxy"); + } else { + props.put("category", "floating"); + } + writeInt(getNodeId(node)); writePoolObject(nodeClass); writeByte(node.predecessor() == null ? 0 : 1); diff -r c816aca2a3db -r 4042339df317 src/share/tools/IdealGraphVisualizer/Graal/src/com/sun/hotspot/igv/graal/filters/cfg.filter --- a/src/share/tools/IdealGraphVisualizer/Graal/src/com/sun/hotspot/igv/graal/filters/cfg.filter Sat Mar 28 17:35:14 2015 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,2 +0,0 @@ -var f = new com.sun.hotspot.igv.graal.filters.GraalCFGFilter(); -f.apply(graph); diff -r c816aca2a3db -r 4042339df317 src/share/tools/IdealGraphVisualizer/Graal/src/com/sun/hotspot/igv/graal/filters/color.filter --- a/src/share/tools/IdealGraphVisualizer/Graal/src/com/sun/hotspot/igv/graal/filters/color.filter Sat Mar 28 17:35:14 2015 +0100 +++ b/src/share/tools/IdealGraphVisualizer/Graal/src/com/sun/hotspot/igv/graal/filters/color.filter Sat Mar 28 20:25:56 2015 +0100 @@ -1,11 +1,28 @@ -colorize("name", ".*", white); -colorize("name", "Begin|KillingBegin|EndNode|LoopBegin|LoopEnd|LoopExit|Return", orange); -colorize("class", "FrameState", new java.awt.Color(0.5, 0.8, 1.0)); -colorize("name", "If|Merge|(Integer|Type)Switch", pink); -colorize("name", "\\+|-|\\*|/|&|\\||<<|>>|>>>", cyan); -colorize("name", "Virtual.*", green); -colorize("name", "(Φ|Proxy)\(.*\)", magenta); -colorize("name", "(Φ|Proxy)\(.*\) Identity\(.*\)", green); -colorize("name", "C\(.*\)", new java.awt.Color(0.7, 0.7, 0.7)); -colorize("name", "P\(.*\)", new java.awt.Color(0.85, 0.85, 0.85)); -colorize("name", "==|<|InstanceOf", yellow); +var red = new java.awt.Color(240, 59, 32); +var orange = new java.awt.Color(254, 178, 76); +var yellow = new java.awt.Color(255, 237, 160); +var middleBlue = new java.awt.Color(100, 147, 224); +var lightGreen = new java.awt.Color(173, 221, 142); +var lightBlue = new java.awt.Color(200, 200, 250); +var gray = new java.awt.Color(220, 220, 220); +var violet = new java.awt.Color(201, 148, 199); +colorize("category", "controlSink", red); +colorize("category", "controlSplit", red); +colorize("category", "merge", red); +colorize("category", "begin", orange); +colorize("category", "end", orange); +colorize("category", "fixed", yellow); +colorize("category", "state", lightGreen); +colorize("category", "phi", middleBlue); +colorize("category", "proxy", middleBlue); +colorize("category", "floating", lightBlue); +colorize("class", "ConstantLocationNode", gray); +colorize("class", "ParameterNode", gray); +colorize("class", "ConstantNode", gray); +colorize("class", "GuardNode", violet); + +var f = new com.sun.hotspot.igv.graal.filters.GraalEdgeColorFilter(); +f.setUsageColor("Successor", red); +f.setUsageColor("Value", blue); +f.setUsageColor("Memory", new Color(0.0, 0.5, 0.0)); +f.apply(graph); diff -r c816aca2a3db -r 4042339df317 src/share/tools/IdealGraphVisualizer/Graal/src/com/sun/hotspot/igv/graal/filters/edgeColor.filter --- a/src/share/tools/IdealGraphVisualizer/Graal/src/com/sun/hotspot/igv/graal/filters/edgeColor.filter Sat Mar 28 17:35:14 2015 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,5 +0,0 @@ -var f = new com.sun.hotspot.igv.graal.filters.GraalEdgeColorFilter(); -f.setUsageColor("Successor", red); -f.setUsageColor("Value", blue); -f.setUsageColor("Memory", new Color(0.0, 0.5, 0.0)); -f.apply(graph); diff -r c816aca2a3db -r 4042339df317 src/share/tools/IdealGraphVisualizer/Graal/src/com/sun/hotspot/igv/graal/filters/noframestate.filter --- a/src/share/tools/IdealGraphVisualizer/Graal/src/com/sun/hotspot/igv/graal/filters/noframestate.filter Sat Mar 28 17:35:14 2015 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,2 +0,0 @@ -remove("class", "FrameState"); -remove("class", "Virtual.*"); \ No newline at end of file diff -r c816aca2a3db -r 4042339df317 src/share/tools/IdealGraphVisualizer/Graal/src/com/sun/hotspot/igv/graal/filters/removeFloating.filter --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/share/tools/IdealGraphVisualizer/Graal/src/com/sun/hotspot/igv/graal/filters/removeFloating.filter Sat Mar 28 20:25:56 2015 +0100 @@ -0,0 +1,4 @@ +remove("category", "floating"); +remove("category", "state"); +remove("category", "phi"); +remove("category", "proxy"); \ No newline at end of file diff -r c816aca2a3db -r 4042339df317 src/share/tools/IdealGraphVisualizer/Graal/src/com/sun/hotspot/igv/graal/filters/removeState.filter --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/share/tools/IdealGraphVisualizer/Graal/src/com/sun/hotspot/igv/graal/filters/removeState.filter Sat Mar 28 20:25:56 2015 +0100 @@ -0,0 +1,1 @@ +remove("category", "state"); \ No newline at end of file diff -r c816aca2a3db -r 4042339df317 src/share/tools/IdealGraphVisualizer/Graal/src/com/sun/hotspot/igv/graal/filters/slots.filter --- a/src/share/tools/IdealGraphVisualizer/Graal/src/com/sun/hotspot/igv/graal/filters/slots.filter Sat Mar 28 17:35:14 2015 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -removeUnconnectedSlots(true, true); diff -r c816aca2a3db -r 4042339df317 src/share/tools/IdealGraphVisualizer/Graal/src/com/sun/hotspot/igv/graal/layer.xml --- a/src/share/tools/IdealGraphVisualizer/Graal/src/com/sun/hotspot/igv/graal/layer.xml Sat Mar 28 17:35:14 2015 +0100 +++ b/src/share/tools/IdealGraphVisualizer/Graal/src/com/sun/hotspot/igv/graal/layer.xml Sat Mar 28 20:25:56 2015 +0100 @@ -2,35 +2,27 @@ - - + + - - - - - - + + - - - - - + - + + + + + - - - - - + diff -r c816aca2a3db -r 4042339df317 src/share/tools/IdealGraphVisualizer/ServerCompiler/src/com/sun/hotspot/igv/servercompiler/layer.xml --- a/src/share/tools/IdealGraphVisualizer/ServerCompiler/src/com/sun/hotspot/igv/servercompiler/layer.xml Sat Mar 28 17:35:14 2015 +0100 +++ b/src/share/tools/IdealGraphVisualizer/ServerCompiler/src/com/sun/hotspot/igv/servercompiler/layer.xml Sat Mar 28 20:25:56 2015 +0100 @@ -2,6 +2,7 @@ +