changeset 20055:4042339df317

Improve coloring and filters in IGV.
author Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
date Sat, 28 Mar 2015 20:25:56 +0100
parents c816aca2a3db
children deab98a89238
files graal/com.oracle.graal.printer/src/com/oracle/graal/printer/BinaryGraphPrinter.java src/share/tools/IdealGraphVisualizer/Graal/src/com/sun/hotspot/igv/graal/filters/cfg.filter src/share/tools/IdealGraphVisualizer/Graal/src/com/sun/hotspot/igv/graal/filters/color.filter src/share/tools/IdealGraphVisualizer/Graal/src/com/sun/hotspot/igv/graal/filters/edgeColor.filter src/share/tools/IdealGraphVisualizer/Graal/src/com/sun/hotspot/igv/graal/filters/noframestate.filter src/share/tools/IdealGraphVisualizer/Graal/src/com/sun/hotspot/igv/graal/filters/removeFloating.filter src/share/tools/IdealGraphVisualizer/Graal/src/com/sun/hotspot/igv/graal/filters/removeState.filter src/share/tools/IdealGraphVisualizer/Graal/src/com/sun/hotspot/igv/graal/filters/slots.filter src/share/tools/IdealGraphVisualizer/Graal/src/com/sun/hotspot/igv/graal/layer.xml src/share/tools/IdealGraphVisualizer/ServerCompiler/src/com/sun/hotspot/igv/servercompiler/layer.xml
diffstat 10 files changed, 71 insertions(+), 40 deletions(-) [+]
line wrap: on
line diff
--- 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);
--- 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);
--- 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);
--- 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);
--- 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
--- /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
--- /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
--- 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);
--- 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 @@
 <!DOCTYPE filesystem PUBLIC "-//NetBeans//DTD Filesystem 1.1//EN" "http://www.netbeans.org/dtds/filesystem-1_1.dtd">
 <filesystem>
     <folder name="Filters">
-        <file name="Graal Coloring" url="filters/color.filter">
-            <attr name="enabled" boolvalue="false"/>
+        <file name="Coloring" url="filters/color.filter">
+            <attr name="enabled" boolvalue="true"/>
         </file>
-        
-        <file name="Graal Edge Coloring" url="filters/edgeColor.filter">
-            <attr name="enabled" boolvalue="false"/>
-        </file>
-        
-        <file name="Graal Remove Unconnected Slots" url="filters/slots.filter">
+      
+        <file name="Probability Coloring" url="filters/probability.filter">
             <attr name="enabled" boolvalue="false"/>
         </file>
         
-        <file name="Graal Probability" url="filters/probability.filter">
-            <attr name="enabled" boolvalue="false"/>
-        </file>
-        
-        <file name="Graal Reduce Edges" url="filters/reduceEdges.filter">
+        <file name="Call Graph Coloring" url="filters/callgraph.filter">
             <attr name="enabled" boolvalue="false"/>
         </file>
         
-        <file name="Graal Remove FrameState" url="filters/noframestate.filter">
+        <file name="Reduce Edges" url="filters/reduceEdges.filter">
+            <attr name="enabled" boolvalue="true"/>
+        </file>
+        
+        <file name="Remove State" url="filters/removeState.filter">
             <attr name="enabled" boolvalue="false"/>
         </file>
         
-        <file name="Graal Call Analysis" url="filters/callgraph.filter">
-            <attr name="enabled" boolvalue="false"/>
-        </file>
-        
-        <file name="Graal CFG-only" url="filters/cfg.filter">
+        <file name="Remove Floating" url="filters/removeFloating.filter">
             <attr name="enabled" boolvalue="false"/>
         </file>
     </folder>
--- 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 @@
 <!DOCTYPE filesystem PUBLIC "-//NetBeans//DTD Filesystem 1.1//EN" "http://www.netbeans.org/dtds/filesystem-1_1.dtd">
 <filesystem>
       <folder name="Filters">
+          <!--
         <file name="C2 Basic Coloring" url="filters/color.filter">
             <attr name="enabled" boolvalue="false"/>
         </file>
@@ -25,5 +26,6 @@
             <attr name="enabled" boolvalue="false"/>
             <attr name="after" stringvalue="C2 Remove Filter"/>
         </file>
+        -->
     </folder>	
 </filesystem>