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

src/share/vm/prims/jvmtiCodeBlobEvents.cpp

Print this page

        

*** 209,231 **** // 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) { // Only notify for live nmethods ! if (current->is_alive()) { // 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 = CodeCache::next_nmethod(current); } return JVMTI_ERROR_NONE; } --- 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); ! // 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 ! 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); } } return JVMTI_ERROR_NONE; }
src/share/vm/prims/jvmtiCodeBlobEvents.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File