src/share/vm/code/nmethod.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File
*** old/src/share/vm/code/nmethod.cpp	Wed Aug 21 09:41:17 2013
--- new/src/share/vm/code/nmethod.cpp	Wed Aug 21 09:41:17 2013

*** 91,112 **** --- 91,115 ---- #define DTRACE_METHOD_UNLOAD_PROBE(method) #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; + // method() == NULL can happen during debug printing or if the nmethod is zombie + assert(method() == NULL || !is_native_method(), "native methods have no compiler"); 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; + // method() == NULL can happen during debug printing or if the nmethod is zombie + assert(method() == NULL || !is_native_method(), "native methods have no compiler"); 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; + // method() == NULL can happen during debug printing or if the nmethod is zombie + assert(method() == NULL || !is_native_method(), "native methods have no compiler"); return compiler()->is_shark(); }
*** 1380,1389 **** --- 1383,1394 ---- #ifdef ASSERT // It's no longer safe to access the oops section since zombie // nmethods aren't scanned for GC. _oops_are_stale = true; #endif + _method = NULL; // the Method may be reclaimed by class unloading + // now that the nmethod is in zombie state } else { assert(state == not_entrant, "other cases may need to be handled differently"); } if (TraceCreateZombies) {

src/share/vm/code/nmethod.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File