changeset 12521:ef0de9485627

Merge
author Mick Jordan <mick.jordan@oracle.com>
date Tue, 22 Oct 2013 08:35:26 -0700
parents 8ee3a8dd762e (current diff) b2882f4ab612 (diff)
children 5ccee20550ea
files mxtool/mx.py
diffstat 13 files changed, 123 insertions(+), 93 deletions(-) [+]
line wrap: on
line diff
--- a/graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/CompilationResult.java	Mon Oct 21 20:36:08 2013 -0700
+++ b/graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/CompilationResult.java	Tue Oct 22 08:35:26 2013 -0700
@@ -326,6 +326,8 @@
     private int customStackAreaOffset = -1;
     private int registerRestoreEpilogueOffset = -1;
 
+    private final String name;
+
     /**
      * The buffer containing the emitted machine code.
      */
@@ -347,6 +349,14 @@
      */
     private long[] leafGraphIds;
 
+    public CompilationResult() {
+        this(null);
+    }
+
+    public CompilationResult(String name) {
+        this.name = name;
+    }
+
     public void setAssumptions(Assumptions assumptions) {
         this.assumptions = assumptions;
     }
@@ -620,4 +630,8 @@
         }
         return unmodifiableList(marks);
     }
+
+    public String getName() {
+        return name;
+    }
 }
--- a/graal/com.oracle.graal.graph/src/com/oracle/graal/graph/NodeClass.java	Mon Oct 21 20:36:08 2013 -0700
+++ b/graal/com.oracle.graal.graph/src/com/oracle/graal/graph/NodeClass.java	Tue Oct 22 08:35:26 2013 -0700
@@ -1194,7 +1194,7 @@
                     }
 
                     public Position next() {
-                        Position pos = new Position(true, i, i >= directInputCount ? 0 : NOT_ITERABLE);
+                        Position pos = new Position(true, i, i >= directInputCount ? NODE_LIST : NOT_ITERABLE);
                         i++;
                         return pos;
                     }
@@ -1224,7 +1224,7 @@
                     }
 
                     public Position next() {
-                        Position pos = new Position(false, i, i >= directSuccessorCount ? 0 : NOT_ITERABLE);
+                        Position pos = new Position(false, i, i >= directSuccessorCount ? NODE_LIST : NOT_ITERABLE);
                         i++;
                         return pos;
                     }
--- a/graal/com.oracle.graal.hotspot.test/src/com/oracle/graal/hotspot/test/HotSpotCryptoSubstitutionTest.java	Mon Oct 21 20:36:08 2013 -0700
+++ b/graal/com.oracle.graal.hotspot.test/src/com/oracle/graal/hotspot/test/HotSpotCryptoSubstitutionTest.java	Tue Oct 22 08:35:26 2013 -0700
@@ -48,7 +48,7 @@
     @Override
     protected InstalledCode addMethod(ResolvedJavaMethod method, CompilationResult compResult) {
         HotSpotResolvedJavaMethod hsMethod = (HotSpotResolvedJavaMethod) method;
-        HotSpotNmethod installedCode = new HotSpotNmethod(hsMethod, true);
+        HotSpotNmethod installedCode = new HotSpotNmethod(hsMethod, compResult.getName(), true);
         HotSpotCompiledNmethod compiledNmethod = new HotSpotCompiledNmethod(hsMethod, StructuredGraph.INVOCATION_ENTRY_BCI, compResult);
         CodeInstallResult result = runtime().getCompilerToVM().installCode(compiledNmethod, installedCode, null);
         Assert.assertEquals("Error installing method " + method + ": " + result, result, CodeInstallResult.OK);
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotCodeCacheProvider.java	Mon Oct 21 20:36:08 2013 -0700
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotCodeCacheProvider.java	Tue Oct 22 08:35:26 2013 -0700
@@ -157,7 +157,7 @@
     }
 
     public HotSpotInstalledCode installMethod(HotSpotResolvedJavaMethod method, int entryBCI, CompilationResult compResult) {
-        HotSpotInstalledCode installedCode = new HotSpotNmethod(method, true);
+        HotSpotInstalledCode installedCode = new HotSpotNmethod(method, compResult.getName(), true);
         runtime.getCompilerToVM().installCode(new HotSpotCompiledNmethod(method, entryBCI, compResult), installedCode, method.getSpeculationLog());
         return installedCode;
     }
@@ -165,7 +165,7 @@
     @Override
     public InstalledCode addMethod(ResolvedJavaMethod method, CompilationResult compResult) {
         HotSpotResolvedJavaMethod hotspotMethod = (HotSpotResolvedJavaMethod) method;
-        HotSpotInstalledCode code = new HotSpotNmethod(hotspotMethod, false);
+        HotSpotInstalledCode code = new HotSpotNmethod(hotspotMethod, compResult.getName(), false);
         CodeInstallResult result = runtime.getCompilerToVM().installCode(new HotSpotCompiledNmethod(hotspotMethod, -1, compResult), code, null);
         if (result != CodeInstallResult.OK) {
             return null;
@@ -176,7 +176,7 @@
     public InstalledCode addExternalMethod(ResolvedJavaMethod method, CompilationResult compResult) {
 
         HotSpotResolvedJavaMethod javaMethod = (HotSpotResolvedJavaMethod) method;
-        HotSpotInstalledCode icode = new HotSpotNmethod(javaMethod, false, true);
+        HotSpotInstalledCode icode = new HotSpotNmethod(javaMethod, compResult.getName(), false, true);
         HotSpotCompiledNmethod compiled = new HotSpotCompiledNmethod(javaMethod, -1, compResult);
         CompilerToVM vm = runtime.getCompilerToVM();
         CodeInstallResult result = vm.installCode(compiled, icode, null);
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotNmethod.java	Mon Oct 21 20:36:08 2013 -0700
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotNmethod.java	Tue Oct 22 08:35:26 2013 -0700
@@ -46,17 +46,17 @@
     private final HotSpotResolvedJavaMethod method;
     private final boolean isDefault;
     private final boolean isExternal;
+    private final String name;
 
-    public HotSpotNmethod(HotSpotResolvedJavaMethod method, boolean isDefault) {
-        this.method = method;
-        this.isDefault = isDefault;
-        this.isExternal = false;
+    public HotSpotNmethod(HotSpotResolvedJavaMethod method, String name, boolean isDefault) {
+        this(method, name, isDefault, false);
     }
 
-    public HotSpotNmethod(HotSpotResolvedJavaMethod method, boolean isDefault, boolean isExternal) {
+    public HotSpotNmethod(HotSpotResolvedJavaMethod method, String name, boolean isDefault, boolean isExternal) {
         this.method = method;
         this.isDefault = isDefault;
         this.isExternal = isExternal;
+        this.name = name;
     }
 
     public boolean isDefault() {
@@ -84,7 +84,7 @@
 
     @Override
     public String toString() {
-        return String.format("InstalledNmethod[method=%s, codeBlob=0x%x, isDefault=%b]", method, getCodeBlob(), isDefault);
+        return String.format("InstalledNmethod[method=%s, codeBlob=0x%x, isDefault=%b, name=]", method, getCodeBlob(), isDefault, name);
     }
 
     @Override
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/GuardNode.java	Mon Oct 21 20:36:08 2013 -0700
+++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/GuardNode.java	Tue Oct 22 08:35:26 2013 -0700
@@ -45,7 +45,7 @@
 
     @Input private LogicNode condition;
     private final DeoptimizationReason reason;
-    private final DeoptimizationAction action;
+    private DeoptimizationAction action;
     private boolean negated;
 
     public GuardNode(LogicNode condition, GuardingNode anchor, DeoptimizationReason reason, DeoptimizationAction action, boolean negated) {
@@ -107,4 +107,8 @@
     public void negate() {
         negated = !negated;
     }
+
+    public void setAction(DeoptimizationAction invalidaterecompile) {
+        this.action = invalidaterecompile;
 }
+}
--- a/graal/com.oracle.graal.printer/src/com/oracle/graal/printer/BinaryGraphPrinter.java	Mon Oct 21 20:36:08 2013 -0700
+++ b/graal/com.oracle.graal.printer/src/com/oracle/graal/printer/BinaryGraphPrinter.java	Tue Oct 22 08:35:26 2013 -0700
@@ -407,6 +407,7 @@
             writeInt(node.getId());
             writePoolObject(nodeClass);
             writeByte(node.predecessor() == null ? 0 : 1);
+            // properties
             writeShort((char) props.size());
             for (Entry<Object, Object> entry : props.entrySet()) {
                 String key = entry.getKey().toString();
@@ -414,54 +415,42 @@
                 writePropertyObject(entry.getValue());
             }
             // inputs
-            Collection<Position> directInputPositions = nodeClass.getFirstLevelInputPositions();
-            for (Position pos : directInputPositions) {
-                if (pos.subIndex == NodeClass.NOT_ITERABLE) {
-                    Node in = nodeClass.get(node, pos);
-                    if (in != null) {
-                        writeInt(in.getId());
-                    } else {
-                        writeInt(-1);
-                    }
+            writeEdges(node, nodeClass.getFirstLevelInputPositions());
+            // successors
+            writeEdges(node, nodeClass.getFirstLevelSuccessorPositions());
+
+            props.clear();
+        }
+    }
+
+    private void writeEdges(Node node, Collection<Position> positions) throws IOException {
+        NodeClass nodeClass = node.getNodeClass();
+        for (Position pos : positions) {
+            if (pos.subIndex == NodeClass.NOT_ITERABLE) {
+                Node edge = nodeClass.get(node, pos);
+                writeNodeRef(edge);
+            } else {
+                NodeList<?> list = nodeClass.getNodeList(node, pos);
+                if (list == null) {
+                    writeShort((char) 0);
                 } else {
-                    NodeList<?> list = nodeClass.getNodeList(node, pos);
                     int listSize = list.count();
                     assert listSize == ((char) listSize);
                     writeShort((char) listSize);
-                    for (Node in : list) {
-                        if (in != null) {
-                            writeInt(in.getId());
-                        } else {
-                            writeInt(-1);
-                        }
+                    for (Node edge : list) {
+                        writeNodeRef(edge);
                     }
                 }
             }
-            // successors
-            Collection<Position> directSuccessorPositions = nodeClass.getFirstLevelSuccessorPositions();
-            for (Position pos : directSuccessorPositions) {
-                if (pos.subIndex == NodeClass.NOT_ITERABLE) {
-                    Node sux = nodeClass.get(node, pos);
-                    if (sux != null) {
-                        writeInt(sux.getId());
-                    } else {
-                        writeInt(-1);
-                    }
-                } else {
-                    NodeList<?> list = nodeClass.getNodeList(node, pos);
-                    int listSize = list.count();
-                    assert listSize == ((char) listSize);
-                    writeShort((char) listSize);
-                    for (Node sux : list) {
-                        if (sux != null) {
-                            writeInt(sux.getId());
-                        } else {
-                            writeInt(-1);
-                        }
-                    }
-                }
-            }
-            props.clear();
+        }
+    }
+
+    @SuppressWarnings("deprecation")
+    private void writeNodeRef(Node edge) throws IOException {
+        if (edge != null) {
+            writeInt(edge.getId());
+        } else {
+            writeInt(-1);
         }
     }
 
--- a/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/TruffleCompilerImpl.java	Mon Oct 21 20:36:08 2013 -0700
+++ b/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/TruffleCompilerImpl.java	Tue Oct 22 08:35:26 2013 -0700
@@ -154,7 +154,7 @@
                     CodeCacheProvider codeCache = providers.getCodeCache();
                     CallingConvention cc = getCallingConvention(codeCache, Type.JavaCallee, graph.method(), false);
                     return GraalCompiler.compileGraph(graph, cc, graph.method(), providers, backend, codeCache.getTarget(), null, plan, OptimisticOptimizations.ALL, new SpeculationLog(), suites,
-                                    new CompilationResult());
+                                    new CompilationResult(compilable.toString()));
                 }
             }
         });
--- a/mxtool/mx.py	Mon Oct 21 20:36:08 2013 -0700
+++ b/mxtool/mx.py	Tue Oct 22 08:35:26 2013 -0700
@@ -504,44 +504,48 @@
     """
     def __init__(self):
         self.missing = 'no hg executable found'
-        try:
-            subprocess.check_output(['hg'])
-            self.has_hg = True
-        except OSError:
-            self.has_hg = False
-            warn(self.missing)
-
-    def _check(self, abortOnFail=True):
+        self.has_hg = None
+
+    def check(self, abortOnFail=True):
+        if self.has_hg is None:
+            try:
+                subprocess.check_output(['hg'])
+                self.has_hg = True
+            except OSError:
+                self.has_hg = False
+                warn(self.missing)
+            
         if not self.has_hg:
             if abortOnFail:
                 abort(self.missing)
             else:
                 warn(self.missing)
-        return self.has_hg
-
-    def _tip(self, s, abortOnError=True):
-        if not self.has_hg:
-            return None
+
+    def tip(self, s, abortOnError=True):
         try:
             version = subprocess.check_output(['hg', 'tip', '-R', s.dir, '--template', '{node}'])
             if s.version is not None and s.version != version:
                 abort('version of suite ' + s.name +' has changed during run')
             return version
+        except OSError:
+            warn(self.missing)
         except subprocess.CalledProcessError:
             if abortOnError:
                 abort('failed to get tip revision id')
             else:
                 return None
 
-    def _canpush(self, s, strict=True):
+    def can_push(self, s, strict=True):
         try:
             output = subprocess.check_output(['hg', '-R', s.dir, 'status'])
             # super strict
             return output == ''
+        except OSError:
+            warn(self.missing)
         except subprocess.CalledProcessError:
             return False
 
-    def _default_push(self, sdir):
+    def default_push(self, sdir):
         with open(join(sdir, '.hg', 'hgrc')) as f:
             for line in f:
                 line = line.rstrip()
@@ -763,8 +767,9 @@
         self.commands = None
         self.primary = primary
         self.name = _suitename(mxDir)  # validated in _load_projects
-        self.version = None  # _hg._tip checks current version if not None
-        self.version = _hg._tip(self, False)
+        self.version = None  # _hg.tip checks current version if not None
+        # TODO this forces hg to be run every time mx is run
+        #self.version = _hg.tip(self, False)
         if load:
             # load suites bottom up to make sure command overriding works properly
             self._load_imports()
@@ -2979,12 +2984,12 @@
                 out.close('buildCommand')
 
         if _isAnnotationProcessorDependency(p):
-            _genEclipseBuilder(out, p, 'Jar.launch', 'archive ' + p.name, refresh=False, async=False, xmlIndent='', xmlStandalone='no')
-            _genEclipseBuilder(out, p, 'Refresh.launch', '', refresh=True, async=True)
+            _genEclipseBuilder(out, p, 'Jar', 'archive ' + p.name, refresh=False, async=False, xmlIndent='', xmlStandalone='no')
+            _genEclipseBuilder(out, p, 'Refresh', '', refresh=True, async=True)
 
         if projToDist.has_key(p.name):
             dist, distDeps = projToDist[p.name]
-            _genEclipseBuilder(out, p, 'Create' + dist.name + 'Dist.launch', 'archive @' + dist.name, refresh=False, async=True)
+            _genEclipseBuilder(out, p, 'Create' + dist.name + 'Dist', 'archive @' + dist.name, logToFile=True, refresh=False, async=True)
 
         out.close('buildSpec')
         out.open('natures')
@@ -3046,7 +3051,8 @@
     """
     return p in sorted_deps(annotation_processors())
 
-def _genEclipseBuilder(dotProjectDoc, p, name, mxCommand, refresh=True, async=False, logToConsole=False, xmlIndent='\t', xmlStandalone=None):
+def _genEclipseBuilder(dotProjectDoc, p, name, mxCommand, refresh=True, async=False, logToConsole=False, logToFile=False, appendToLogFile=True, xmlIndent='\t', xmlStandalone=None):
+    externalToolDir = join(p.dir, '.externalToolBuilders')
     launchOut = XMLDoc()
     consoleOn = 'true' if logToConsole else 'false'
     launchOut.open('launchConfiguration', {'type' : 'org.eclipse.ui.externaltools.ProgramBuilderLaunchConfigurationType'})
@@ -3059,6 +3065,10 @@
         launchOut.element('stringAttribute', {'key' : 'org.eclipse.debug.core.ATTR_REFRESH_SCOPE', 'value': '${project}'})
     launchOut.element('booleanAttribute', {'key' : 'org.eclipse.debug.ui.ATTR_CONSOLE_OUTPUT_ON', 'value': consoleOn})
     launchOut.element('booleanAttribute', {'key' : 'org.eclipse.debug.ui.ATTR_LAUNCH_IN_BACKGROUND', 'value': 'true' if async else 'false'})
+    if logToFile:
+        logFile = join(externalToolDir, name + '.log')
+        launchOut.element('booleanAttribute', {'key' : 'org.eclipse.debug.ui.ATTR_CAPTURE_IN_FILE', 'value': logFile})
+        launchOut.element('booleanAttribute', {'key' : 'org.eclipse.debug.ui.ATTR_APPEND_TO_FILE', 'value': 'true' if appendToLogFile else 'false'})
 
     # expect to find the OS command to invoke mx in the same directory
     baseDir = dirname(os.path.abspath(__file__))
@@ -3082,11 +3092,9 @@
 
     launchOut.close('launchConfiguration')
 
-    externalToolDir = join(p.dir, '.externalToolBuilders')
-
     if not exists(externalToolDir):
         os.makedirs(externalToolDir)
-    update_file(join(externalToolDir, name), launchOut.xml(indent=xmlIndent, standalone=xmlStandalone, newl='\n'))
+    update_file(join(externalToolDir, name + '.launch'), launchOut.xml(indent=xmlIndent, standalone=xmlStandalone, newl='\n'))
 
     dotProjectDoc.open('buildCommand')
     dotProjectDoc.element('name', data='org.eclipse.ui.externaltools.ExternalToolBuilder')
@@ -3094,7 +3102,7 @@
     dotProjectDoc.open('arguments')
     dotProjectDoc.open('dictionary')
     dotProjectDoc.element('key', data='LaunchConfigHandle')
-    dotProjectDoc.element('value', data='<project>/.externalToolBuilders/' + name)
+    dotProjectDoc.element('value', data='<project>/.externalToolBuilders/' + name + '.launch')
     dotProjectDoc.close('dictionary')
     dotProjectDoc.open('dictionary')
     dotProjectDoc.element('key', data='incclean')
@@ -3943,7 +3951,7 @@
 
 def sclone(args):
     """clone a suite repository, and its imported suites"""
-    _hg._check(True)
+    _hg.check(True)
     parser = ArgumentParser(prog='mx sclone')
     parser.add_argument('--source', help='url/path of repo containing suite', metavar='<url>')
     parser.add_argument('--dest', help='destination directory (default basename of source)', metavar='<path>')
@@ -4032,7 +4040,7 @@
 
 def scloneimports(args):
     """clone the imports of an existing suite"""
-    _hg._check(True)
+    _hg.check(True)
     parser = ArgumentParser(prog='mx scloneimports')
     parser.add_argument('--source', help='url/path of repo containing suite', metavar='<url>')
     parser.add_argument('nonKWArgs', nargs=REMAINDER, metavar='source [dest]...')
@@ -4046,7 +4054,7 @@
 
     s = _scloneimports_suitehelper(args.source)
 
-    default_path = _hg._default_push(args.source)
+    default_path = _hg.default_push(args.source)
 
     if default_path is None:
         abort('no default path in ' + join(args.source, '.hg', 'hgrc'))
@@ -4065,13 +4073,13 @@
 
 def _spush_check_import_visitor(s, suite_import, **extra_args):
     """push check visitor for Suite._visit_imports"""
-    currentTip = _hg._tip(suite(suite_import.name))
+    currentTip = _hg.tip(suite(suite_import.name))
     if currentTip != suite_import.version:
         abort('import version of ' + suite_import.name + ' in suite ' + s.name + ' does not match tip')
 
 def _spush(s, suite_import, dest, checks, clonemissing):
     if checks:
-        if not _hg._canpush(s):
+        if not _hg.can_push(s):
             abort('working directory ' + s.dir + ' contains uncommitted changes, push aborted')
 
     # check imports first
@@ -4111,7 +4119,7 @@
 
 def spush(args):
     """push primary suite and all its imports"""
-    _hg._check(True)
+    _hg.check(True)
     parser = ArgumentParser(prog='mx spush')
     parser.add_argument('--dest', help='url/path of repo to push to (default as per hg push)', metavar='<path>')
     parser.add_argument('--no-checks', action='store_true', help='checks on status, versions are disabled')
@@ -4149,7 +4157,7 @@
 def supdate(args):
     """update primary suite and all its imports"""
 
-    _hg._check(True)
+    _hg.check(True)
     s = _check_primary_suite()
 
     _supdate(s, None)
@@ -4162,7 +4170,7 @@
     # check imports recursively
     s._visit_imports(_scheck_imports_visitor, update_versions=update_versions)
 
-    currentTip = _hg._tip(s)
+    currentTip = _hg.tip(s)
     if currentTip != suite_import.version:
         print('import version of ' + s.name + ' does not match tip' + (': updating' if update_versions else ''))
 
@@ -4183,18 +4191,18 @@
     _spull(suite(suite_import.name), update_versions, updated_imports)
 
 def _spull(s, update_versions, updated_imports):
-    _hg._check(True)
+    _hg.check(True)
     # pull imports first
     s._visit_imports(_spull_import_visitor, update_versions=update_versions)
 
     run(['hg', '-R', s.dir, 'pull', '-u'])
     if update_versions and updated_imports is not None:
-        tip = _hg._tip(s)
+        tip = _hg.tip(s)
         updated_imports.write(SuiteImport._tostring(s.name, tip) + '\n')
 
 def spull(args):
     """pull primary suite and all its imports"""
-    _hg._check(True)
+    _hg.check(True)
     parser = ArgumentParser(prog='mx spull')
     parser.add_argument('--update-versions', action='store_true', help='update version ids of imported suites')
     args = parser.parse_args(args)
--- a/src/share/tools/IdealGraphVisualizer/nbproject/project.properties	Mon Oct 21 20:36:08 2013 -0700
+++ b/src/share/tools/IdealGraphVisualizer/nbproject/project.properties	Tue Oct 22 08:35:26 2013 -0700
@@ -40,5 +40,5 @@
 
 # Disable assertions for RequestProcessor to prevent annoying messages in case
 # of multiple SceneAnimator update tasks in the default RequestProcessor.
-run.args.extra = -J-server -J-da:org.openide.util.RequestProcessor -J-Xms2g -J-Xmx4g
+run.args.extra = -J-server -J-da:org.openide.util.RequestProcessor -J-Xms2g -J-Xmx8g
 debug.args.extra = -J-server -J-da:org.openide.util.RequestProcessor
--- a/src/share/vm/graal/graalGlobals.hpp	Mon Oct 21 20:36:08 2013 -0700
+++ b/src/share/vm/graal/graalGlobals.hpp	Tue Oct 22 08:35:26 2013 -0700
@@ -55,7 +55,7 @@
   product(intx, TraceGraal, 0,                                              \
           "Trace level for Graal")                                          \
                                                                             \
-  product(bool, GraalDeferredInitBarriers, true,                            \
+  product(bool, GraalDeferredInitBarriers, false,                           \
           "Defer write barriers of young objects")                          \
                                                                             \
   develop(bool, GraalUseFastLocking, true,                                  \
--- a/src/share/vm/graal/graalJavaAccess.hpp	Mon Oct 21 20:36:08 2013 -0700
+++ b/src/share/vm/graal/graalJavaAccess.hpp	Tue Oct 22 08:35:26 2013 -0700
@@ -85,6 +85,7 @@
   start_class(HotSpotNmethod)                                                                                                                                  \
     boolean_field(HotSpotNmethod, isDefault)                                                                                                                   \
     boolean_field(HotSpotNmethod, isExternal)                                                                                                                  \
+    oop_field(HotSpotNmethod, name, "Ljava/lang/String;")                                                                                                      \
   end_class                                                                                                                                                    \
   start_class(HotSpotCompiledCode)                                                                                                                             \
     oop_field(HotSpotCompiledCode, comp, "Lcom/oracle/graal/api/code/CompilationResult;")                                                                      \
--- a/src/share/vm/runtime/deoptimization.cpp	Mon Oct 21 20:36:08 2013 -0700
+++ b/src/share/vm/runtime/deoptimization.cpp	Tue Oct 22 08:35:26 2013 -0700
@@ -89,6 +89,7 @@
 
 #ifdef GRAAL
 #include "graal/graalCompiler.hpp"
+#include "graal/graalJavaAccess.hpp"
 #endif
 
 
@@ -1420,6 +1421,19 @@
       if (TraceDeoptimization) {  // make noise on the tty
         tty->print("Uncommon trap occurred in");
         nm->method()->print_short_name(tty);
+#ifdef GRAAL
+        oop installedCode = nm->graal_installed_code();
+        if (installedCode != NULL) {
+          oop installedCodeName = HotSpotNmethod::name(installedCode);
+          if (installedCodeName != NULL) {
+            tty->print(" (Graal: installedCodeName=%s) ", java_lang_String::as_utf8_string(installedCodeName));
+          } else {
+            tty->print(" (Graal: installed code has no name) ");
+          }
+        } else {
+          tty->print(" (Graal: no installed code) ");
+        }
+#endif //GRAAL
         tty->print(" (@" INTPTR_FORMAT ") thread=" UINTX_FORMAT " reason=%s action=%s unloaded_class_index=%d",
                    fr.pc(),
                    os::current_thread_id(),