changeset 13230:01080e31692d

fixed crash when TraceCreateZombies is enabled
author Doug Simon <doug.simon@oracle.com>
date Tue, 03 Dec 2013 16:35:41 +0100
parents 325b4e4efb60
children dad021298158
files src/share/vm/code/nmethod.cpp
diffstat 1 files changed, 5 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/vm/code/nmethod.cpp	Tue Dec 03 16:33:41 2013 +0100
+++ b/src/share/vm/code/nmethod.cpp	Tue Dec 03 16:35:41 2013 +0100
@@ -1523,15 +1523,15 @@
     assert(state == not_entrant, "other cases may need to be handled differently");
   }
 #ifdef GRAAL
-      if (_graal_installed_code != NULL) {
-        // Break the link between nmethod and HotSpotInstalledCode such that the nmethod can subsequently be flushed safely.
-        HotSpotInstalledCode::set_codeBlob(_graal_installed_code, 0);
-      }
+  if (_graal_installed_code != NULL) {
+    // Break the link between nmethod and HotSpotInstalledCode such that the nmethod can subsequently be flushed safely.
+    HotSpotInstalledCode::set_codeBlob(_graal_installed_code, 0);
+  }
 #endif
 
   if (TraceCreateZombies) {
     ResourceMark m;
-    tty->print_cr("nmethod <" INTPTR_FORMAT "> %s code made %s", this, this->method()->name_and_sig_as_C_string(), (state == not_entrant) ? "not entrant" : "zombie");
+    tty->print_cr("nmethod <" INTPTR_FORMAT "> %s code made %s", this, this->method() ? this->method()->name_and_sig_as_C_string() : "null", (state == not_entrant) ? "not entrant" : "zombie");
   }
 
   NMethodSweeper::report_state_change(this);