< prev index next >

src/share/vm/code/codeCache.cpp

Print this page
rev 12906 : [mq]: gc_interface

*** 666,691 **** FOR_ALL_NMETHOD_HEAPS(heap) { FOR_ALL_BLOBS(cb, *heap) { if (cb->is_alive()) { f->do_code_blob(cb); #ifdef ASSERT ! if (cb->is_nmethod()) ! ((nmethod*)cb)->verify_scavenge_root_oops(); #endif //ASSERT } } } } // Walk the list of methods which might contain non-perm oops. void CodeCache::scavenge_root_nmethods_do(CodeBlobToOopClosure* f) { assert_locked_or_safepoint(CodeCache_lock); - if (UseG1GC) { - return; - } - const bool fix_relocations = f->fix_relocations(); debug_only(mark_scavenge_root_nmethods()); nmethod* prev = NULL; nmethod* cur = scavenge_root_nmethods(); --- 666,688 ---- FOR_ALL_NMETHOD_HEAPS(heap) { FOR_ALL_BLOBS(cb, *heap) { if (cb->is_alive()) { f->do_code_blob(cb); #ifdef ASSERT ! if (cb->is_nmethod()) { ! Universe::heap()->verify_nmethod_roots((nmethod*)cb); ! } #endif //ASSERT } } } } // Walk the list of methods which might contain non-perm oops. void CodeCache::scavenge_root_nmethods_do(CodeBlobToOopClosure* f) { assert_locked_or_safepoint(CodeCache_lock); const bool fix_relocations = f->fix_relocations(); debug_only(mark_scavenge_root_nmethods()); nmethod* prev = NULL; nmethod* cur = scavenge_root_nmethods();
*** 721,734 **** } void CodeCache::add_scavenge_root_nmethod(nmethod* nm) { assert_locked_or_safepoint(CodeCache_lock); - if (UseG1GC) { - return; - } - nm->set_on_scavenge_root_list(); nm->set_scavenge_root_link(_scavenge_root_nmethods); set_scavenge_root_nmethods(nm); print_trace("add_scavenge_root", nm); } --- 718,727 ----
*** 737,748 **** assert_locked_or_safepoint(CodeCache_lock); assert((prev == NULL && scavenge_root_nmethods() == nm) || (prev != NULL && prev->scavenge_root_link() == nm), "precondition"); - assert(!UseG1GC, "G1 does not use the scavenge_root_nmethods list"); - print_trace("unlink_scavenge_root", nm); if (prev == NULL) { set_scavenge_root_nmethods(nm->scavenge_root_link()); } else { prev->set_scavenge_root_link(nm->scavenge_root_link()); --- 730,739 ----
*** 752,765 **** } void CodeCache::drop_scavenge_root_nmethod(nmethod* nm) { assert_locked_or_safepoint(CodeCache_lock); - if (UseG1GC) { - return; - } - print_trace("drop_scavenge_root", nm); nmethod* prev = NULL; for (nmethod* cur = scavenge_root_nmethods(); cur != NULL; cur = cur->scavenge_root_link()) { if (cur == nm) { unlink_scavenge_root_nmethod(cur, prev); --- 743,752 ----
*** 771,784 **** } void CodeCache::prune_scavenge_root_nmethods() { assert_locked_or_safepoint(CodeCache_lock); - if (UseG1GC) { - return; - } - debug_only(mark_scavenge_root_nmethods()); nmethod* last = NULL; nmethod* cur = scavenge_root_nmethods(); while (cur != NULL) { --- 758,767 ----
*** 803,816 **** debug_only(verify_perm_nmethods(NULL)); } #ifndef PRODUCT void CodeCache::asserted_non_scavengable_nmethods_do(CodeBlobClosure* f) { - if (UseG1GC) { - return; - } - // While we are here, verify the integrity of the list. mark_scavenge_root_nmethods(); for (nmethod* cur = scavenge_root_nmethods(); cur != NULL; cur = cur->scavenge_root_link()) { assert(cur->on_scavenge_root_list(), "else shouldn't be on this list"); cur->clear_scavenge_root_marked(); --- 786,795 ----
*** 837,847 **** nmethod* nm = iter.method(); bool call_f = (f_or_null != NULL); assert(nm->scavenge_root_not_marked(), "must be already processed"); if (nm->on_scavenge_root_list()) call_f = false; // don't show this one to the client ! nm->verify_scavenge_root_oops(); if (call_f) f_or_null->do_code_blob(nm); } } #endif //PRODUCT --- 816,826 ---- nmethod* nm = iter.method(); bool call_f = (f_or_null != NULL); assert(nm->scavenge_root_not_marked(), "must be already processed"); if (nm->on_scavenge_root_list()) call_f = false; // don't show this one to the client ! Universe::heap()->verify_nmethod_roots(nm); if (call_f) f_or_null->do_code_blob(nm); } } #endif //PRODUCT
*** 1622,1627 **** st->print(" total_blobs='" UINT32_FORMAT "' nmethods='" UINT32_FORMAT "'" " adapters='" UINT32_FORMAT "' free_code_cache='" SIZE_FORMAT "'", blob_count(), nmethod_count(), adapter_count(), unallocated_capacity()); } - --- 1601,1605 ----
< prev index next >