src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File 8015774 Cdiff src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp

src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp

Print this page

        

*** 5047,5057 **** _claimed_nmethod(NULL), _postponed_list(NULL), _num_entered_barrier(0) { nmethod::increase_unloading_clock(); ! _first_nmethod = CodeCache::alive_nmethod(CodeCache::first()); _claimed_nmethod = (volatile nmethod*)_first_nmethod; } ~G1CodeCacheUnloadingTask() { CodeCache::verify_clean_inline_caches(); --- 5047,5061 ---- _claimed_nmethod(NULL), _postponed_list(NULL), _num_entered_barrier(0) { nmethod::increase_unloading_clock(); ! // Get first alive nmethod ! NMethodIterator iter = NMethodIterator(); ! if(iter.next_alive()) { ! _first_nmethod = iter.method(); ! } _claimed_nmethod = (volatile nmethod*)_first_nmethod; } ~G1CodeCacheUnloadingTask() { CodeCache::verify_clean_inline_caches();
*** 5090,5120 **** static const int MaxClaimNmethods = 16; void claim_nmethods(nmethod** claimed_nmethods, int *num_claimed_nmethods) { nmethod* first; ! nmethod* last; do { *num_claimed_nmethods = 0; ! first = last = (nmethod*)_claimed_nmethod; if (first != NULL) { - for (int i = 0; i < MaxClaimNmethods; i++) { - last = CodeCache::alive_nmethod(CodeCache::next(last)); ! if (last == NULL) { break; } ! ! claimed_nmethods[i] = last; (*num_claimed_nmethods)++; } } ! } while ((nmethod*)Atomic::cmpxchg_ptr(last, &_claimed_nmethod, first) != first); } nmethod* claim_postponed_nmethod() { nmethod* claim; nmethod* next; --- 5094,5123 ---- static const int MaxClaimNmethods = 16; void claim_nmethods(nmethod** claimed_nmethods, int *num_claimed_nmethods) { nmethod* first; ! NMethodIterator last; do { *num_claimed_nmethods = 0; ! first = (nmethod*)_claimed_nmethod; ! last = NMethodIterator(first); if (first != NULL) { ! for (int i = 0; i < MaxClaimNmethods; i++) { ! if (!last.next_alive()) { break; } ! claimed_nmethods[i] = last.method(); (*num_claimed_nmethods)++; } } ! } while ((nmethod*)Atomic::cmpxchg_ptr(last.method(), &_claimed_nmethod, first) != first); } nmethod* claim_postponed_nmethod() { nmethod* claim; nmethod* next;
src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File