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

src/share/vm/prims/jvmtiCodeBlobEvents.cpp

Print this page

        

*** 226,249 **** // 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; } // create a C-heap allocated address location map for an nmethod --- 226,247 ---- // 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 ! NMethodIterator iter; ! while(iter.next_alive()) { ! nmethod* current = iter.method(); // 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); } return JVMTI_ERROR_NONE; } // create a C-heap allocated address location map for an nmethod
src/share/vm/prims/jvmtiCodeBlobEvents.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File