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

Print this page

        

*** 714,725 **** {} bool doHeapRegion(HeapRegion* r) { if (!r->in_collection_set() && !r->continuesHumongous() && ! !r->is_young() && ! !r->is_survivor()) { _update_rs_oop_cl.set_from(r); UpdateRSObjectClosure update_rs_obj_cl(&_update_rs_oop_cl); // For each run of dirty card in the region: // 1) Clear the cards. --- 714,724 ---- {} bool doHeapRegion(HeapRegion* r) { if (!r->in_collection_set() && !r->continuesHumongous() && ! !r->is_young()) { _update_rs_oop_cl.set_from(r); UpdateRSObjectClosure update_rs_obj_cl(&_update_rs_oop_cl); // For each run of dirty card in the region: // 1) Clear the cards.
*** 852,862 **** // as a result, it is possible for other threads to actually // allocate objects in the region (after the acquire the lock) // before all the cards on the region are dirtied. This is unlikely, // and it doesn't happen often, but it can happen. So, the extra // check below filters out those cards. ! if (r->is_young() || r->is_survivor()) { return; } // While we are processing RSet buffers during the collection, we // actually don't want to scan any cards on the collection set, // since we don't want to update remebered sets with entries that --- 851,861 ---- // as a result, it is possible for other threads to actually // allocate objects in the region (after the acquire the lock) // before all the cards on the region are dirtied. This is unlikely, // and it doesn't happen often, but it can happen. So, the extra // check below filters out those cards. ! if (r->is_young()) { return; } // While we are processing RSet buffers during the collection, we // actually don't want to scan any cards on the collection set, // since we don't want to update remebered sets with entries that
*** 1023,1040 **** HeapRegionRemSet::n_coarsenings()); } } void HRInto_G1RemSet::prepare_for_verify() { ! if (G1HRRSFlushLogBuffersOnVerify && VerifyBeforeGC && !_g1->full_collection()) { cleanupHRRS(); _g1->set_refine_cte_cl_concurrency(false); if (SafepointSynchronize::is_at_safepoint()) { DirtyCardQueueSet& dcqs = JavaThread::dirty_card_queue_set(); dcqs.concatenate_logs(); } bool cg1r_use_cache = _cg1r->use_cache(); _cg1r->set_use_cache(false); updateRS(0); _cg1r->set_use_cache(cg1r_use_cache); } } --- 1022,1043 ---- HeapRegionRemSet::n_coarsenings()); } } void HRInto_G1RemSet::prepare_for_verify() { ! if (G1HRRSFlushLogBuffersOnVerify && ! (VerifyBeforeGC || VerifyAfterGC) ! && !_g1->full_collection()) { cleanupHRRS(); _g1->set_refine_cte_cl_concurrency(false); if (SafepointSynchronize::is_at_safepoint()) { DirtyCardQueueSet& dcqs = JavaThread::dirty_card_queue_set(); dcqs.concatenate_logs(); } bool cg1r_use_cache = _cg1r->use_cache(); _cg1r->set_use_cache(false); updateRS(0); _cg1r->set_use_cache(cg1r_use_cache); + + assert(JavaThread::dirty_card_queue_set().completed_buffers_num() == 0, "All should be consumed"); } }