src/share/vm/runtime/sweeper.cpp
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File
*** old/src/share/vm/runtime/sweeper.cpp Fri Nov 14 16:56:35 2014
--- new/src/share/vm/runtime/sweeper.cpp Fri Nov 14 16:56:35 2014
*** 387,397 ****
--- 387,396 ----
MutexLockerEx mu(CodeCache_lock, Mutex::_no_safepoint_check_flag);
// The last invocation iterates until there are no more nmethods
while (!_current.end()) {
swept_count++;
handle_safepoint_request();
// Since we will give up the CodeCache_lock, always skip ahead
// to the next nmethod. Other blobs can be deleted by other
// threads but nmethods are only reclaimed by the sweeper.
nmethod* nm = _current.method();
_current.next();
*** 400,409 ****
--- 399,409 ----
{
MutexUnlockerEx mu(CodeCache_lock, Mutex::_no_safepoint_check_flag);
freed_memory += process_nmethod(nm);
}
_seen++;
+ handle_safepoint_request();
}
}
assert(_current.end(), "must have scanned the whole cache");
*** 510,519 ****
--- 510,520 ----
MutexLockerEx mu(CodeCache_lock, Mutex::_no_safepoint_check_flag);
nm->flush();
}
int NMethodSweeper::process_nmethod(nmethod* nm) {
+ assert(nm != NULL, "sanity");
assert(!CodeCache_lock->owned_by_self(), "just checking");
int freed_memory = 0;
// Make sure this nmethod doesn't get unloaded during the scan,
// since safepoints may happen during acquired below locks.
src/share/vm/runtime/sweeper.cpp
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File