diff src/share/vm/code/nmethod.cpp @ 7125:1baf7f1e3f23

decoupled C++ Graal runtime from C1
author Doug Simon <doug.simon@oracle.com>
date Mon, 03 Dec 2012 15:32:17 +0100
parents 60bef2672469
children 5d0bb7d52783
line wrap: on
line diff
--- a/src/share/vm/code/nmethod.cpp	Mon Dec 03 13:56:13 2012 +0100
+++ b/src/share/vm/code/nmethod.cpp	Mon Dec 03 15:32:17 2012 +0100
@@ -102,6 +102,11 @@
   if (is_native_method()) return false;
   return compiler()->is_c1();
 }
+bool nmethod::is_compiled_by_graal() const {
+  if (compiler() == NULL || method() == NULL)  return false;  // can happen during debug printing
+  if (is_native_method()) return false;
+  return compiler()->is_graal();
+}
 bool nmethod::is_compiled_by_c2() const {
   if (compiler() == NULL || method() == NULL)  return false;  // can happen during debug printing
   if (is_native_method()) return false;
@@ -864,7 +869,7 @@
 #ifdef GRAAL
     _graal_installed_code = installed_code();
 
-    // graal produces no (!) stub section
+    // Graal might not produce any stub sections
     if (offsets->value(CodeOffsets::Exceptions) != -1) {
       _exception_offset        = code_offset()          + offsets->value(CodeOffsets::Exceptions);
     } else {
@@ -2552,6 +2557,8 @@
     tty->print("(c2) ");
   } else if (is_compiled_by_shark()) {
     tty->print("(shark) ");
+  } else if (is_compiled_by_graal()) {
+    tty->print("(Graal) ");
   } else {
     tty->print("(nm) ");
   }