< prev index next >

src/hotspot/share/prims/jvmtiCodeBlobEvents.cpp


*** 226,237 **** // 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 --- 226,237 ---- // 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(true /* only_alive */, true /* only_not_unloading */); ! while(iter.next()) { 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
< prev index next >