# HG changeset patch # User vlivanov # Date 1377578899 25200 # Node ID 5afc245c36a759a425e18df06b6f5ed882ada9d5 # Parent 95cc0162a92d95ea6fd7aa22215fee54027213b3# Parent 8ef23b417f553d86f5d0681a6220d9b69c2914eb Merge diff -r 8ef23b417f55 -r 5afc245c36a7 hotspot/src/share/vm/code/nmethod.cpp --- a/hotspot/src/share/vm/code/nmethod.cpp Mon Aug 26 17:41:05 2013 +0400 +++ b/hotspot/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"); }