src/share/vm/prims/jvmtiCodeBlobEvents.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File
*** old/src/share/vm/prims/jvmtiCodeBlobEvents.cpp	Wed Oct  9 15:17:18 2013
--- new/src/share/vm/prims/jvmtiCodeBlobEvents.cpp	Wed Oct  9 15:17:17 2013

*** 209,231 **** --- 209,233 ---- // Walk the CodeCache notifying for live nmethods. The code cache // may be changing while this is happening which is ok since newly // created nmethod will notify normally and nmethods which are freed // can be safely skipped. MutexLockerEx mu(CodeCache_lock, Mutex::_no_safepoint_check_flag); nmethod* current = CodeCache::first_nmethod(); ! while (current != NULL) { + // Iterate over non-profiled and profiled nmethods ! for (int code_blob_type = CodeBlobType::MethodNoProfile; code_blob_type <= CodeBlobType::MethodProfile; ++code_blob_type) { // Only notify for live nmethods if (current->is_alive()) { + nmethod* current = (nmethod*) CodeCache::first_alive_blob(code_blob_type); + while (current != NULL) { // Lock the nmethod so it can't be freed nmethodLocker nml(current); // Don't hold the lock over the notify or jmethodID creation MutexUnlockerEx mu(CodeCache_lock, Mutex::_no_safepoint_check_flag); current->get_and_cache_jmethod_id(); JvmtiExport::post_compiled_method_load(current); + + current = (nmethod*) CodeCache::next_alive_blob(current, code_blob_type); } current = CodeCache::next_nmethod(current); } return JVMTI_ERROR_NONE; }

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