equal
deleted
inserted
replaced
226 // may be changing while this is happening which is ok since newly |
226 // may be changing while this is happening which is ok since newly |
227 // created nmethod will notify normally and nmethods which are freed |
227 // created nmethod will notify normally and nmethods which are freed |
228 // can be safely skipped. |
228 // can be safely skipped. |
229 MutexLockerEx mu(CodeCache_lock, Mutex::_no_safepoint_check_flag); |
229 MutexLockerEx mu(CodeCache_lock, Mutex::_no_safepoint_check_flag); |
230 // Iterate over non-profiled and profiled nmethods |
230 // Iterate over non-profiled and profiled nmethods |
231 NMethodIterator iter; |
231 NMethodIterator iter(NMethodIterator::only_alive_and_not_unloading); |
232 while(iter.next_alive()) { |
232 while(iter.next()) { |
233 nmethod* current = iter.method(); |
233 nmethod* current = iter.method(); |
234 // Lock the nmethod so it can't be freed |
234 // Lock the nmethod so it can't be freed |
235 nmethodLocker nml(current); |
235 nmethodLocker nml(current); |
236 |
236 |
237 // Don't hold the lock over the notify or jmethodID creation |
237 // Don't hold the lock over the notify or jmethodID creation |