# HG changeset patch # User vlivanov # Date 1377578899 25200 # Node ID 022415fe638ef78f24c14c6ca1d26dc84a9bb651 # Parent e1fbb86b47e45326c52b9895d90731fc83b8b9d5# Parent 74608df95ba3d5890e1fbf60048bcc6ef7a0c1b8 Merge diff -r 74608df95ba3 -r 022415fe638e src/share/vm/code/nmethod.cpp --- a/src/share/vm/code/nmethod.cpp Mon Aug 26 17:41:05 2013 +0400 +++ b/src/share/vm/code/nmethod.cpp Mon Aug 26 21:48:19 2013 -0700 @@ -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"); }