Mercurial > hg > truffle
diff src/share/vm/code/nmethod.cpp @ 12175:3bfb204913de
Merge
author | adlertz |
---|---|
date | Thu, 05 Sep 2013 10:39:10 +0200 |
parents | 9758d9f36299 e1fbb86b47e4 |
children | 190899198332 510fbd28919c |
line wrap: on
line diff
--- a/src/share/vm/code/nmethod.cpp Sun Sep 01 10:37:01 2013 -0400 +++ b/src/share/vm/code/nmethod.cpp Thu Sep 05 10:39:10 2013 +0200 @@ -93,18 +93,21 @@ #endif bool nmethod::is_compiled_by_c1() const { - if (compiler() == NULL || method() == NULL) return false; // can happen during debug printing - if (is_native_method()) return false; + if (compiler() == NULL) { + return false; + } return compiler()->is_c1(); } 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; + if (compiler() == NULL) { + return false; + } return compiler()->is_c2(); } bool nmethod::is_compiled_by_shark() const { - if (is_native_method()) return false; - assert(compiler() != NULL, "must be"); + if (compiler() == NULL) { + return false; + } return compiler()->is_shark(); } @@ -1401,6 +1404,9 @@ // nmethods aren't scanned for GC. _oops_are_stale = true; #endif + // the Method may be reclaimed by class unloading now that the + // nmethod is in zombie state + set_method(NULL); } else { assert(state == not_entrant, "other cases may need to be handled differently"); }