changeset 3031:963174f9cd8e

IdealGraphVisualizer: add textual representation and coloring scheme for the Graal compiler and remove Maxine-specific code
author Peter Hofer <peter.hofer@jku.at>
date Mon, 20 Jun 2011 17:30:15 +0200
parents 7f807764e7fc
children 82898994df70 546dc7e1b184
files graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/debug/IdealGraphPrinter.java src/share/tools/IdealGraphVisualizer/Graal/build.xml src/share/tools/IdealGraphVisualizer/Graal/manifest.mf src/share/tools/IdealGraphVisualizer/Graal/nbproject/build-impl.xml src/share/tools/IdealGraphVisualizer/Graal/nbproject/genfiles.properties src/share/tools/IdealGraphVisualizer/Graal/nbproject/project.properties src/share/tools/IdealGraphVisualizer/Graal/nbproject/project.xml src/share/tools/IdealGraphVisualizer/Graal/nbproject/suite.properties src/share/tools/IdealGraphVisualizer/Graal/src/META-INF/services/com.sun.hotspot.igv.graphtotext.services.GraphToTextConverter src/share/tools/IdealGraphVisualizer/Graal/src/com/sun/hotspot/igv/graal/Bundle.properties src/share/tools/IdealGraphVisualizer/Graal/src/com/sun/hotspot/igv/graal/GraalGraphToTextConverter.java 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/layer.xml src/share/tools/IdealGraphVisualizer/Maxine/build.xml src/share/tools/IdealGraphVisualizer/Maxine/manifest.mf src/share/tools/IdealGraphVisualizer/Maxine/nbproject/build-impl.xml src/share/tools/IdealGraphVisualizer/Maxine/nbproject/genfiles.properties src/share/tools/IdealGraphVisualizer/Maxine/nbproject/project.properties src/share/tools/IdealGraphVisualizer/Maxine/nbproject/project.xml src/share/tools/IdealGraphVisualizer/Maxine/nbproject/suite.properties src/share/tools/IdealGraphVisualizer/Maxine/src/META-INF/services/com.sun.hotspot.igv.graphtotext.services.GraphToTextConverter src/share/tools/IdealGraphVisualizer/Maxine/src/com/sun/hotspot/igv/maxine/Bundle.properties src/share/tools/IdealGraphVisualizer/Maxine/src/com/sun/hotspot/igv/maxine/CirGraphToTextConverter.java src/share/tools/IdealGraphVisualizer/Maxine/src/com/sun/hotspot/igv/maxine/filters/color.filter src/share/tools/IdealGraphVisualizer/Maxine/src/com/sun/hotspot/igv/maxine/filters/structural.filter src/share/tools/IdealGraphVisualizer/Maxine/src/com/sun/hotspot/igv/maxine/layer.xml src/share/tools/IdealGraphVisualizer/nbproject/project.properties
diffstat 27 files changed, 348 insertions(+), 376 deletions(-) [+]
line wrap: on
line diff
--- a/graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/debug/IdealGraphPrinter.java	Mon Jun 20 14:29:16 2011 +0200
+++ b/graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/debug/IdealGraphPrinter.java	Mon Jun 20 17:30:15 2011 +0200
@@ -87,7 +87,7 @@
      */
     public void beginGroup(String name, String shortName, int bci) {
         stream.println("<group>");
-        stream.printf(" <properties><p name='name'>%s</p></properties>%n", escape(name));
+        stream.printf(" <properties><p name='name'>%s</p><p name='origin'>Graal</p></properties>%n", escape(name));
         stream.printf(" <method name='%s' shortName='%s' bci='%d'/>%n", escape(name), escape(shortName), bci);
     }
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/tools/IdealGraphVisualizer/Graal/build.xml	Mon Jun 20 17:30:15 2011 +0200
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- You may freely edit this file. See harness/README in the NetBeans platform -->
+<!-- for some information on what you could do (e.g. targets to override). -->
+<!-- If you delete this file and reopen the project it will be recreated. -->
+<project name="com.sun.hotspot.igv.graal" default="netbeans" basedir=".">
+    <description>Builds, tests, and runs the project com.sun.hotspot.igv.graal.</description>
+    <import file="nbproject/build-impl.xml"/>
+</project>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/tools/IdealGraphVisualizer/Graal/manifest.mf	Mon Jun 20 17:30:15 2011 +0200
@@ -0,0 +1,6 @@
+Manifest-Version: 1.0
+OpenIDE-Module: com.sun.hotspot.igv.graal
+OpenIDE-Module-Layer: com/sun/hotspot/igv/graal/layer.xml
+OpenIDE-Module-Localizing-Bundle: com/sun/hotspot/igv/graal/Bundle.properties
+OpenIDE-Module-Specification-Version: 1.0
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/tools/IdealGraphVisualizer/Graal/nbproject/build-impl.xml	Mon Jun 20 17:30:15 2011 +0200
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+*** GENERATED FROM project.xml - DO NOT EDIT  ***
+***         EDIT ../build.xml INSTEAD         ***
+-->
+<project name="com.sun.hotspot.igv.graal-impl" basedir="..">
+    <fail message="Please build using Ant 1.7.1 or higher.">
+        <condition>
+            <not>
+                <antversion atleast="1.7.1"/>
+            </not>
+        </condition>
+    </fail>
+    <property file="nbproject/private/suite-private.properties"/>
+    <property file="nbproject/suite.properties"/>
+    <fail unless="suite.dir">You must set 'suite.dir' to point to your containing module suite</fail>
+    <property file="${suite.dir}/nbproject/private/platform-private.properties"/>
+    <property file="${suite.dir}/nbproject/platform.properties"/>
+    <macrodef name="property" uri="http://www.netbeans.org/ns/nb-module-project/2">
+        <attribute name="name"/>
+        <attribute name="value"/>
+        <sequential>
+            <property name="@{name}" value="${@{value}}"/>
+        </sequential>
+    </macrodef>
+    <macrodef name="evalprops" uri="http://www.netbeans.org/ns/nb-module-project/2">
+        <attribute name="property"/>
+        <attribute name="value"/>
+        <sequential>
+            <property name="@{property}" value="@{value}"/>
+        </sequential>
+    </macrodef>
+    <property file="${user.properties.file}"/>
+    <nbmproject2:property name="harness.dir" value="nbplatform.${nbplatform.active}.harness.dir" xmlns:nbmproject2="http://www.netbeans.org/ns/nb-module-project/2"/>
+    <nbmproject2:property name="nbplatform.active.dir" value="nbplatform.${nbplatform.active}.netbeans.dest.dir" xmlns:nbmproject2="http://www.netbeans.org/ns/nb-module-project/2"/>
+    <nbmproject2:evalprops property="cluster.path.evaluated" value="${cluster.path}" xmlns:nbmproject2="http://www.netbeans.org/ns/nb-module-project/2"/>
+    <fail message="Path to 'platform' cluster missing in $${cluster.path} property or using corrupt Netbeans Platform (missing harness).">
+        <condition>
+            <not>
+                <contains string="${cluster.path.evaluated}" substring="platform"/>
+            </not>
+        </condition>
+    </fail>
+    <import file="${harness.dir}/build.xml"/>
+</project>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/tools/IdealGraphVisualizer/Graal/nbproject/genfiles.properties	Mon Jun 20 17:30:15 2011 +0200
@@ -0,0 +1,8 @@
+build.xml.data.CRC32=abfbe04d
+build.xml.script.CRC32=3534d355
+build.xml.stylesheet.CRC32=a56c6a5b@1.45.1
+# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
+# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
+nbproject/build-impl.xml.data.CRC32=abfbe04d
+nbproject/build-impl.xml.script.CRC32=2867f2d5
+nbproject/build-impl.xml.stylesheet.CRC32=238281d1@1.45.1
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/tools/IdealGraphVisualizer/Graal/nbproject/project.properties	Mon Jun 20 17:30:15 2011 +0200
@@ -0,0 +1,2 @@
+javac.source=1.5
+javac.compilerargs=-Xlint -Xlint:-serial
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/tools/IdealGraphVisualizer/Graal/nbproject/project.xml	Mon Jun 20 17:30:15 2011 +0200
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://www.netbeans.org/ns/project/1">
+    <type>org.netbeans.modules.apisupport.project</type>
+    <configuration>
+        <data xmlns="http://www.netbeans.org/ns/nb-module-project/3">
+            <code-name-base>com.sun.hotspot.igv.graal</code-name-base>
+            <suite-component/>
+            <module-dependencies>
+                <dependency>
+                    <code-name-base>com.sun.hotspot.igv.data</code-name-base>
+                    <build-prerequisite/>
+                    <compile-dependency/>
+                    <run-dependency>
+                        <specification-version>1.0</specification-version>
+                    </run-dependency>
+                </dependency>
+                <dependency>
+                    <code-name-base>com.sun.hotspot.igv.graph</code-name-base>
+                    <build-prerequisite/>
+                    <compile-dependency/>
+                    <run-dependency>
+                        <specification-version>1.0</specification-version>
+                    </run-dependency>
+                </dependency>
+                <dependency>
+                    <code-name-base>com.sun.hotspot.igv.graphtotext</code-name-base>
+                    <build-prerequisite/>
+                    <compile-dependency/>
+                    <run-dependency>
+                        <specification-version>1.0</specification-version>
+                    </run-dependency>
+                </dependency>
+                <dependency>
+                    <code-name-base>com.sun.hotspot.igv.structuredtext</code-name-base>
+                    <build-prerequisite/>
+                    <compile-dependency/>
+                    <run-dependency>
+                        <specification-version>1.0</specification-version>
+                    </run-dependency>
+                </dependency>
+            </module-dependencies>
+            <public-packages/>
+        </data>
+    </configuration>
+</project>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/tools/IdealGraphVisualizer/Graal/nbproject/suite.properties	Mon Jun 20 17:30:15 2011 +0200
@@ -0,0 +1,1 @@
+suite.dir=${basedir}/..
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/tools/IdealGraphVisualizer/Graal/src/META-INF/services/com.sun.hotspot.igv.graphtotext.services.GraphToTextConverter	Mon Jun 20 17:30:15 2011 +0200
@@ -0,0 +1,1 @@
+com.sun.hotspot.igv.graal.GraalGraphToTextConverter
\ 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/Bundle.properties	Mon Jun 20 17:30:15 2011 +0200
@@ -0,0 +1,1 @@
+OpenIDE-Module-Name=Graal Compiler Support
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/tools/IdealGraphVisualizer/Graal/src/com/sun/hotspot/igv/graal/GraalGraphToTextConverter.java	Mon Jun 20 17:30:15 2011 +0200
@@ -0,0 +1,209 @@
+/*
+ * Copyright (c) 1998, 2007, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package com.sun.hotspot.igv.graal;
+
+import com.sun.hotspot.igv.data.InputBlock;
+import com.sun.hotspot.igv.data.InputEdge;
+import com.sun.hotspot.igv.data.InputGraph;
+import com.sun.hotspot.igv.data.InputNode;
+import com.sun.hotspot.igv.data.Properties;
+import com.sun.hotspot.igv.data.Properties.PropertyMatcher;
+import com.sun.hotspot.igv.graph.Diagram;
+import com.sun.hotspot.igv.graph.Figure;
+import com.sun.hotspot.igv.graphtotext.services.GraphToTextConverter;
+import com.sun.hotspot.igv.structuredtext.Element;
+import com.sun.hotspot.igv.structuredtext.MultiElement;
+import com.sun.hotspot.igv.structuredtext.SimpleElement;
+import com.sun.hotspot.igv.structuredtext.StructuredText;
+import java.awt.Color;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import javax.swing.text.Style;
+import javax.swing.text.StyleConstants;
+import javax.swing.text.StyleContext;
+
+/**
+ * @author Peter Hofer
+ * @author Thomas Wuerthinger
+ */
+public class GraalGraphToTextConverter implements GraphToTextConverter {
+
+    private Map<InputNode, Set<Figure>> map;
+    private Map<InputNode, List<InputEdge>> incomingEdges;
+    private Map<InputNode, List<InputEdge>> outgoingEdges;
+    private InputGraph graph;
+
+    private Collection<InputNode> sortNodes(Collection<InputNode> nodes) {
+        List<InputNode> result = new ArrayList<InputNode>(nodes);
+        Collections.sort(result, InputNode.getPropertyComparator("idx"));
+        return result;
+    }
+
+    public StructuredText convert(InputGraph graph, Diagram diagram) {
+
+        this.graph = graph;
+        map = diagram.calcSourceToFigureRelation();
+
+        incomingEdges = graph.findAllIngoingEdges();
+        outgoingEdges = graph.findAllOutgoingEdges();
+
+        final StructuredText result = new StructuredText(graph.getName());
+
+        for (InputBlock b : graph.getBlocks()) {
+            result.addChild(new SimpleElement("Block " + b.getName() + "\n"));
+            for (InputNode n : sortNodes(b.getNodes())) {
+                result.addChild(getNodeElement(n));
+            }
+        }
+
+        boolean first = true;
+        for (InputNode n : sortNodes(graph.getNodes())) {
+            if (graph.getBlock(n) == null) {
+                if (first) {
+                    first = false;
+                    result.addChild(new SimpleElement("No block: \n"));
+                }
+                result.addChild(getNodeElement(n));
+            }
+        }
+
+        return result;
+    }
+
+    private Element getNodeNameElement(InputNode n) {
+
+        final SimpleElement name = new SimpleElement(n.getProperties().get("idx") + " " + n.getProperties().get("name"), calcStyle(n));
+        name.addSource(n.getId());
+        return name;
+    }
+
+    private Element getNodeShortElement(InputNode n) {
+        final SimpleElement id = new SimpleElement(n.getProperties().get("idx"), calcStyle(n));
+        id.addSource(n.getId());
+        return id;
+    }
+
+    private Element getNodeElement(InputNode n) {
+
+        final MultiElement result = new MultiElement();
+
+        result.print("\t");
+        result.addChild(getNodeNameElement(n));
+
+        result.print(" :::");
+
+        // NOTE: lists in ingoingEdges/outgoingEdges are sorted by from/to slot
+        //       and for slots that are connected with multiple edges, by
+        //       from/to node
+
+        int succCount = Integer.parseInt(n.getProperties().get("successorCount"));
+        InputEdge[] outgoing = outgoingEdges.get(n).toArray(new InputEdge[0]);
+
+        int i = 0;
+        if (outgoing.length > 0 && outgoing[0].getFromIndex() < succCount) {
+            // Node has successors (each connected to a different slot)
+            result.print("  Succ = [");
+            while (i < outgoing.length && outgoing[i].getFromIndex() < succCount) {
+                result.print(" ");
+                result.addChild(getNodeShortElement(graph.getNode(outgoing[i].getTo())));
+                result.print(" ");
+                i++;
+            }
+            result.print("]");
+        }
+        if (i < outgoing.length) {
+            // Node has usages (all connected to a single slot)
+            result.print("  Usages = [");
+            while (i < outgoing.length) {
+                result.print(" ");
+                result.addChild(getNodeShortElement(graph.getNode(outgoing[i].getTo())));
+                result.print(" ");
+                i++;
+            }
+            result.print("]");
+        }
+
+        int predCount = Integer.parseInt(n.getProperties().get("predecessorCount"));
+        InputEdge[] incoming = incomingEdges.get(n).toArray(new InputEdge[0]);
+
+        int j = 0;
+        if (incoming.length > 0 && incoming[0].getToIndex() < predCount) {
+            // Node has predecessors (each connected to a different slot)
+            result.print("  Pred = [");
+            while (j < incoming.length && incoming[j].getToIndex() < predCount) {
+                result.print(" ");
+                result.addChild(getNodeShortElement(graph.getNode(incoming[j].getFrom())));
+                result.print(" ");
+                j++;
+            }
+            result.print("]");
+        }
+        if (j < incoming.length) {
+            // Node has inputs (each connected to a different slot)
+            result.print("  Inputs = [");
+            while (j < incoming.length) {
+                result.print(" ");
+                result.addChild(getNodeShortElement(graph.getNode(incoming[j].getFrom())));
+                result.print(" ");
+                j++;
+            }
+            result.print("]");
+        }
+
+        result.print("\n");
+        return result;
+    }
+    private static final PropertyMatcher MATCHER = new Properties.StringPropertyMatcher("origin", "Graal");
+
+    public boolean canConvert(InputGraph graph) {
+        return graph.getGroup().getProperties().selectSingle(MATCHER) != null;
+    }
+
+    private Color calcColor(InputNode node) {
+        Set<Figure> figureSet = this.map.get(node);
+        if (figureSet != null && figureSet.size() == 1) {
+            return figureSet.iterator().next().getColor();
+        } else {
+            return Color.WHITE;
+        }
+    }
+
+    private Color lessColor(Color c) {
+        return new Color(255 - (255 - c.getRed()) / 4, 255 - (255 - c.getGreen()) / 4, 255 - (255 - c.getBlue()) / 4);
+    }
+
+    private Style calcStyle(InputNode node) {
+        Color c = calcColor(node);
+        Style defaultStyle = StyleContext.getDefaultStyleContext().getStyle(StyleContext.DEFAULT_STYLE);
+        Style newStyle = StyleContext.getDefaultStyleContext().addStyle(null, defaultStyle);
+
+        StyleConstants.setBackground(newStyle, lessColor(c));
+        return newStyle;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/tools/IdealGraphVisualizer/Graal/src/com/sun/hotspot/igv/graal/filters/color.filter	Mon Jun 20 17:30:15 2011 +0200
@@ -0,0 +1,9 @@
+colorize("name", ".*", white);
+colorize("name", "StartNode|EndNode|LoopBegin|LoopEnd|Return", red);
+colorize("name", "Phi:.*", magenta);
+colorize("name", "FrameState@.*", new java.awt.Color(0.5, 0.8, 1.0));
+colorize("name", "If", pink);
+colorize("name", "const.*", new java.awt.Color(0.7, 0.7, 0.7));
+colorize("name", "Local", new java.awt.Color(0.85, 0.85, 0.85));
+colorize("name", "\\+|-|\\*|/", cyan);
+colorize("name", "Comp .*", yellow);
\ 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/layer.xml	Mon Jun 20 17:30:15 2011 +0200
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!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>
+    </folder>
+</filesystem>
--- a/src/share/tools/IdealGraphVisualizer/Maxine/build.xml	Mon Jun 20 14:29:16 2011 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- You may freely edit this file. See harness/README in the NetBeans platform -->
-<!-- for some information on what you could do (e.g. targets to override). -->
-<!-- If you delete this file and reopen the project it will be recreated. -->
-<project name="com.sun.hotspot.igv.maxine" default="netbeans" basedir=".">
-    <description>Builds, tests, and runs the project com.sun.hotspot.igv.maxine.</description>
-    <import file="nbproject/build-impl.xml"/>
-</project>
--- a/src/share/tools/IdealGraphVisualizer/Maxine/manifest.mf	Mon Jun 20 14:29:16 2011 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,6 +0,0 @@
-Manifest-Version: 1.0
-OpenIDE-Module: com.sun.hotspot.igv.maxine
-OpenIDE-Module-Layer: com/sun/hotspot/igv/maxine/layer.xml
-OpenIDE-Module-Localizing-Bundle: com/sun/hotspot/igv/maxine/Bundle.properties
-OpenIDE-Module-Specification-Version: 1.0
-
--- a/src/share/tools/IdealGraphVisualizer/Maxine/nbproject/build-impl.xml	Mon Jun 20 14:29:16 2011 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,45 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-*** GENERATED FROM project.xml - DO NOT EDIT  ***
-***         EDIT ../build.xml INSTEAD         ***
--->
-<project name="com.sun.hotspot.igv.maxine-impl" basedir="..">
-    <fail message="Please build using Ant 1.7.1 or higher.">
-        <condition>
-            <not>
-                <antversion atleast="1.7.1"/>
-            </not>
-        </condition>
-    </fail>
-    <property file="nbproject/private/suite-private.properties"/>
-    <property file="nbproject/suite.properties"/>
-    <fail unless="suite.dir">You must set 'suite.dir' to point to your containing module suite</fail>
-    <property file="${suite.dir}/nbproject/private/platform-private.properties"/>
-    <property file="${suite.dir}/nbproject/platform.properties"/>
-    <macrodef name="property" uri="http://www.netbeans.org/ns/nb-module-project/2">
-        <attribute name="name"/>
-        <attribute name="value"/>
-        <sequential>
-            <property name="@{name}" value="${@{value}}"/>
-        </sequential>
-    </macrodef>
-    <macrodef name="evalprops" uri="http://www.netbeans.org/ns/nb-module-project/2">
-        <attribute name="property"/>
-        <attribute name="value"/>
-        <sequential>
-            <property name="@{property}" value="@{value}"/>
-        </sequential>
-    </macrodef>
-    <property file="${user.properties.file}"/>
-    <nbmproject2:property name="harness.dir" value="nbplatform.${nbplatform.active}.harness.dir" xmlns:nbmproject2="http://www.netbeans.org/ns/nb-module-project/2"/>
-    <nbmproject2:property name="nbplatform.active.dir" value="nbplatform.${nbplatform.active}.netbeans.dest.dir" xmlns:nbmproject2="http://www.netbeans.org/ns/nb-module-project/2"/>
-    <nbmproject2:evalprops property="cluster.path.evaluated" value="${cluster.path}" xmlns:nbmproject2="http://www.netbeans.org/ns/nb-module-project/2"/>
-    <fail message="Path to 'platform' cluster missing in $${cluster.path} property or using corrupt Netbeans Platform (missing harness).">
-        <condition>
-            <not>
-                <contains string="${cluster.path.evaluated}" substring="platform"/>
-            </not>
-        </condition>
-    </fail>
-    <import file="${harness.dir}/build.xml"/>
-</project>
--- a/src/share/tools/IdealGraphVisualizer/Maxine/nbproject/genfiles.properties	Mon Jun 20 14:29:16 2011 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,5 +0,0 @@
-# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
-# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
-nbproject/build-impl.xml.data.CRC32=44af392c
-nbproject/build-impl.xml.script.CRC32=1a1fcc4d
-nbproject/build-impl.xml.stylesheet.CRC32=238281d1@1.45.1
--- a/src/share/tools/IdealGraphVisualizer/Maxine/nbproject/project.properties	Mon Jun 20 14:29:16 2011 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,2 +0,0 @@
-javac.source=1.5
-javac.compilerargs=-Xlint -Xlint:-serial
--- a/src/share/tools/IdealGraphVisualizer/Maxine/nbproject/project.xml	Mon Jun 20 14:29:16 2011 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,45 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://www.netbeans.org/ns/project/1">
-    <type>org.netbeans.modules.apisupport.project</type>
-    <configuration>
-        <data xmlns="http://www.netbeans.org/ns/nb-module-project/3">
-            <code-name-base>com.sun.hotspot.igv.maxine</code-name-base>
-            <suite-component/>
-            <module-dependencies>
-                <dependency>
-                    <code-name-base>com.sun.hotspot.igv.data</code-name-base>
-                    <build-prerequisite/>
-                    <compile-dependency/>
-                    <run-dependency>
-                        <specification-version>1.0</specification-version>
-                    </run-dependency>
-                </dependency>
-                <dependency>
-                    <code-name-base>com.sun.hotspot.igv.graph</code-name-base>
-                    <build-prerequisite/>
-                    <compile-dependency/>
-                    <run-dependency>
-                        <specification-version>1.0</specification-version>
-                    </run-dependency>
-                </dependency>
-                <dependency>
-                    <code-name-base>com.sun.hotspot.igv.graphtotext</code-name-base>
-                    <build-prerequisite/>
-                    <compile-dependency/>
-                    <run-dependency>
-                        <specification-version>1.0</specification-version>
-                    </run-dependency>
-                </dependency>
-                <dependency>
-                    <code-name-base>com.sun.hotspot.igv.structuredtext</code-name-base>
-                    <build-prerequisite/>
-                    <compile-dependency/>
-                    <run-dependency>
-                        <specification-version>1.0</specification-version>
-                    </run-dependency>
-                </dependency>
-            </module-dependencies>
-            <public-packages/>
-        </data>
-    </configuration>
-</project>
--- a/src/share/tools/IdealGraphVisualizer/Maxine/nbproject/suite.properties	Mon Jun 20 14:29:16 2011 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-suite.dir=${basedir}/..
--- a/src/share/tools/IdealGraphVisualizer/Maxine/src/META-INF/services/com.sun.hotspot.igv.graphtotext.services.GraphToTextConverter	Mon Jun 20 14:29:16 2011 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-com.sun.hotspot.igv.maxine.CirGraphToTextConverter
\ No newline at end of file
--- a/src/share/tools/IdealGraphVisualizer/Maxine/src/com/sun/hotspot/igv/maxine/Bundle.properties	Mon Jun 20 14:29:16 2011 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-OpenIDE-Module-Name=Maxine
--- a/src/share/tools/IdealGraphVisualizer/Maxine/src/com/sun/hotspot/igv/maxine/CirGraphToTextConverter.java	Mon Jun 20 14:29:16 2011 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,229 +0,0 @@
-/*
- * Copyright (c) 1998, 2007, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.hotspot.igv.maxine;
-
-import com.sun.hotspot.igv.data.InputEdge;
-import com.sun.hotspot.igv.data.InputGraph;
-import com.sun.hotspot.igv.data.InputNode;
-import com.sun.hotspot.igv.data.Pair;
-import com.sun.hotspot.igv.data.Properties;
-import com.sun.hotspot.igv.data.Properties.PropertyMatcher;
-import com.sun.hotspot.igv.data.Properties.RegexpPropertyMatcher;
-import com.sun.hotspot.igv.data.Properties.StringPropertyMatcher;
-import com.sun.hotspot.igv.graph.Diagram;
-import com.sun.hotspot.igv.graph.Figure;
-import com.sun.hotspot.igv.graphtotext.BFSGraphToTextConverter;
-import com.sun.hotspot.igv.graphtotext.services.AbstractGraphToTextVisitor;
-import com.sun.hotspot.igv.graphtotext.services.GraphToTextConverter;
-import com.sun.hotspot.igv.graphtotext.services.GraphToTextVisitor;
-import com.sun.hotspot.igv.structuredtext.Element;
-import com.sun.hotspot.igv.structuredtext.MultiElement;
-import com.sun.hotspot.igv.structuredtext.SimpleElement;
-import com.sun.hotspot.igv.structuredtext.StructuredText;
-import java.awt.Color;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import javax.swing.text.Style;
-import javax.swing.text.StyleConstants;
-import javax.swing.text.StyleContext;
-
-/**
- *
- * @author Thomas Wuerthinger
- */
-public class CirGraphToTextConverter implements GraphToTextConverter {
-
-    private static final String CALL_OPERATOR = " \u2022 ";
-
-    private Map<InputNode, Set<Figure>> map;
-    private InputGraph graph;
-
-    public StructuredText convert(InputGraph graph, Diagram diagram) {
-        map = diagram.calcSourceToFigureRelation();
-        this.graph = graph;
-        
-        BFSGraphToTextConverter converter = new BFSGraphToTextConverter(nodeVisitor);
-        converter.registerVisitor(localVariableVisitor, new StringPropertyMatcher("type", "LocalVariable"));
-        converter.registerVisitor(parameterVisitor, new StringPropertyMatcher("type", "Parameter"));
-        converter.registerVisitor(closureVisitor, new RegexpPropertyMatcher("type", "Closure"));
-        converter.registerVisitor(continuationVisitor, new RegexpPropertyMatcher("type", "Continuation"));
-        converter.registerVisitor(callVisitor, new RegexpPropertyMatcher("type", "Call"));
-        converter.registerVisitor(blockVisitor, new RegexpPropertyMatcher("type", "Block"));
-        return converter.convert(graph, diagram);
-    }
-    private GraphToTextVisitor nodeVisitor = new NodeVisitor();
-    private GraphToTextVisitor localVariableVisitor = new NodeVisitor();
-    private GraphToTextVisitor parameterVisitor = new NodeVisitor();
-    private GraphToTextVisitor closureVisitor = new ClosureVisitor("proc");
-    private GraphToTextVisitor continuationVisitor = new ClosureVisitor("cont");
-    private GraphToTextVisitor callVisitor = new CallVisitor();
-    private GraphToTextVisitor blockVisitor = new BlockVisitor();
-
-    private void printOffset(List<InputEdge> path, MultiElement elem) {
-        for (int i = 0; i < path.size(); i++) {
-            InputEdge cur = path.get(i);
-            InputNode fromNode = graph.getNode(cur.getFrom());
-            SimpleElement simpleElem = new SimpleElement(" ", calcStyle(fromNode));
-            simpleElem.addSource(fromNode.getId());
-            elem.addChild(simpleElem);
-        }
-    }
-
-    private class NodeVisitor extends AbstractGraphToTextVisitor {
-
-        @Override
-        public Element cyclicVisit(InputNode node, List<InputEdge> path) {
-            SimpleElement elem = new SimpleElement(node.getProperties().get("name"), calcStyle(node));
-            elem.addSource(node.getId());
-            return elem;
-        }
-    }
-    
-    private Color calcColor(InputNode node) {
-        Set<Figure> figureSet = this.map.get(node);
-        if(figureSet != null && figureSet.size() == 1) {
-            return figureSet.iterator().next().getColor();
-        } else {
-            return Color.WHITE;
-        }
-    }
-    
-    private Style calcStyle(InputNode node) {
-        Color c = calcColor(node);
-        Style defaultStyle = StyleContext.getDefaultStyleContext().getStyle(StyleContext.DEFAULT_STYLE);
-        Style newStyle = StyleContext.getDefaultStyleContext().addStyle(null, defaultStyle);
-        
-        StyleConstants.setBackground(newStyle, c);
-        return newStyle;
-    }
-
-    private class ClosureVisitor extends AbstractGraphToTextVisitor {
-
-        private String label;
-
-        protected String getLabel(InputNode node) {
-                return label;
-        }
-
-        public ClosureVisitor(String label) {
-            this.label = label;
-        }
-
-        @Override
-        public Element cyclicVisit(InputNode node, List<InputEdge> path) {
-            return SimpleElement.EMPTY;
-        }
-
-        @Override
-        public Element visit(InputNode node, List<InputEdge> path, List<Pair<InputEdge, Element>> children) {
-            MultiElement e = new MultiElement(calcStyle(node));
-            e.print("{", node.getId());
-            e.print(getLabel(node), node.getId());
-
-            e.print("[", node.getId());
-            for (int i = 0; i < children.size() - 1; i++) {
-                Pair<InputEdge, Element> p = children.get(i);
-                e.addChild(p.getRight());
-                if (i != children.size() - 2) {
-                    e.print("|", node.getId());
-                }
-            }
-            e.print("]", node.getId());
-            e.print(CALL_OPERATOR, node.getId());
-            e.println();
-            List<InputEdge> newPath = new ArrayList<InputEdge>(path);
-            newPath.add(children.get(children.size() - 1).getLeft());
-            printOffset(newPath, e);
-            
-            MultiElement childElement = new MultiElement("...");
-            childElement.addChild(children.get(children.size() - 1).getRight());
-            e.addChild(childElement);
-            
-            e.println();
-            printOffset(path, e);
-            e.print("}", node.getId());
-            MultiElement resElem = new MultiElement();
-            resElem.addChild(e);
-            return resElem;
-        }
-    }
-
-    private class CallVisitor extends AbstractGraphToTextVisitor {
-
-        @Override
-        public Element cyclicVisit(InputNode node, List<InputEdge> path) {
-            return SimpleElement.EMPTY;
-        }
-
-        @Override
-        public Element visit(InputNode node, List<InputEdge> path, List<Pair<InputEdge, Element>> children) {
-            MultiElement e = new MultiElement(calcStyle(node));
-            e.print("(", node.getId());
-            for (int i = 0; i < children.size(); i++) {
-                Pair<InputEdge, Element> p = children.get(i);
-                e.addChild(p.getRight());
-                if (i != children.size() - 1) {
-                    e.print("|", node.getId());
-                }
-            }
-            e.print(")", node.getId());
-            MultiElement resElem = new MultiElement();
-            resElem.addChild(e);
-            return resElem;
-        }
-    }
-
-    private class BlockVisitor extends ClosureVisitor {
-
-        public BlockVisitor() {
-            super("block");
-        }
-        
-        @Override
-        protected String getLabel(InputNode node) {
-            return node.getProperties().get("name");
-        }
-
-        @Override
-        public Element cyclicVisit(InputNode node, List<InputEdge> path) {
-            MultiElement e = new MultiElement(calcStyle(node));
-            e.print(getLabel(node), node);
-            return e;
-        }
-
-        @Override
-        public Element visit(InputNode node, List<InputEdge> path, List<Pair<InputEdge, Element>> children) {
-            return super.visit(node, path, children);
-        }
-    }
-
-    private static final PropertyMatcher MATCHER = new Properties.RegexpPropertyMatcher("type", ".*CIR.*");
-    public boolean canConvert(InputGraph graph) {
-        return graph.getGroup().getProperties().selectSingle(MATCHER) != null;
-    }
-}
--- a/src/share/tools/IdealGraphVisualizer/Maxine/src/com/sun/hotspot/igv/maxine/filters/color.filter	Mon Jun 20 14:29:16 2011 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,9 +0,0 @@
-colorize("name", ".*", white);
-colorize("name", "cont",new  java.awt.Color(1.0, 0.8, 0.8));
-colorize("name", "proc", new  java.awt.Color(0.8, 0.8, 1.0));
-colorize("name", "call", new  java.awt.Color(0.9, 0.9, 0.9));
-colorize("name", "block", new java.awt.Color(1.0, 1.0, 0.6)); 
-colorize("class", ".*Constant", new java.awt.Color(0.7, 1.0, 0.9)); 
-colorize("class", ".*Parameter", new java.awt.Color(0.9, 1.0, 0.7)); 
-colorize("class", ".*Variable", new java.awt.Color(0.7, 1.0, 0.7)); 
-colorize("class", ".*cir\.snippet.*", yellow); 
\ No newline at end of file
--- a/src/share/tools/IdealGraphVisualizer/Maxine/src/com/sun/hotspot/igv/maxine/filters/structural.filter	Mon Jun 20 14:29:16 2011 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,7 +0,0 @@
-split("class", ".*Constant");
-split("class", ".*Variable");
-split("class", ".*Parameter");
-split("class", ".*Snippet");
-split("class", ".*Switch");
-split("class", ".*cir\.snippet.*"); 
-split("class", ".*cir\.builtin.*"); 
\ No newline at end of file
--- a/src/share/tools/IdealGraphVisualizer/Maxine/src/com/sun/hotspot/igv/maxine/layer.xml	Mon Jun 20 14:29:16 2011 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE filesystem PUBLIC "-//NetBeans//DTD Filesystem 1.1//EN" "http://www.netbeans.org/dtds/filesystem-1_1.dtd">
-<filesystem>
-      <folder name="Filters">
-        <file name="Maxine CIR Coloring" url="filters/color.filter">
-            <attr name="enabled" boolvalue="false"/>
-        </file>
-        <file name="Maxine CIR Structural Filter" url="filters/structural.filter">
-            <attr name="enabled" boolvalue="false"/>
-            <attr name="after" stringvalue="Maxine CIR Coloring"/>
-        </file>
-    </folder>	
-</filesystem>
--- a/src/share/tools/IdealGraphVisualizer/nbproject/project.properties	Mon Jun 20 14:29:16 2011 +0200
+++ b/src/share/tools/IdealGraphVisualizer/nbproject/project.properties	Mon Jun 20 17:30:15 2011 +0200
@@ -21,12 +21,12 @@
     ${project.com.sun.hotspot.igv.servercompilerscheduler}:\
     ${project.com.sun.hotspot.igv.filterwindow}:\
     ${project.com.sun.hotspot.igv.graphtotext}:\
-    ${project.com.sun.hotspot.igv.maxine}:\
     ${project.com.sun.hotspot.igv.java6scriptingproxy}:\
     ${project.com.sun.hotspot.igv.graphtexteditor}:\
     ${project.com.sun.hotspot.igv.structuredtext}:\
     ${project.com.sun.hotspot.igv.texteditor}:\
-    ${project.com.sun.hotspot.igv.selectioncoordinator}
+    ${project.com.sun.hotspot.igv.selectioncoordinator}:\
+    ${project.com.sun.hotspot.igv.graal}
 project.com.sun.hotspot.connection=NetworkConnection
 project.com.sun.hotspot.igv.bytecodes=Bytecodes
 project.com.sun.hotspot.igv.controlflow=ControlFlow
@@ -35,13 +35,13 @@
 project.com.sun.hotspot.igv.difference=Difference
 project.com.sun.hotspot.igv.filter=Filter
 project.com.sun.hotspot.igv.filterwindow=FilterWindow
+project.com.sun.hotspot.igv.graal=Graal
 project.com.sun.hotspot.igv.graph=Graph
 project.com.sun.hotspot.igv.graphtexteditor=GraphTextEditor
 project.com.sun.hotspot.igv.graphtotext=GraphToText
 project.com.sun.hotspot.igv.hierarchicallayout=HierarchicalLayout
 project.com.sun.hotspot.igv.java6scriptingproxy=Java6ScriptingProxy
 project.com.sun.hotspot.igv.layout=Layout
-project.com.sun.hotspot.igv.maxine=Maxine
 project.com.sun.hotspot.igv.rhino=RhinoScriptEngineProxy
 project.com.sun.hotspot.igv.selectioncoordinator=SelectionCoordinator
 project.com.sun.hotspot.igv.servercompilerscheduler=ServerCompiler