Mercurial > hg > truffle
diff src/share/vm/code/nmethod.cpp @ 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 | f9f4503a4ab5 |
children | 02f27ecb4f3a |
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);