< prev index next >
src/share/vm/code/codeCache.cpp
Print this page
*** 743,759 ****
void CodeCache::gc_prologue() {
}
void CodeCache::gc_epilogue() {
assert_locked_or_safepoint(CodeCache_lock);
NMethodIterator iter;
! while(iter.next()) {
nmethod* nm = iter.method();
! if (!nm->is_zombie()) {
! if (needs_cache_clean()) {
! // Clean ICs of unloaded nmethods as well because they may reference other
! // unloaded nmethods that may be flushed earlier in the sweeper cycle.
nm->cleanup_inline_caches();
}
DEBUG_ONLY(nm->verify());
DEBUG_ONLY(nm->verify_oop_relocations());
}
--- 743,758 ----
void CodeCache::gc_prologue() {
}
void CodeCache::gc_epilogue() {
assert_locked_or_safepoint(CodeCache_lock);
+ NOT_DEBUG(if (needs_cache_clean())) {
NMethodIterator iter;
! while(iter.next_alive()) {
nmethod* nm = iter.method();
! assert(!nm->is_unloaded(), "Tautology");
! DEBUG_ONLY(if (needs_cache_clean())) {
nm->cleanup_inline_caches();
}
DEBUG_ONLY(nm->verify());
DEBUG_ONLY(nm->verify_oop_relocations());
}
< prev index next >