changeset 3621:75e92277ad05

Merge
author Lukas Stadler <lukas.stadler@jku.at>
date Wed, 09 Nov 2011 11:36:20 +0100
parents dc65532fb300 (current diff) e82da3a1bbc9 (diff)
children 05b6ae7c23b1
files src/share/tools/IdealGraphVisualizer/Settings/src/com/sun/hotspot/igv/settings/settings.gif src/share/vm/graal/graalVMEntries.cpp
diffstat 43 files changed, 834 insertions(+), 165 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pytools/.project	Wed Nov 09 11:36:20 2011 +0100
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>shell</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.python.pydev.PyDevBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.python.pydev.pythonNature</nature>
+	</natures>
+</projectDescription>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pytools/.pydevproject	Wed Nov 09 11:36:20 2011 +0100
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<?eclipse-pydev version="1.0"?>
+
+<pydev_project>
+<pydev_property name="org.python.pydev.PYTHON_PROJECT_INTERPRETER">Default</pydev_property>
+<pydev_property name="org.python.pydev.PYTHON_PROJECT_VERSION">python 2.7</pydev_property>
+<pydev_pathproperty name="org.python.pydev.PROJECT_SOURCE_PATH">
+<path>/shell</path>
+</pydev_pathproperty>
+
+</pydev_project>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pytools/commands.py	Wed Nov 09 11:36:20 2011 +0100
@@ -0,0 +1,184 @@
+#
+# commands.py - the default commands available to gl.py
+#
+# ----------------------------------------------------------------------------------------------------
+#
+# Copyright (c) 2007, 2011, 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.
+#
+# 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.
+#
+# ----------------------------------------------------------------------------------------------------
+
+import os
+from os.path import join, exists
+from collections import Callable
+
+def clean(env, args):
+    """cleans the Graal+HotSpot source tree"""
+    os.environ.update(ARCH_DATA_MODEL='64', LANG='C', HOTSPOT_BUILD_JOBS='16')
+    env.run(['gmake', 'clean'], cwd=join(env.graal_home, 'make'))
+
+def bootstrap(env, args):
+    return env.run_vm(args + ['-version'])
+
+def avrora(env, args):
+    return env.run_dacapo(args + ['Harness', '--preserve', '-n', '20', 'avrora'])
+
+def batik(env, args):
+    return env.run_dacapo(args + ['Harness', '--preserve', '-n', '20', 'batik'])
+
+def eclipse(env, args):
+    return env.run_dacapo(args + ['Harness', '--preserve', '-n', '20', 'eclipse'])
+
+def fop(env, args):
+    return env.run_dacapo(args + ['Harness', '--preserve', '-n', '100', 'fop'])
+
+def h2(env, args):
+    return env.run_dacapo(args + ['Harness', '--preserve', '-n', '10', 'h2'])
+
+def jython(env, args):
+    return env.run_dacapo(args + ['Harness', '--preserve', '-n', '10', 'jython'])
+
+def lusearch(env, args):
+    return env.run_dacapo(args + ['Harness', '--preserve', '-n', '5', 'lusearch'])
+
+def pmd(env, args):
+    return env.run_dacapo(args + ['Harness', '--preserve', '-n', '10', 'pmd'])
+
+def tradebeans(env, args):
+    return env.run_dacapo(args + ['Harness', '--preserve', '-n', '20', 'tradebeans'])
+
+def xalan(env, args):
+    return env.run_dacapo(args + ['Harness', '--preserve', '-n', '20', 'xalan'])
+
+def tests(env, args):
+    """run a selection of the Maxine JTT tests in Graal"""
+    
+    def jtt(name):
+        return join(env.maxine_home, 'com.oracle.max.vm', 'test', 'jtt', name)
+    
+    return env.run_vm(args + ['-ea', '-esa', '-Xcomp', '-XX:+PrintCompilation', '-XX:CompileOnly=jtt'] + args +
+                       ['-Xbootclasspath/p:' + join(env.maxine_home, 'com.oracle.max.vm', 'bin'), 
+                        '-Xbootclasspath/p:' + join(env.maxine_home, 'com.oracle.max.base', 'bin'),
+                        'test.com.sun.max.vm.compiler.JavaTester',
+                        '-verbose=1', '-gen-run-scheme=false', '-run-scheme-package=all',
+                        jtt('bytecode'),
+                        jtt('except'), 
+                        jtt('jdk'), 
+                        jtt('hotpath'), 
+                        jtt('jdk'), 
+                        jtt('lang'), 
+                        jtt('loop'), 
+                        jtt('micro'), 
+                        jtt('optimize'), 
+                        jtt('reflect'), 
+                        jtt('threads'), 
+                        jtt('hotspot')])
+
+def help_(env, args):
+    """show help for a given command
+
+With no arguments, print a list of commands and short help for each command.
+
+Given a command name, print help for that command."""
+    if len(args) == 0:
+        env.print_help()
+        return
+    
+    name = args[0]
+    if not table.has_key(name):
+        env.error('unknown command: ' + name)
+    
+    value = table[name]
+    (func, usage) = value[:2]
+    doc = func.__doc__
+    if len(value) > 2:
+        docArgs = value[2:]
+        fmtArgs = []
+        for d in docArgs:
+            if isinstance(d, Callable):
+                fmtArgs += [d(env)]
+            else:
+                fmtArgs += [str(d)]
+        doc = doc.format(*fmtArgs)
+    print 'gl {0} {1}\n\n{2}\n'.format(name, usage, doc)
+
+def make(env, args):
+    """builds the Graal+HotSpot binary"""
+
+    
+    jvmCfg = join(env.jdk7, 'jre', 'lib', 'amd64', 'jvm.cfg')
+    found = False
+    with open(jvmCfg) as f:
+        for line in f:
+            if '-graal KNOWN' in line:
+                found = True
+                break
+            
+    if not found:
+        env.log('Appending "-graal KNOWN" to ' + jvmCfg)
+        with open(jvmCfg, 'a') as f:
+            f.write('-graal KNOWN\n')
+
+    if env.get_os() != 'windows':
+        javaLink = join(env.graal_home, 'graal', 'hotspot', 'java')
+        if not exists(javaLink):
+            javaExe = join(env.jdk7, 'jre', 'bin', 'java')
+            env.log('Creating link: ' + javaLink + ' -> ' + javaExe)
+            os.symlink(javaExe, javaLink)
+
+    graalVmDir = join(env.jdk7, 'jre', 'lib', 'amd64', 'graal')
+    if not exists(graalVmDir):
+        env.log('Creating Graal directory in JDK7: ' + graalVmDir)
+        os.makedirs(graalVmDir)
+
+    graalVmDbgDir = join(env.jdk7g, 'jre', 'lib', 'amd64', 'graal')
+    if not exists(graalVmDbgDir):
+        env.log('Creating Graal directory in JDK7G: ' + graalVmDbgDir)
+        os.makedirs(graalVmDbgDir)
+
+
+    os.environ.update(ARCH_DATA_MODEL='64', LANG='C', HOTSPOT_BUILD_JOBS='4', ALT_BOOTDIR=env.jdk7g, INSTALL='y')
+    env.run(['gmake', 'jvmggraal'], cwd=join(env.graal_home, 'make'))
+
+    os.environ.update(ARCH_DATA_MODEL='64', LANG='C', HOTSPOT_BUILD_JOBS='4', ALT_BOOTDIR=env.jdk7, INSTALL='y')
+    env.run(['gmake', 'productgraal'], cwd=join(env.graal_home, 'make'))
+    
+# Table of commands in alphabetical order.
+# Keys are command names, value are lists: [<function>, <usage msg>, <format args to doc string of function>...]
+# If any of the format args are instances of Callable, then they are called with an 'env' are before being
+# used in the call to str.format().  
+# Extensions should update this table directly
+table = {
+    'avrora': [avrora, ''],
+    'batik': [batik, ''],
+    'bootstrap': [bootstrap, ''],
+    'clean': [clean, ''],
+    'fop': [fop, ''],
+    'h2': [h2, ''],
+    'jython': [jython, ''],
+    'lusearch': [lusearch, ''],
+    'pmd': [pmd, ''],
+    'tradebeans': [tradebeans, ''],
+    'tests': [tests, ''],
+    'help': [help_, '[command]'],
+    'make': [make, ''],
+    'xalan': [xalan, ''],
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pytools/gl.py	Wed Nov 09 11:36:20 2011 +0100
@@ -0,0 +1,221 @@
+#!/usr/bin/python
+#
+# gl.py - shell interface for Graal source code
+#
+# ----------------------------------------------------------------------------------------------------
+#
+# Copyright (c) 2007, 2011, 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.
+#
+# 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.
+#
+# ----------------------------------------------------------------------------------------------------
+#
+# A launcher for Graal executables and tools.
+#
+
+import subprocess
+from threading import Thread
+from argparse import ArgumentParser, REMAINDER
+from os.path import join, dirname, abspath, exists, isfile, isdir
+import commands
+import types
+import sys
+import os
+
+class Env(ArgumentParser):
+
+    # Override parent to append the list of available commands
+    def format_help(self):
+        msg = ArgumentParser.format_help(self) + '\navailable commands:\n\n'
+        for cmd in sorted(commands.table.iterkeys()):
+            c, _ = commands.table[cmd][:2]
+            doc = c.__doc__
+            if doc is None:
+                doc = ''
+            msg += ' {0:<20} {1}\n'.format(cmd, doc.split('\n', 1)[0])
+        return msg + '\n'
+    
+    def __init__(self):
+        self.dacapo = os.getenv('DACAPO')
+        self.jdk7 = os.getenv('JDK7')
+        self.jdk7g = os.getenv('JDK7G')
+        self.maxine_home = os.getenv('MAXINE')
+        
+        ArgumentParser.__init__(self, prog='gl')
+    
+        self.add_argument('-v', action='store_true', dest='verbose', help='enable verbose output')
+        self.add_argument('--dacapo', help='path to DaCapo 91.12 jar file')
+        self.add_argument('--jdk7', help='JDK7 installation in which the GraalVM binary is installed', metavar='<path>')
+        self.add_argument('--jdk7g', help='JDK7G installation in which the GraalVM binary is installed', metavar='<path>')
+        self.add_argument('-M', '--maxine', dest='maxine_home', help='path to Maxine code base', metavar='<path>')
+        
+    def parse_cmd_line(self):
+        
+        self.add_argument('commandAndArgs', nargs=REMAINDER, metavar='command args...')
+        
+        self.parse_args(namespace=self)
+
+        if not isdir(self.jdk7):
+            self.log('JDK7 is required. Use --jdk7 option or set JDK7 environment variable')
+            self.abort(1)
+
+        if not isdir(self.jdk7g):
+            self.log('JDK7G is required. Use --jdk7g option or set JDK7G environment variable')
+            self.abort(1)
+
+        self.graal_home = dirname(abspath(dirname(sys.argv[0])))
+    
+    def load_config_file(self, configFile):
+        """ adds attributes to this object from a file containing key=value lines """
+        if exists(configFile):
+            with open(configFile) as f:
+                self.log('[loading vars from ' + configFile + ']')
+                for line in f:
+                    kv = line.split('=', 1)
+                    if len(kv) == 2:
+                        k = kv[0].strip().lower()
+                        setattr(self, k, os.path.expandvars(kv[1].strip()))
+
+    def get_os(self):
+        if sys.platform.startswith('darwin'):
+            return 'darwin'
+        elif sys.platform.startswith('linux'):
+            return 'linux'
+        elif sys.platform.startswith('sunos'):
+            return 'solaris'
+        elif sys.platform.startswith('win32') or sys.platform.startswith('cygwin'):
+            return 'windows'
+        else:
+            print 'Supported operating system could not be derived from', sys.platform
+            self.abort(1)
+
+        
+    def exe(self, name):
+        if self.get_os() == 'windows':
+            return name + '.exe'
+        return name
+
+    def run_dacapo(self, args):
+        if not isfile(self.dacapo) or not self.dacapo.endswith('.jar'):
+            self.log('Specified DaCapo jar file does not exist or is not a jar file: ' + self.dacapo)
+            self.abort(1)
+        return self.run_vm(['-Xms1g', '-Xmx2g', '-esa', '-XX:-GraalBailoutIsFatal', '-G:-QuietBailout', '-cp', self.dacapo] + args)
+
+    def run_vm(self, args):
+        if self.maxine_home is None:
+            self.log('Path to Maxine code base must be specified with -M option of MAXINE environment variable')
+            self.abort(1)
+        if not exists(join(self.maxine_home, 'com.oracle.max.graal.hotspot', 'bin', 'com', 'oracle', 'max', 'graal', 'hotspot', 'VMEntriesNative.class')):
+            self.log('Maxine code base path specified -M option or MAXINE environment variable does not contain com.oracle.max.graal.hotspot/bin/com/oracle/max/graal/hotspot/VMEntriesNative.class: ' + self.maxine_home)
+            self.abort(1)
+            
+        os.environ['MAXINE'] = self.maxine_home
+        exe = join(self.jdk7, 'bin', self.exe('java'))
+        return self.run([exe, '-graal'] + args)
+
+    def run(self, args, nonZeroIsFatal=True, out=None, err=None, cwd=None):
+        """
+        
+        Run a command in a subprocess, wait for it to complete and return the exit status of the process.
+        If the exit status is non-zero and `nonZeroIsFatal` is true, then the program is exited with
+        the same exit status.
+        Each line of the standard output and error streams of the subprocess are redirected to the
+        provided out and err functions if they are not None.
+        
+        """
+        
+        assert isinstance(args, types.ListType), "'args' must be a list: " + str(args)
+        for arg in args:
+            if not isinstance(arg, types.StringTypes):
+                self.log('argument is not a string: ' + str(arg))
+                self.abort(1)
+        
+        if self.verbose:
+            self.log(' '.join(args))
+            
+        try:
+            if out is None and err is None:
+                retcode = subprocess.call(args, cwd=cwd)
+            else:
+                def redirect(stream, f):
+                    for line in iter(stream.readline, ''):
+                        f(line)
+                    stream.close()
+                p = subprocess.Popen(args, stdout=None if out is None else subprocess.PIPE, stderr=None if err is None else subprocess.PIPE)
+                if out is not None:
+                    t = Thread(target=redirect, args=(p.stdout, out))
+                    t.daemon = True # thread dies with the program
+                    t.start()
+                if err is not None:
+                    t = Thread(target=redirect, args=(p.stderr, err))
+                    t.daemon = True # thread dies with the program
+                    t.start()
+                retcode = p.wait()
+        except OSError as e:
+            self.log('Error executing \'' + ' '.join(args) + '\': ' + str(e))
+            if self.verbose:
+                raise e
+            self.abort(e.errno)
+        
+
+        if retcode and nonZeroIsFatal:
+            if self.verbose:
+                raise subprocess.CalledProcessError(retcode, ' '.join(args))
+            self.abort(retcode)
+            
+        return retcode
+
+    
+    def log(self, msg=None):
+        if msg is None:
+            print
+        else:
+            print msg
+           
+    def abort(self, code):
+        """ raises a SystemExit exception with the provided exit code """
+        raise SystemExit(code)
+
+def main(env):
+    configFile = join(dirname(sys.argv[0]), 'glrc')
+    env.load_config_file(configFile)
+    env.parse_cmd_line()
+    
+    if len(env.commandAndArgs) == 0:
+        env.print_help()
+        return
+    
+    env.command = env.commandAndArgs[0]
+    env.command_args = env.commandAndArgs[1:]
+    
+    if not commands.table.has_key(env.command):
+        env.error('unknown command "' + env.command + '"')
+        
+    c, _ = commands.table[env.command][:2]
+    try:
+        retcode = c(env, env.command_args)
+        if retcode is not None and retcode != 0:
+            env.abort(retcode)
+    except KeyboardInterrupt:
+        env.abort(1)
+        
+#This idiom means the below code only runs when executed from command line
+if __name__ == '__main__':
+    main(Env())
--- a/runfilter.sh	Wed Nov 09 11:27:50 2011 +0100
+++ b/runfilter.sh	Wed Nov 09 11:36:20 2011 +0100
@@ -14,4 +14,6 @@
 FILTER=$1
 shift 1
 TESTDIR=${MAXINE}/com.oracle.max.vm/test
-${JDK7}/bin/java -graal -ea -esa -Xcomp -XX:+PrintCompilation -XX:CompileOnly=jtt -Xbootclasspath/p:"${MAXINE}/com.oracle.max.vm/bin" -Xbootclasspath/p:"${MAXINE}/com.oracle.max.base/bin" $@ test.com.sun.max.vm.compiler.JavaTester -filter=${FILTER} -verbose=1 -gen-run-scheme=false -run-scheme-package=all $@ ${TESTDIR}/jtt/bytecode ${TESTDIR}/jtt/except ${TESTDIR}/jtt/hotpath ${TESTDIR}/jtt/jdk ${TESTDIR}/jtt/lang ${TESTDIR}/jtt/loop ${TESTDIR}/jtt/micro ${TESTDIR}/jtt/optimize ${TESTDIR}/jtt/reflect ${TESTDIR}/jtt/threads ${TESTDIR}/jtt/reflect ${TESTDIR}/jtt/hotspot
+COMMAND="${JDK7}/bin/java -graal -ea -esa -Xcomp -G:Plot -XX:+PrintCompilation -XX:CompileOnly=jtt -Xbootclasspath/p:"${MAXINE}/com.oracle.max.vm/bin" -Xbootclasspath/p:"${MAXINE}/com.oracle.max.base/bin" $@ test.com.sun.max.vm.compiler.JavaTester -filter=${FILTER} -verbose=1 -gen-run-scheme=false -run-scheme-package=all $@ ${TESTDIR}/jtt/bytecode ${TESTDIR}/jtt/except ${TESTDIR}/jtt/hotpath ${TESTDIR}/jtt/jdk ${TESTDIR}/jtt/lang ${TESTDIR}/jtt/loop ${TESTDIR}/jtt/micro ${TESTDIR}/jtt/optimize ${TESTDIR}/jtt/reflect ${TESTDIR}/jtt/threads ${TESTDIR}/jtt/reflect ${TESTDIR}/jtt/hotspot"
+echo $COMMAND
+$COMMAND
--- a/src/share/tools/IdealGraphVisualizer/Coordinator/src/com/sun/hotspot/igv/coordinator/FolderNode.java	Wed Nov 09 11:27:50 2011 +0100
+++ b/src/share/tools/IdealGraphVisualizer/Coordinator/src/com/sun/hotspot/igv/coordinator/FolderNode.java	Wed Nov 09 11:36:20 2011 +0100
@@ -149,6 +149,10 @@
         structure = organizer.organize(subFolders, groups);
         assert structure != null;
         children.addNotify();
+
+        for (Group g : groups) {
+            content.add(g);
+        }
     }
 
     @Override
--- a/src/share/tools/IdealGraphVisualizer/Coordinator/src/com/sun/hotspot/igv/coordinator/GraphNode.java	Wed Nov 09 11:27:50 2011 +0100
+++ b/src/share/tools/IdealGraphVisualizer/Coordinator/src/com/sun/hotspot/igv/coordinator/GraphNode.java	Wed Nov 09 11:36:20 2011 +0100
@@ -27,7 +27,6 @@
 import com.sun.hotspot.igv.coordinator.actions.DiffGraphCookie;
 import com.sun.hotspot.igv.coordinator.actions.GraphOpenCookie;
 import com.sun.hotspot.igv.coordinator.actions.GraphRemoveCookie;
-import com.sun.hotspot.igv.coordinator.actions.RemoveCookie;
 import com.sun.hotspot.igv.data.InputGraph;
 import com.sun.hotspot.igv.data.Properties;
 import com.sun.hotspot.igv.data.services.GraphViewer;
@@ -35,7 +34,6 @@
 import java.awt.Image;
 import javax.swing.Action;
 import org.openide.actions.OpenAction;
-import org.openide.cookies.OpenCookie;
 import org.openide.nodes.AbstractNode;
 import org.openide.nodes.Children;
 import org.openide.nodes.Sheet;
@@ -50,7 +48,7 @@
  */
 public class GraphNode extends AbstractNode {
 
-    private InputGraph graph;
+    private final InputGraph graph;
 
     /** Creates a new instance of GraphNode */
     public GraphNode(InputGraph graph) {
@@ -107,4 +105,20 @@
     public Action getPreferredAction() {
         return (Action) OpenAction.findObject(OpenAction.class, true);
     }
+
+    @Override
+    public boolean equals(Object obj) {
+        if (this == obj) {
+            return true;
+        }
+        if (obj instanceof GraphNode) {
+            return (graph == ((GraphNode) obj).graph);
+        }
+        return false;
+    }
+
+    @Override
+    public int hashCode() {
+        return graph.hashCode();
+    }
 }
--- a/src/share/tools/IdealGraphVisualizer/Coordinator/src/com/sun/hotspot/igv/coordinator/OutlineTopComponent.java	Wed Nov 09 11:27:50 2011 +0100
+++ b/src/share/tools/IdealGraphVisualizer/Coordinator/src/com/sun/hotspot/igv/coordinator/OutlineTopComponent.java	Wed Nov 09 11:36:20 2011 +0100
@@ -111,12 +111,13 @@
         this.add(toolbar, BorderLayout.NORTH);
 
         toolbar.add(ImportAction.get(ImportAction.class));
-        toolbar.add(((NodeAction) RemoveAction.get(RemoveAction.class)).createContextAwareInstance(this.getLookup()));
-        toolbar.add(RemoveAllAction.get(RemoveAllAction.class));
 
         toolbar.add(((NodeAction) SaveAsAction.get(SaveAsAction.class)).createContextAwareInstance(this.getLookup()));
         toolbar.add(SaveAllAction.get(SaveAllAction.class));
 
+        toolbar.add(((NodeAction) RemoveAction.get(RemoveAction.class)).createContextAwareInstance(this.getLookup()));
+        toolbar.add(RemoveAllAction.get(RemoveAllAction.class));
+
         toolbar.add(StructuredViewAction.get(StructuredViewAction.class).getToolbarPresenter());
 
         for (Toolbar tb : ToolbarPool.getDefault().getToolbars()) {
--- a/src/share/tools/IdealGraphVisualizer/Coordinator/src/com/sun/hotspot/igv/coordinator/actions/Bundle.properties	Wed Nov 09 11:27:50 2011 +0100
+++ b/src/share/tools/IdealGraphVisualizer/Coordinator/src/com/sun/hotspot/igv/coordinator/actions/Bundle.properties	Wed Nov 09 11:36:20 2011 +0100
@@ -1,9 +1,10 @@
 CTL_ImportAction=Open...
 CTL_OpenGraphAction=View graph
 CTL_DiffGraphAction=Difference to current graph
-CTL_RemoveAction=Remove methods
+CTL_RemoveAction=Remove selected graphs and groups
+CTL_RemoveAllAction=Remove all graphs and groups
 CTL_OutlineAction=Outline
-CTL_SaveAsAction=Save selected methods...
-CTL_SaveAllAction=Save all...
+CTL_SaveAsAction=Save selected groups...
+CTL_SaveAllAction=Save all groups...
 CTL_PropertiesAction=Open Properties Window 
 CTL_NewFilterAction=New filter...
--- a/src/share/tools/IdealGraphVisualizer/Coordinator/src/com/sun/hotspot/igv/coordinator/actions/ImportAction.java	Wed Nov 09 11:27:50 2011 +0100
+++ b/src/share/tools/IdealGraphVisualizer/Coordinator/src/com/sun/hotspot/igv/coordinator/actions/ImportAction.java	Wed Nov 09 11:36:20 2011 +0100
@@ -150,7 +150,7 @@
     }
 
     public ImportAction() {
-        putValue(Action.SHORT_DESCRIPTION, "Open an XML graph document");
+        putValue(Action.SHORT_DESCRIPTION, "Open XML graph document...");
         putValue(Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke(KeyEvent.VK_O, InputEvent.CTRL_MASK));
     }
 
--- a/src/share/tools/IdealGraphVisualizer/Coordinator/src/com/sun/hotspot/igv/coordinator/actions/RemoveAction.java	Wed Nov 09 11:27:50 2011 +0100
+++ b/src/share/tools/IdealGraphVisualizer/Coordinator/src/com/sun/hotspot/igv/coordinator/actions/RemoveAction.java	Wed Nov 09 11:36:20 2011 +0100
@@ -46,7 +46,7 @@
     }
 
     public RemoveAction() {
-        putValue(Action.SHORT_DESCRIPTION, "Remove");
+        putValue(Action.SHORT_DESCRIPTION, "Remove selected graphs and groups");
     }
 
     public String getName() {
--- a/src/share/tools/IdealGraphVisualizer/Coordinator/src/com/sun/hotspot/igv/coordinator/actions/RemoveAllAction.java	Wed Nov 09 11:27:50 2011 +0100
+++ b/src/share/tools/IdealGraphVisualizer/Coordinator/src/com/sun/hotspot/igv/coordinator/actions/RemoveAllAction.java	Wed Nov 09 11:36:20 2011 +0100
@@ -41,11 +41,11 @@
 
 
     public String getName() {
-        return NbBundle.getMessage(RemoveAllAction.class, "CTL_ImportAction");
+        return NbBundle.getMessage(RemoveAllAction.class, "CTL_RemoveAllAction");
     }
 
     public RemoveAllAction() {
-        putValue(Action.SHORT_DESCRIPTION, "Remove all methods");
+        putValue(Action.SHORT_DESCRIPTION, "Remove all graphs and groups");
         putValue(Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke(KeyEvent.VK_SHIFT, InputEvent.CTRL_MASK));
     }
 
--- a/src/share/tools/IdealGraphVisualizer/Coordinator/src/com/sun/hotspot/igv/coordinator/actions/SaveAllAction.java	Wed Nov 09 11:27:50 2011 +0100
+++ b/src/share/tools/IdealGraphVisualizer/Coordinator/src/com/sun/hotspot/igv/coordinator/actions/SaveAllAction.java	Wed Nov 09 11:36:20 2011 +0100
@@ -49,7 +49,7 @@
     }
 
     public SaveAllAction() {
-        putValue(Action.SHORT_DESCRIPTION, "Save all methods to XML file");
+        putValue(Action.SHORT_DESCRIPTION, "Save all groups to XML file...");
         putValue(Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke(KeyEvent.VK_S, InputEvent.CTRL_MASK));
     }
 
--- a/src/share/tools/IdealGraphVisualizer/Coordinator/src/com/sun/hotspot/igv/coordinator/actions/SaveAsAction.java	Wed Nov 09 11:27:50 2011 +0100
+++ b/src/share/tools/IdealGraphVisualizer/Coordinator/src/com/sun/hotspot/igv/coordinator/actions/SaveAsAction.java	Wed Nov 09 11:36:20 2011 +0100
@@ -34,6 +34,7 @@
 import java.io.IOException;
 import java.io.OutputStreamWriter;
 import java.io.Writer;
+import javax.swing.Action;
 import javax.swing.JFileChooser;
 import org.openide.nodes.Node;
 import org.openide.util.HelpCtx;
@@ -47,6 +48,10 @@
  */
 public final class SaveAsAction extends NodeAction {
 
+    public SaveAsAction() {
+        putValue(Action.SHORT_DESCRIPTION, "Save selected groups to XML file...");
+    }
+
     protected void performAction(Node[] activatedNodes) {
 
         GraphDocument doc = new GraphDocument();
--- a/src/share/tools/IdealGraphVisualizer/Coordinator/src/com/sun/hotspot/igv/coordinator/actions/StructuredViewAction.java	Wed Nov 09 11:27:50 2011 +0100
+++ b/src/share/tools/IdealGraphVisualizer/Coordinator/src/com/sun/hotspot/igv/coordinator/actions/StructuredViewAction.java	Wed Nov 09 11:36:20 2011 +0100
@@ -111,7 +111,7 @@
 
         dropDownButton.setIcon(icon);
 
-        dropDownButton.setToolTipText("Insert Layer Registration");
+        dropDownButton.setToolTipText("Choose group organization");
 
         dropDownButton.addItemListener(new ItemListener() {
 
--- a/src/share/tools/IdealGraphVisualizer/Coordinator/src/com/sun/hotspot/igv/coordinator/layer.xml	Wed Nov 09 11:27:50 2011 +0100
+++ b/src/share/tools/IdealGraphVisualizer/Coordinator/src/com/sun/hotspot/igv/coordinator/layer.xml	Wed Nov 09 11:36:20 2011 +0100
@@ -1,111 +1,199 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE filesystem PUBLIC "-//NetBeans//DTD Filesystem 1.2//EN" "http://www.netbeans.org/dtds/filesystem-1_2.dtd">
 <filesystem>
-    <attr name="Actions\Edit\com-sun-hotspot-igv-bytecodes-SelectBytecodesAction.instance\position" intvalue="200"/>
-    <attr name="Actions\Edit\org-netbeans-core-ui-sysopen-SystemOpenAction.instance\position" intvalue="100"/>
-    <attr name="Actions\Edit\org-openide-actions-CopyAction.instance\position" intvalue="1300"/>
-    <attr name="Actions\Edit\org-openide-actions-CutAction.instance\position" intvalue="1400"/>
-    <attr name="Actions\Edit\org-openide-actions-DeleteAction.instance\position" intvalue="1500"/>
-    <attr name="Actions\Edit\org-openide-actions-FindAction.instance\position" intvalue="1600"/>
-    <attr name="Actions\Edit\org-openide-actions-GotoAction.instance\position" intvalue="1700"/>
-    <attr name="Actions\Edit\org-openide-actions-PasteAction.instance\position" intvalue="1800"/>
-    <attr name="Actions\Edit\org-openide-actions-RedoAction.instance\position" intvalue="1900"/>
-    <attr name="Actions\Edit\org-openide-actions-ReplaceAction.instance\position" intvalue="2000"/>
-    <attr name="Actions\Edit\org-openide-actions-UndoAction.instance\position" intvalue="2100"/>
-    
     <folder name="Actions">
         <folder name="File">
-            <file name="com-sun-hotspot-igv-coordinator-actions-SaveAsAction.instance">
-                <attr name="position" intvalue="700"/>
-            </file>
-            <file name="com-sun-hotspot-igv-coordinator-actions-SaveAllAction.instance">
-                <attr name="position" intvalue="800"/>
-            </file>
-            <file name="com-sun-hotspot-igv-coordinator-actions-ImportAction.instance">
-                <attr name="position" intvalue="1000"/>
-            </file>
+            <file name="com-sun-hotspot-igv-coordinator-actions-SaveAsAction.instance"/>
+            <file name="com-sun-hotspot-igv-coordinator-actions-SaveAllAction.instance"/>
+            <file name="com-sun-hotspot-igv-coordinator-actions-ImportAction.instance"/>
         </folder>
         <folder name="Edit">
-            
-            <file name="com-sun-hotspot-igv-coordinator-actions-RemoveAction.instance">
-                <attr name="position" intvalue="1200"/>
-            </file>
+            <file name="com-sun-hotspot-igv-coordinator-actions-RemoveAction.instance"/>
+            <file name="com-sun-hotspot-igv-coordinator-actions-RemoveAllAction.instance"/>
         </folder>
         <folder name="Window">
             <file name="com-sun-hotspot-igv-coordinator-actions-OutlineAction.instance"/>
         </folder>
     </folder>
+    
     <folder name="Menu">
         <folder name="File">
+            <file name="Separator2.instance_hidden"/>
+            <file name="Separator3.instance_hidden"/>
+            <file name="SeparatorOpen.instance_hidden"/>
             <file name="com-sun-hotspot-igv-coordinator-actions-ImportAction.shadow">
                 <attr name="originalFile" stringvalue="Actions/File/com-sun-hotspot-igv-coordinator-actions-ImportAction.instance"/>
                 <attr name="position" intvalue="100"/>
             </file>
-            <file name="MySeparator2.instance">
+            <file name="SeparatorSave.instance">
                 <attr name="instanceClass" stringvalue="javax.swing.JSeparator"/>
-                <attr name="position" intvalue="300"/>
+                <attr name="position" intvalue="150"/>
             </file>
             <file name="com-sun-hotspot-igv-coordinator-actions-SaveAsAction.shadow">
                 <attr name="originalFile" stringvalue="Actions/File/com-sun-hotspot-igv-coordinator-actions-SaveAsAction.instance"/>
-                <attr name="position" intvalue="300"/>
+                <attr name="position" intvalue="200"/>
             </file>
             <file name="com-sun-hotspot-igv-coordinator-actions-SaveAllAction.shadow">
                 <attr name="originalFile" stringvalue="Actions/File/com-sun-hotspot-igv-coordinator-actions-SaveAllAction.instance"/>
-                <attr name="position" intvalue="400"/>
-            </file>
-            <file name="MySeparator3.instance">
-                <attr name="instanceClass" stringvalue="javax.swing.JSeparator"/>
-                <attr name="position" intvalue="500"/>
+                <attr name="position" intvalue="300"/>
             </file>
-            
-            <file name="org-netbeans-modules-openfile-OpenFileAction.instance_hidden"/>
-            <file name="org-openide-actions-PageSetupAction.instance_hidden"/>
-            <file name="org-openide-actions-PrintAction.instance_hidden"/>
-            <file name="org-openide-actions-SaveAction.instance_hidden"/>
-            <file name="org-openide-actions-SaveAllAction.instance_hidden"/>
-            <file name="org-openide-actions-SaveAsAction.shadow_hidden"/>
-        </folder>
-        <folder name="Edit">
-            <file name="com-sun-hotspot-igv-coordinator-actions-SaveFilterSettingsAction.shadow">
-                <attr name="originalFile" stringvalue="Actions/Edit/com-sun-hotspot-igv-coordinator-actions-SaveFilterSettingsAction.instance"/>
+            <file name="SeparatorRemove.instance">
+                <attr name="instanceClass" stringvalue="javax.swing.JSeparator"/>
+                <attr name="position" intvalue="350"/>
             </file>
             <file name="com-sun-hotspot-igv-coordinator-actions-RemoveAction.shadow">
                 <attr name="originalFile" stringvalue="Actions/Edit/com-sun-hotspot-igv-coordinator-actions-RemoveAction.instance"/>
+                <attr name="position" intvalue="400" />
             </file>
-            <file name="org-netbeans-core-actions-JumpNextAction.shadow_hidden"/>
-            <file name="org-netbeans-core-actions-JumpPrevAction.shadow_hidden"/>
-            <file name="org-openide-actions-CutAction.instance_hidden"/>
-            <file name="org-openide-actions-CopyAction.instance_hidden"/>
-            <file name="org-openide-actions-PasteAction.instance_hidden"/>
-            <file name="org-openide-actions-DeleteAction.instance_hidden"/>
-            <file name="org-openide-actions-FindAction.instance_hidden"/>
-            <file name="org-openide-actions-ReplaceAction.instance_hidden"/>
-            <file name="org-openide-actions-JumpNextAction.shadow_hidden"/>
-            <file name="org-openide-actions-JumpPrevAction.shadow_hidden"/>
+            <file name="com-sun-hotspot-igv-coordinator-actions-RemoveAllAction.shadow">
+                <attr name="originalFile" stringvalue="Actions/Edit/com-sun-hotspot-igv-coordinator-actions-RemoveAllAction.instance"/>
+                <attr name="position" intvalue="500" />
+            </file>
+            
+            <!-- Hidden menu entries from other modules -->
+            <file name="org-netbeans-modules-editor-ExportHtmlAction.shadow_hidden"/>
+            <file name="org-netbeans-modules-openfile-OpenFileAction.shadow_hidden"/>
+            <file name="org-netbeans-modules-openfile-RecentFileAction.shadow_hidden"/>
+            <file name="org-netbeans-modules-print-action-PageSetupAction.shadow_hidden"/>
+            <file name="org-netbeans-modules-print-action-PrintAction.shadow_hidden"/>
+            <file name="org-netbeans-modules-project-ui-CloseProject.shadow_hidden"/>
+            <file name="org-netbeans-modules-project-ui-CustomizeProject.shadow_hidden"/>
+            <file name="org-netbeans-modules-project-ui-NewFile.shadow_hidden"/>
+            <file name="org-netbeans-modules-project-ui-NewProject.shadow_hidden"/>
+            <file name="org-netbeans-modules-project-ui-OpenProject.shadow_hidden"/>
+            <file name="org-netbeans-modules-project-ui-RecentProjects.shadow_hidden"/>
+            <file name="org-netbeans-modules-project-ui-groups-GroupsMenu.shadow_hidden"/>
+            <file name="org-openide-actions-SaveAction.shadow_hidden"/>
+            <file name="org-openide-actions-SaveAllAction.shadow_hidden"/>
+            <file name="org-openide-actions-SaveAsAction.shadow_hidden"/>
         </folder>
-        <file name="GoTo_hidden"/>
-        <folder name="View">
+        
+        <folder name="Edit">
+            <!-- Hidden menu entries from other modules -->
             <file name="Separator1.instance_hidden"/>
             <file name="Separator2.instance_hidden"/>
-            <file name="org-netbeans-core-actions-HTMLViewAction.instance_hidden"/>
-            <file name="org-netbeans-core-actions-LogAction.instance_hidden"/>
+            <file name="SeparatorAfterFindPrevious.instance_hidden"/>
+            <file name="SeparatorAfterProjectsSearch.instance_hidden"/>
+            <file name="WhereUsedAction.shadow_hidden"/>
+            <file name="org-netbeans-modules-editor-MainMenuAction$FindNextAction.instance_hidden"/>
+            <file name="org-netbeans-modules-editor-MainMenuAction$FindPreviousAction.instance_hidden"/>
+            <file name="org-netbeans-modules-editor-MainMenuAction$FindSelectionAction.instance_hidden"/>
+            <file name="org-netbeans-modules-editor-MainMenuAction$PasteFormattedAction.instance_hidden"/>
+            <file name="org-netbeans-modules-editor-MainMenuAction$SelectAllAction.instance_hidden"/>
+            <file name="org-netbeans-modules-editor-MainMenuAction$SelectIdentifierAction.instance_hidden"/>
+            <file name="org-netbeans-modules-editor-MainMenuAction$StartMacroRecordingAction.instance_hidden"/>
+            <file name="org-netbeans-modules-editor-MainMenuAction$StopMacroRecordingAction.instance_hidden"/>
+            <file name="org-netbeans-modules-search-FindInFilesAction.shadow_hidden"/>
+            <file name="org-netbeans-modules-search-ReplaceInFilesAction.shadow_hidden"/>
+            <file name="org-openide-actions-CopyAction.shadow_hidden"/>
+            <file name="org-openide-actions-CutAction.shadow_hidden"/>
+            <file name="org-openide-actions-DeleteAction.shadow_hidden"/>
+            <file name="org-openide-actions-FindAction.shadow_hidden"/>
+            <file name="org-openide-actions-PasteAction.shadow_hidden"/>
+            <file name="org-openide-actions-ReplaceAction.shadow_hidden"/>
+            <file name="sep-before-reposearch.instance_hidden"/>
+        </folder>
+        
+        <folder name="View">
+            <!-- Hidden menu entries from other modules -->
+            <file name="Separator1.instance_hidden"/>
+            <file name="Separator2.instance_hidden"/>
+            <file name="org-netbeans-core-actions-HTMLViewAction.shadow_hidden"/>
+            <file name="org-netbeans-core-actions-LogAction.shadow_hidden"/>
+            <file name="org-netbeans-core-multiview-EditorsAction.instance_hidden"/>
             <file name="org-netbeans-core-windows-actions-ToolbarsListAction.instance_hidden"/>
+            <file name="org-netbeans-modules-editor-NbCodeFoldingAction.instance_hidden"/>
+            <file name="org-netbeans-modules-project-ui-SyncEditorWithViewsAction.shadow_hidden"/>
+            <file name="org-netbeans-modules-versioning-ShowTextAnnotationsAction.shadow_hidden"/>
+            <file name="org-netbeans-modules-versioning-diff-ShowDiffSidebarAction.shadow_hidden"/>
+            <file name="toggle-line-numbers.shadow_hidden"/>
+            <file name="toggle-non-printable-characters.shadow_hidden"/>
+            <file name="toggle-toolbar.shadow_hidden"/>
         </folder>
+        
+        <!-- Hidden menus -->
+        <folder name="GoTo_hidden"/>
+        <folder name="Source_hidden"/>
+        <folder name="Refactoring_hidden"/>
+        <folder name="BuildProject_hidden"/>
+        <folder name="RunProject_hidden"/>
+        <folder name="Versioning_hidden"/>
+        
+        <folder name="Tools">
+            <!-- Hidden menu entries from other modules -->
+            <file name="LibrariesCustomizerAction.shadow_hidden"/>
+            <file name="PaletteManager_hidden"/>
+            <file name="Separator1.instance_hidden"/>
+            <file name="Separator2.instance_hidden"/>
+            <file name="ServerManagerAction3.shadow_hidden"/>
+            <file name="VariablesCustomizerAction.shadow_hidden"/>
+            <file name="org-netbeans-modules-autoupdate-ui-actions-PluginManagerAction.shadow_hidden"/>
+            <file name="org-netbeans-modules-favorites-templates-TemplatesAction.shadow_hidden"/>
+            <file name="org-netbeans-modules-options-OptionsWindowAction-separatorBefore.instance_hidden"/>
+            <file name="org-netbeans-modules-xml-catalog-CatalogAction.shadow_hidden"/>
+            <file name="org-openide-actions-ToolsAction.shadow_hidden"/>
+        </folder>
+        
         <folder name="Window">
             <file name="OutlineAction.shadow">
                 <attr name="originalFile" stringvalue="Actions/Window/com-sun-hotspot-igv-coordinator-actions-OutlineAction.instance"/>
             </file>
+            
+            <!-- Hidden menu entries from other modules -->
+            <file name="Debug_hidden"/>
+            <file name="Navigator_hidden"/>
+            <file name="Other_hidden"/>
+            <file name="Output_hidden"/>
+            <file name="ProgressListAction.shadow_hidden"/>
+            <file name="ShowPaletteAction.shadow_hidden"/>
+            <file name="SwitchToRecentDocumentAction.shadow_hidden"/>
+            <file name="Versioning_hidden"/>
+            <file name="org-netbeans-core-ide-ServicesTabAction.shadow_hidden"/>
+            <file name="org-netbeans-modules-favorites-View.shadow_hidden"/>
+            <file name="org-netbeans-modules-project-ui-logical-tab-action.shadow_hidden"/>
+            <file name="org-netbeans-modules-project-ui-physical-tab-action.shadow_hidden"/>
+            <file name="org-netbeans-modules-tasklist-ui-TaskListAction.shadow_hidden"/>
+            <file name="CloneDocumentAction.shadow_hidden"/>
         </folder>
         
         <file name="Spacer.instance">
             <attr name="instanceCreate" methodvalue="javax.swing.Box.createHorizontalGlue"/>
             <attr name="position" intvalue="9980"/>
         </file>
-            <file name="org-netbeans-modules-quicksearch-QuickSearchAction.shadow">
+        <file name="org-netbeans-modules-quicksearch-QuickSearchAction.shadow">
             <attr name="displayName" bundlevalue="com.sun.hotspot.igv.coordinator.Bundle#Toolbars/QuickSearch"/>
             <attr name="originalFile" stringvalue="Actions/Edit/org-netbeans-modules-quicksearch-QuickSearchAction.instance"/>
-            </file>
+            <attr name="position" intvalue="9990"/>
+        </file>
+        
+        <folder name="Help">
+            <!-- Hidden menu entries from other modules -->
+            <file name="Separator1.instance_hidden"/>
+            <file name="netbeans-kb.url_hidden"/>
+            <file name="org-netbeans-modules-autoupdate-ui-actions-CheckForUpdatesAction.shadow_hidden"/>
+            <file name="org-netbeans-modules-bugzilla-ReportNBIssueAction.shadow_hidden"/>
+            <file name="org-netbeans-modules-usersguide-master.xml_hidden"/>
+            <file name="shortcuts.xml_hidden"/>
         </folder>
+    </folder>
+        
+    <folder name="OptionsDialog">
+        <!-- Hidden option tabs from other modules -->
+        <file name="Editor.instance_hidden"/>
+        <file name="FontsAndColors.instance_hidden"/>
+        <file name="General.instance_hidden"/>
+        <file name="Keymaps.instance_hidden"/>
+        <folder name="Advanced">
+            <file name="Files.instance_hidden"/>
+            <file name="IssueTracking.instance_hidden"/>
+            <file name="JavaScript.instance_hidden"/>
+            <file name="Spellchecker.instance_hidden"/>
+            <file name="TermAdvancedOption.instance_hidden"/>
+            <file name="ToDo.instance_hidden"/>
+            <file name="Versioning.instance_hidden"/>
+        </folder>
+    </folder>
+    
     <folder name="Windows2">
         <folder name="Components">
             <file name="OutlineTopComponent.settings" url="OutlineTopComponentSettings.xml"/>
--- a/src/share/tools/IdealGraphVisualizer/Difference/src/com/sun/hotspot/igv/difference/Difference.java	Wed Nov 09 11:27:50 2011 +0100
+++ b/src/share/tools/IdealGraphVisualizer/Difference/src/com/sun/hotspot/igv/difference/Difference.java	Wed Nov 09 11:36:20 2011 +0100
@@ -31,6 +31,7 @@
 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.Property;
 import com.sun.hotspot.igv.data.services.Scheduler;
 import java.util.Collection;
@@ -103,6 +104,18 @@
         Group g = new Group();
         g.setMethod(a.getGroup().getMethod());
         g.setAssembly(a.getGroup().getAssembly());
+        if (a.getGroup() == b.getGroup()) {
+            g.getProperties().add(a.getGroup().getProperties());
+        } else {
+            // copy properties that have the same value in both groups
+            Properties bps = b.getGroup().getProperties();
+            for (Property p : a.getGroup().getProperties()) {
+                String value = p.getValue();
+                if (value != null && value.equals(bps.get(p.getName()))) {
+                    g.getProperties().setProperty(p.getName(), value);
+                }
+            }
+        }
         g.getProperties().setProperty("name", "Difference");
         InputGraph graph = g.addGraph(a.getName() + ", " + b.getName(), new Pair<InputGraph, InputGraph>(a, b));
 
--- a/src/share/tools/IdealGraphVisualizer/Filter/src/com/sun/hotspot/igv/filter/CombineFilter.java	Wed Nov 09 11:27:50 2011 +0100
+++ b/src/share/tools/IdealGraphVisualizer/Filter/src/com/sun/hotspot/igv/filter/CombineFilter.java	Wed Nov 09 11:36:20 2011 +0100
@@ -30,6 +30,7 @@
 import com.sun.hotspot.igv.graph.OutputSlot;
 import com.sun.hotspot.igv.data.Properties;
 import com.sun.hotspot.igv.data.Properties.PropertyMatcher;
+import java.awt.Color;
 import java.util.ArrayList;
 import java.util.HashSet;
 import java.util.List;
@@ -76,16 +77,25 @@
                             }
                         }
 
-                        assert slot != null;
-                        slot.setText(f.getProperties().get("dump_spec"));
-                        if (f.getProperties().get("short_name") != null) {
-                            slot.setShortName(f.getProperties().get("short_name"));
+                        slot.getSource().addSourceNodes(f.getSource());
+                        if (r.getShortProperty() != null) {
+                            String s = f.getProperties().get(r.getShortProperty());
+                            if (s != null && s.length() > 0) {
+                                slot.setShortName(s);
+                                slot.setText(s);
+                                slot.setColor(f.getColor());
+                            }
                         } else {
-                            String s = f.getProperties().get("dump_spec");
-                            if (s != null && s.length() <= 5) {
-                                slot.setShortName(s);
+                            assert slot != null;
+                            slot.setText(f.getProperties().get("dump_spec"));
+                            if (f.getProperties().get("short_name") != null) {
+                                slot.setShortName(f.getProperties().get("short_name"));
+                            } else {
+                                String s = f.getProperties().get("dump_spec");
+                                if (s != null && s.length() <= 5) {
+                                    slot.setShortName(s);
+                                }
                             }
-
                         }
 
                         for (InputSlot s : f.getInputSlots()) {
@@ -101,7 +111,7 @@
                 } else {
 
                     for (Figure succ : successors) {
-                        if (succ.getPredecessors().size() == 1) {
+                        if (succ.getPredecessors().size() == 1 && succ.getInputSlots().size() == 1) {
                             if (succ.getProperties().selectSingle(r.getSecondMatcher()) != null && succ.getOutputSlots().size() == 1) {
 
 
@@ -122,17 +132,27 @@
                                     pos = Integer.parseInt(succ.getProperties().get("con"));
                                 }
                                 OutputSlot slot = f.createOutputSlot(pos);
-                                slot.setText(succ.getProperties().get("dump_spec"));
-                                if (succ.getProperties().get("short_name") != null) {
-                                    slot.setShortName(succ.getProperties().get("short_name"));
+                                slot.getSource().addSourceNodes(succ.getSource());
+                                if (r.getShortProperty() != null) {
+                                    String s = succ.getProperties().get(r.getShortProperty());
+                                    if (s != null && s.length() > 0) {
+                                        slot.setShortName(s);
+                                        slot.setText(s);
+                                        slot.setColor(succ.getColor());
+                                    }
                                 } else {
-                                    String s = succ.getProperties().get("dump_spec");
-                                    if (s != null && s.length() <= 2) {
-                                        slot.setShortName(s);
+                                    slot.setText(succ.getProperties().get("dump_spec"));
+                                    if (succ.getProperties().get("short_name") != null) {
+                                        slot.setShortName(succ.getProperties().get("short_name"));
                                     } else {
-                                        String tmpName = succ.getProperties().get("name");
-                                        if (tmpName != null && tmpName.length() > 0) {
-                                            slot.setShortName(tmpName.substring(0, 1));
+                                        String s = succ.getProperties().get("dump_spec");
+                                        if (s != null && s.length() <= 2) {
+                                            slot.setShortName(s);
+                                        } else {
+                                            String tmpName = succ.getProperties().get("name");
+                                            if (tmpName != null && tmpName.length() > 0) {
+                                                slot.setShortName(tmpName.substring(0, 1));
+                                            }
                                         }
                                     }
                                 }
@@ -167,6 +187,7 @@
         private PropertyMatcher first;
         private PropertyMatcher second;
         private boolean reversed;
+        private String shortProperty;
 
         public CombineRule(PropertyMatcher first, PropertyMatcher second) {
             this(first, second, false);
@@ -174,9 +195,14 @@
         }
 
         public CombineRule(PropertyMatcher first, PropertyMatcher second, boolean reversed) {
+            this(first, second, reversed, null);
+        }
+
+        public CombineRule(PropertyMatcher first, PropertyMatcher second, boolean reversed, String shortProperty) {
             this.first = first;
             this.second = second;
             this.reversed = reversed;
+            this.shortProperty = shortProperty;
         }
 
         public boolean isReversed() {
@@ -190,5 +216,9 @@
         public PropertyMatcher getSecondMatcher() {
             return second;
         }
+
+        public String getShortProperty() {
+            return shortProperty;
+        }
     }
 }
--- a/src/share/tools/IdealGraphVisualizer/FilterWindow/src/com/sun/hotspot/igv/filterwindow/actions/Bundle.properties	Wed Nov 09 11:27:50 2011 +0100
+++ b/src/share/tools/IdealGraphVisualizer/FilterWindow/src/com/sun/hotspot/igv/filterwindow/actions/Bundle.properties	Wed Nov 09 11:36:20 2011 +0100
@@ -3,5 +3,5 @@
 CTL_MoveFilterDownAction=Move downwards
 CTL_RemoveFilterAction=Remove
 CTL_RemoveFilterSettingsAction=Remove filter setting
-CTL_SaveFilterSettingsAction=Save filter settings...
+CTL_SaveFilterSettingsAction=Create filter profile...
 CTL_NewFilterAction=New filter...
--- a/src/share/tools/IdealGraphVisualizer/FilterWindow/src/com/sun/hotspot/igv/filterwindow/actions/MoveFilterDownAction.java	Wed Nov 09 11:27:50 2011 +0100
+++ b/src/share/tools/IdealGraphVisualizer/FilterWindow/src/com/sun/hotspot/igv/filterwindow/actions/MoveFilterDownAction.java	Wed Nov 09 11:36:20 2011 +0100
@@ -50,7 +50,7 @@
 
     public MoveFilterDownAction() {
 
-        putValue(Action.SHORT_DESCRIPTION, "Move filter downwards");
+        putValue(Action.SHORT_DESCRIPTION, "Move selected filter downwards");
     }
 
     public String getName() {
--- a/src/share/tools/IdealGraphVisualizer/FilterWindow/src/com/sun/hotspot/igv/filterwindow/actions/MoveFilterUpAction.java	Wed Nov 09 11:27:50 2011 +0100
+++ b/src/share/tools/IdealGraphVisualizer/FilterWindow/src/com/sun/hotspot/igv/filterwindow/actions/MoveFilterUpAction.java	Wed Nov 09 11:36:20 2011 +0100
@@ -49,7 +49,7 @@
     }
 
     public MoveFilterUpAction() {
-        putValue(Action.SHORT_DESCRIPTION, "Move filter upwards");
+        putValue(Action.SHORT_DESCRIPTION, "Move selected filter upwards");
     }
 
     public String getName() {
--- a/src/share/tools/IdealGraphVisualizer/FilterWindow/src/com/sun/hotspot/igv/filterwindow/actions/RemoveFilterAction.java	Wed Nov 09 11:27:50 2011 +0100
+++ b/src/share/tools/IdealGraphVisualizer/FilterWindow/src/com/sun/hotspot/igv/filterwindow/actions/RemoveFilterAction.java	Wed Nov 09 11:36:20 2011 +0100
@@ -68,7 +68,7 @@
     }
 
     public RemoveFilterAction() {
-        putValue(Action.SHORT_DESCRIPTION, "Remove filter");
+        putValue(Action.SHORT_DESCRIPTION, "Remove selected filter");
     }
 
     protected Class[] cookieClasses() {
--- a/src/share/tools/IdealGraphVisualizer/FilterWindow/src/com/sun/hotspot/igv/filterwindow/actions/RemoveFilterSettingsAction.java	Wed Nov 09 11:27:50 2011 +0100
+++ b/src/share/tools/IdealGraphVisualizer/FilterWindow/src/com/sun/hotspot/igv/filterwindow/actions/RemoveFilterSettingsAction.java	Wed Nov 09 11:36:20 2011 +0100
@@ -44,7 +44,7 @@
     }
 
     public RemoveFilterSettingsAction() {
-        putValue(Action.SHORT_DESCRIPTION, "Remove filter profile");
+        putValue(Action.SHORT_DESCRIPTION, "Delete current filter profile");
     }
 
     @Override
--- a/src/share/tools/IdealGraphVisualizer/FilterWindow/src/com/sun/hotspot/igv/filterwindow/actions/SaveFilterSettingsAction.java	Wed Nov 09 11:27:50 2011 +0100
+++ b/src/share/tools/IdealGraphVisualizer/FilterWindow/src/com/sun/hotspot/igv/filterwindow/actions/SaveFilterSettingsAction.java	Wed Nov 09 11:36:20 2011 +0100
@@ -49,7 +49,7 @@
     }
 
     public SaveFilterSettingsAction() {
-        putValue(Action.SHORT_DESCRIPTION, "Create new filter profile");
+        putValue(Action.SHORT_DESCRIPTION, "Save filter configuration as profile...");
     }
 
     public HelpCtx getHelpCtx() {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/tools/IdealGraphVisualizer/Graal/src/com/sun/hotspot/igv/graal/filters/beginend.filter	Wed Nov 09 11:36:20 2011 +0100
@@ -0,0 +1,4 @@
+var f = new CombineFilter("Combine Filter");
+f.addRule(new CombineFilter.CombineRule(new Properties.RegexpPropertyMatcher("class", ".*"), new Properties.RegexpPropertyMatcher("class", "BeginNode"), false, "shortName"));
+f.addRule(new CombineFilter.CombineRule(new Properties.RegexpPropertyMatcher("class", "EndNode"), new Properties.RegexpPropertyMatcher("class", ".*"), true, "shortName"));
+f.apply(graph);
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/share/tools/IdealGraphVisualizer/Graal/src/com/sun/hotspot/igv/graal/filters/framestatelocks.filter	Wed Nov 09 11:36:20 2011 +0100
@@ -0,0 +1,2 @@
+colorize("class", "FrameState", red);
+colorize("locks", "", gray);
\ 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/noframestate.filter	Wed Nov 09 11:36:20 2011 +0100
@@ -0,0 +1,1 @@
+remove("class", "FrameState");
\ No newline at end of file
--- a/src/share/tools/IdealGraphVisualizer/Graal/src/com/sun/hotspot/igv/graal/layer.xml	Wed Nov 09 11:27:50 2011 +0100
+++ b/src/share/tools/IdealGraphVisualizer/Graal/src/com/sun/hotspot/igv/graal/layer.xml	Wed Nov 09 11:36:20 2011 +0100
@@ -10,11 +10,23 @@
             <attr name="enabled" boolvalue="false"/>
         </file>
         
-        <file name="Graal Slot Filter" url="filters/slots.filter">
+        <file name="Graal Remove Unconnected Slots" url="filters/slots.filter">
+            <attr name="enabled" boolvalue="false"/>
+        </file>
+        
+        <file name="Graal Probability" url="filters/probability.filter">
             <attr name="enabled" boolvalue="false"/>
         </file>
         
-        <file name="Graal Probability Filter" url="filters/probability.filter">
+        <file name="Graal Reduce Begin-End" url="filters/beginend.filter">
+            <attr name="enabled" boolvalue="false"/>
+        </file>
+        
+        <file name="Graal Remove FrameState" url="filters/noframestate.filter">
+            <attr name="enabled" boolvalue="false"/>
+        </file>
+        
+        <file name="Graal Mark FrameState With Lock" url="filters/framestatelocks.filter">
             <attr name="enabled" boolvalue="false"/>
         </file>
     </folder>
--- a/src/share/tools/IdealGraphVisualizer/GraphTextEditor/src/com/sun/hotspot/igv/graphtexteditor/TextAction.java	Wed Nov 09 11:27:50 2011 +0100
+++ b/src/share/tools/IdealGraphVisualizer/GraphTextEditor/src/com/sun/hotspot/igv/graphtexteditor/TextAction.java	Wed Nov 09 11:36:20 2011 +0100
@@ -36,9 +36,6 @@
 
     public TextAction() {
         super(NbBundle.getMessage(TextAction.class, "CTL_TextAction"));
-
-        System.out.println("Text action initialized!!!");
-//        putValue(SMALL_ICON, new ImageIcon(Utilities.loadImage(TextTopComponent.ICON_PATH, true)));
     }
 
     public void actionPerformed(ActionEvent evt) {
--- a/src/share/tools/IdealGraphVisualizer/GraphTextEditor/src/com/sun/hotspot/igv/graphtexteditor/TextTopComponent.java	Wed Nov 09 11:27:50 2011 +0100
+++ b/src/share/tools/IdealGraphVisualizer/GraphTextEditor/src/com/sun/hotspot/igv/graphtexteditor/TextTopComponent.java	Wed Nov 09 11:36:20 2011 +0100
@@ -39,7 +39,6 @@
 import java.awt.BorderLayout;
 import java.awt.CardLayout;
 import java.awt.Color;
-import java.awt.Graphics;
 import java.awt.event.ComponentAdapter;
 import java.awt.event.ComponentEvent;
 import java.awt.event.ItemEvent;
@@ -213,7 +212,9 @@
         // Rebuild combobox choices
         Object selection = sourceCombo.getSelectedItem();
         sourceCombo.removeAllItems();
-        sourceCombo.addItem(GRAPH_TEXT_REPRESENTATION);
+        // NOTE: addItem() makes the first inserted item the selected item,
+        //       so use insertItemAt() instead
+        sourceCombo.insertItemAt(GRAPH_TEXT_REPRESENTATION, 0);
         if (diagram != null) {
             if (diagram.getGraph().getSourceGraphs() != null) {
                 // Diff graph with source graphs with possibly different groups:
@@ -279,7 +280,11 @@
     private void displayDiagram(Diagram diagram) {
         if (diagram == null) {
             showCard(NO_GRAPH);
-        } else if (diagram.getGraph().getSourceGraphs() != null) {
+        } /* This side-by-side view of the source graphs for diff graphs doesn't
+           * work properly because nodes that exist only in graph B (the 'new'
+           * graph) are in most cases assigned different ids.
+
+            else if (diagram.getGraph().getSourceGraphs() != null) {
             showCard(TWO_GRAPHS);
             Pair<InputGraph, InputGraph> graphs = diagram.getGraph().getSourceGraphs();
             leftEditor.setStructuredText(convert(graphs.getLeft(), diagram));
@@ -287,7 +292,8 @@
 
             // TODO: Hack to update view - remove
             SelectionCoordinator.getInstance().getHighlightedChangedEvent().fire();
-        } else {
+        } */
+        else {
             showCard(ONE_GRAPH);
             StructuredText text = convert(diagram.getGraph(), diagram);
             singleEditor.setStructuredText(text);
--- a/src/share/tools/IdealGraphVisualizer/Settings/src/com/sun/hotspot/igv/settings/ViewOptionsCategory.java	Wed Nov 09 11:27:50 2011 +0100
+++ b/src/share/tools/IdealGraphVisualizer/Settings/src/com/sun/hotspot/igv/settings/ViewOptionsCategory.java	Wed Nov 09 11:36:20 2011 +0100
@@ -38,7 +38,7 @@
 
     @Override
     public Icon getIcon() {
-        return new ImageIcon(ImageUtilities.loadImage("com/sun/hotspot/igv/settings/settings.gif"));
+        return new ImageIcon(ImageUtilities.loadImage("com/sun/hotspot/igv/settings/settings.png"));
     }
 
     public String getCategoryName() {
--- a/src/share/tools/IdealGraphVisualizer/Settings/src/com/sun/hotspot/igv/settings/layer.xml	Wed Nov 09 11:27:50 2011 +0100
+++ b/src/share/tools/IdealGraphVisualizer/Settings/src/com/sun/hotspot/igv/settings/layer.xml	Wed Nov 09 11:36:20 2011 +0100
@@ -4,6 +4,8 @@
     <folder name="OptionsDialog">
       <!-- <file name="Advanced.instance_hidden"/>
         <file name="General.instance_hidden"/>-->
-        <file name="com-sun-hotspot-igv-settings-ViewOptionsCategory.instance"/>
+        <file name="com-sun-hotspot-igv-settings-ViewOptionsCategory.instance">
+            <attr name="position" intvalue="100" />
+        </file>
     </folder>
 </filesystem>
Binary file src/share/tools/IdealGraphVisualizer/Settings/src/com/sun/hotspot/igv/settings/settings.gif has changed
Binary file src/share/tools/IdealGraphVisualizer/Settings/src/com/sun/hotspot/igv/settings/settings.png has changed
--- a/src/share/tools/IdealGraphVisualizer/TextEditor/nbproject/genfiles.properties	Wed Nov 09 11:27:50 2011 +0100
+++ b/src/share/tools/IdealGraphVisualizer/TextEditor/nbproject/genfiles.properties	Wed Nov 09 11:36:20 2011 +0100
@@ -1,5 +1,5 @@
 # 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=2b80dbe4
+nbproject/build-impl.xml.data.CRC32=ddc04434
 nbproject/build-impl.xml.script.CRC32=122053f6
-nbproject/build-impl.xml.stylesheet.CRC32=238281d1@1.45.1
+nbproject/build-impl.xml.stylesheet.CRC32=238281d1@1.46.2
--- a/src/share/tools/IdealGraphVisualizer/TextEditor/nbproject/project.xml	Wed Nov 09 11:27:50 2011 +0100
+++ b/src/share/tools/IdealGraphVisualizer/TextEditor/nbproject/project.xml	Wed Nov 09 11:36:20 2011 +0100
@@ -40,6 +40,15 @@
                     </run-dependency>
                 </dependency>
                 <dependency>
+                    <code-name-base>org.netbeans.modules.editor.deprecated.pre65formatting</code-name-base>
+                    <build-prerequisite/>
+                    <compile-dependency/>
+                    <run-dependency>
+                        <release-version>0-1</release-version>
+                        <specification-version>1.4.1.1.5.13.10</specification-version>
+                    </run-dependency>
+                </dependency>
+                <dependency>
                     <code-name-base>org.netbeans.modules.editor.fold</code-name-base>
                     <build-prerequisite/>
                     <compile-dependency/>
@@ -83,6 +92,14 @@
                     </run-dependency>
                 </dependency>
                 <dependency>
+                    <code-name-base>org.openide.util.lookup</code-name-base>
+                    <build-prerequisite/>
+                    <compile-dependency/>
+                    <run-dependency>
+                        <specification-version>8.8.1</specification-version>
+                    </run-dependency>
+                </dependency>
+                <dependency>
                     <code-name-base>org.openide.windows</code-name-base>
                     <build-prerequisite/>
                     <compile-dependency/>
--- a/src/share/tools/IdealGraphVisualizer/View/src/com/sun/hotspot/igv/view/actions/Bundle.properties	Wed Nov 09 11:27:50 2011 +0100
+++ b/src/share/tools/IdealGraphVisualizer/View/src/com/sun/hotspot/igv/view/actions/Bundle.properties	Wed Nov 09 11:36:20 2011 +0100
@@ -1,7 +1,6 @@
 CTL_EditorAction=Open Editor Window
-CTL_LineGeneratorAction=Line Generator
 CTL_NextDiagramAction=Show next graph
 CTL_EnableBlockLayoutAction=Enable block layout
 CTL_NodeFindAction=Find
 CTL_PrevDiagramAction=Show previous graph
-CTL_ExportAction=Export...
+CTL_ExportAction=Export current graph...
--- a/src/share/tools/IdealGraphVisualizer/View/src/com/sun/hotspot/igv/view/actions/ExportAction.java	Wed Nov 09 11:27:50 2011 +0100
+++ b/src/share/tools/IdealGraphVisualizer/View/src/com/sun/hotspot/igv/view/actions/ExportAction.java	Wed Nov 09 11:36:20 2011 +0100
@@ -50,7 +50,7 @@
     private final Lookup.Result<ExportCookie> result;
 
     public ExportAction() {
-        putValue(Action.SHORT_DESCRIPTION, "Export current graph as an SVG file");
+        putValue(Action.SHORT_DESCRIPTION, "Export current graph as SVG file");
         putValue(Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke(KeyEvent.VK_E, InputEvent.CTRL_MASK));
         lookup = Utilities.actionsGlobalContext();
         result = lookup.lookup(new Lookup.Template<ExportCookie>(ExportCookie.class));
--- a/src/share/tools/IdealGraphVisualizer/View/src/com/sun/hotspot/igv/view/layer.xml	Wed Nov 09 11:27:50 2011 +0100
+++ b/src/share/tools/IdealGraphVisualizer/View/src/com/sun/hotspot/igv/view/layer.xml	Wed Nov 09 11:36:20 2011 +0100
@@ -24,30 +24,41 @@
         <folder name="View">
             <file name="com-sun-hotspot-igv-view-actions-PrevDiagramAction.shadow">
                 <attr name="originalFile" stringvalue="Actions/View/com-sun-hotspot-igv-view-actions-PrevDiagramAction.instance"/>
+                <attr name="position" intvalue="100"/>
             </file>
             <file name="com-sun-hotspot-igv-view-actions-NextDiagramAction.shadow">
                 <attr name="originalFile" stringvalue="Actions/View/com-sun-hotspot-igv-view-actions-NextDiagramAction.instance"/>
+                <attr name="position" intvalue="150"/>
             </file>
             <file name="com-sun-hotspot-igv-view-actions-ShowAllAction.shadow">
                 <attr name="originalFile" stringvalue="Actions/View/com-sun-hotspot-igv-view-actions-ShowAllAction.instance"/>
+                <attr name="position" intvalue="200"/>
             </file>
             <file name="com-sun-hotspot-igv-view-actions-ExtractAction.shadow">
                 <attr name="originalFile" stringvalue="Actions/View/com-sun-hotspot-igv-view-actions-ExtractAction.instance"/>
+                <attr name="position" intvalue="300"/>
             </file>
             <file name="com-sun-hotspot-igv-view-actions-HideAction.shadow">
                 <attr name="originalFile" stringvalue="Actions/View/com-sun-hotspot-igv-view-actions-HideAction.instance"/>
+                <attr name="position" intvalue="400"/>
             </file>
             <file name="com-sun-hotspot-igv-view-actions-ZoomInAction.shadow">
                 <attr name="originalFile" stringvalue="Actions/View/com-sun-hotspot-igv-view-actions-ZoomInAction.instance"/>
+                <attr name="position" intvalue="500"/>
             </file>
             <file name="com-sun-hotspot-igv-view-actions-ZoomOutAction.shadow">
                 <attr name="originalFile" stringvalue="Actions/View/com-sun-hotspot-igv-view-actions-ZoomOutAction.instance"/>
+                <attr name="position" intvalue="550"/>
             </file>
         </folder>
         <folder name="File">
+            <file name="ExportActionSeparator.instance">
+                <attr name="instanceClass" stringvalue="javax.swing.JSeparator"/>
+                <attr name="position" intvalue="700"/>
+            </file>
             <file name="com-sun-hotspot-igv-view-actions-ExportAction.shadow">
                 <attr name="originalFile" stringvalue="Actions/File/com-sun-hotspot-igv-view-actions-ExportAction.instance"/>
-                <attr name="position" intvalue="600"/>
+                <attr name="position" intvalue="710"/>
             </file>
         </folder>
     </folder>
@@ -62,9 +73,4 @@
             </file>
         </folder>
     </folder>
-    <folder name="Toolbars">
-        <folder name="Edit">
-            <attr name="com-sun-hotspot-igv-view-actions-LineGeneratorAction.shadow/com-sun-hotspot-igv-coordinator-actions-OpenGraphAction.shadow" boolvalue="true"/>
-        </folder>
-    </folder>
 </filesystem>
--- a/src/share/tools/IdealGraphVisualizer/View/src/com/sun/hotspot/igv/view/widgets/FigureWidget.java	Wed Nov 09 11:27:50 2011 +0100
+++ b/src/share/tools/IdealGraphVisualizer/View/src/com/sun/hotspot/igv/view/widgets/FigureWidget.java	Wed Nov 09 11:36:20 2011 +0100
@@ -43,6 +43,8 @@
 import javax.swing.BorderFactory;
 import javax.swing.JMenu;
 import javax.swing.JPopupMenu;
+import javax.swing.event.MenuEvent;
+import javax.swing.event.MenuListener;
 import org.netbeans.api.visual.action.PopupMenuProvider;
 import org.netbeans.api.visual.action.WidgetAction;
 import org.netbeans.api.visual.model.ObjectState;
@@ -61,7 +63,6 @@
 public class FigureWidget extends Widget implements Properties.Provider, PopupMenuProvider, DoubleClickHandler {
 
     public static final boolean VERTICAL_LAYOUT = true;
-    public static final int DEPTH = 5;
     //public static final int MAX_STRING_LENGTH = 20;
     private static final double LABEL_ZOOM_FACTOR = 0.3;
     private static final double ZOOM_FACTOR = 0.1;
@@ -267,61 +268,84 @@
             getScene().getGraphics().setComposite(oldComposite);
         }
     }
-
+ 
     public JPopupMenu getPopupMenu(Widget widget, Point point) {
-        JPopupMenu m = diagramScene.createPopupMenu();
+        JPopupMenu menu = diagramScene.createPopupMenu();
+        menu.addSeparator();
 
         JMenu predecessors = new JMenu("Nodes Above");
-        addFigureToSubMenu(predecessors, getFigure(), false, DEPTH);
+        predecessors.addMenuListener(new NeighborMenuListener(predecessors, getFigure(), false));
+        menu.add(predecessors);
 
         JMenu successors = new JMenu("Nodes Below");
-        addFigureToSubMenu(successors, getFigure(), true, DEPTH);
+        successors.addMenuListener(new NeighborMenuListener(successors, getFigure(), true));
+        menu.add(successors);
 
-        m.addSeparator();
-        m.add(predecessors);
-        m.add(successors);
-        return m;
+        return menu;
     }
 
-    public void addFigureToSubMenu(JMenu subMenu, final Figure f, boolean successor, int depth) {
-        Set<Figure> set = f.getPredecessorSet();
-        if (successor) {
-            set = f.getSuccessorSet();
-        }
+    /**
+     * Builds the submenu for a figure's neighbors on demand.
+     */
+    private class NeighborMenuListener implements MenuListener {
 
-        int count = set.size();
-        if (set.contains(f)) {
-            count--;
+        private final JMenu menu;
+        private final Figure figure;
+        private final boolean successors;
+
+        public NeighborMenuListener(JMenu menu, Figure figure, boolean successors) {
+            this.menu = menu;
+            this.figure = figure;
+            this.successors = successors;
         }
 
-        for (Figure f2 : set) {
-            if (f2 == f) {
-                continue;
+        public void menuSelected(MenuEvent e) {
+            if (menu.getItemCount() > 0) {
+                // already built before
+                return;
+            }
+
+            Set<Figure> set = figure.getPredecessorSet();
+            if (successors) {
+                set = figure.getSuccessorSet();
             }
 
-            count--;
-            addFigureToMenu(subMenu, f2, successor, depth - 1);
-            if (count > 0) {
-                subMenu.addSeparator();
+            boolean first = true;
+            for (Figure f : set) {
+                if (f == figure) {
+                    continue;
+                }
+
+                if (first) {
+                    first = false;
+                } else {
+                    menu.addSeparator();
+                }
+
+                Action go = diagramScene.createGotoAction(f);
+                menu.add(go);
+
+                JMenu preds = new JMenu("Nodes Above");
+                preds.addMenuListener(new NeighborMenuListener(preds, f, false));
+                menu.add(preds);
+
+                JMenu succs = new JMenu("Nodes Below");
+                succs.addMenuListener(new NeighborMenuListener(succs, f, true));
+                menu.add(succs);
+            }
+
+            if (menu.getItemCount() == 0) {
+                menu.add("(none)");
             }
         }
-    }
 
-    public void addFigureToMenu(JMenu m, final Figure f, boolean successor, int depth) {
-        Action a = diagramScene.createGotoAction(f);
-        m.add(a);
-
-        if (depth > 0) {
-            String name = "Nodes Above";
-            if (successor) {
-                name = "Nodes Below";
-            }
-
-            JMenu subMenu = new JMenu(name);
-            addFigureToSubMenu(subMenu, f, successor, depth);
-            m.add(subMenu);
+        public void menuDeselected(MenuEvent e) {
+            // ignore
         }
 
+        public void menuCanceled(MenuEvent e) {
+            // ignore
+        }
     }
 
     public void handleDoubleClick(Widget w, WidgetAction.WidgetMouseEvent e) {
--- a/src/share/tools/IdealGraphVisualizer/branding.jnlp	Wed Nov 09 11:27:50 2011 +0100
+++ b/src/share/tools/IdealGraphVisualizer/branding.jnlp	Wed Nov 09 11:36:20 2011 +0100
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE jnlp PUBLIC "-//Sun Microsystems, Inc//DTD JNLP Discriptor 1.5//EN" "http://java.sun.com/dtd/JNLP-1.5.dtd">
+<!DOCTYPE jnlp PUBLIC "-//Sun Microsystems, Inc//DTD JNLP Descriptor 6.0//EN" "http://java.sun.com/dtd/JNLP-6.0.dtd">
 <jnlp spec="1.0+" codebase="$$codebase">
   <information>
       <title>${app.title}</title>
--- a/src/share/tools/IdealGraphVisualizer/master.jnlp	Wed Nov 09 11:27:50 2011 +0100
+++ b/src/share/tools/IdealGraphVisualizer/master.jnlp	Wed Nov 09 11:36:20 2011 +0100
@@ -1,10 +1,10 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE jnlp PUBLIC "-//Sun Microsystems, Inc//DTD JNLP Discriptor 1.5//EN" "http://java.sun.com/dtd/JNLP-1.5.dtd">
-<jnlp spec="1.0+" codebase="$$codebase">
+<!DOCTYPE jnlp PUBLIC "-//Sun Microsystems, Inc//DTD JNLP Descriptor 6.0//EN" "http://java.sun.com/dtd/JNLP-6.0.dtd">
+<jnlp spec="1.0+" codebase="$$codebase" href="master.jnlp">
   <information>
-      <title>${app.title}</title>
-      <vendor>${app.title} vendor</vendor>
-      <description>${app.name} application</description>
+      <title>Ideal Graph Visualizer</title>
+      <vendor>Ideal Graph Visualizer Team</vendor>
+      <description>A graph visualization tool designed for analyzing evolving compiler graphs. It was originally designed for the ideal graph in the HotSpot server compiler, but can be used to visualize arbitrary graph data structures.</description>
       <icon href="${app.icon}"/>
   </information>
   <security><all-permissions/></security>
--- a/src/share/vm/graal/graalVMEntries.cpp	Wed Nov 09 11:27:50 2011 +0100
+++ b/src/share/vm/graal/graalVMEntries.cpp	Wed Nov 09 11:36:20 2011 +0100
@@ -334,9 +334,16 @@
   ciMethod* cimethod;
   {
     VM_ENTRY_MARK;
+    assert(hotspot_method != NULL, "must not be null");
     methodOop method = getMethodFromHotSpotMethod(hotspot_method);
+    assert(method != NULL, "method not found");
+    if (CURRENT_ENV == NULL) {
+      return -1;
+    }
+    assert(CURRENT_ENV != NULL, "current environment must be present");
     cimethod = (ciMethod*)CURRENT_ENV->get_object(method);
   }
+  assert(cimethod != NULL, "cimethod not found");
   method_data = cimethod->method_data();
 
   jfloat probability = -1;
@@ -775,6 +782,7 @@
 JNIEXPORT jboolean JNICALL Java_com_oracle_graal_hotspot_VMEntries_RiType_1isInitialized(JNIEnv *, jobject, jobject hotspot_klass) {
   TRACE_graal_3("VMEntries::RiType_isInitialized");
   klassOop klass = java_lang_Class::as_klassOop(HotSpotTypeResolved::javaMirror(hotspot_klass));
+  assert(klass != NULL, "method must not be called for primitive types");
   return instanceKlass::cast(klass)->is_initialized();
 }