< prev index next >

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

Print this page




 221     assert(SafepointSynchronize::is_at_safepoint(), "not during an evacuation pause");
 222     assert(worker_i < ParallelGCThreads, "should be a GC worker");
 223 
 224     if (_g1rs->refine_card(card_ptr, worker_i, true)) {
 225       // 'card_ptr' contains references that point into the collection
 226       // set. We need to record the card in the DCQS
 227       // (_into_cset_dirty_card_queue_set)
 228       // that's used for that purpose.
 229       //
 230       // Enqueue the card
 231       _into_cset_dcq->enqueue(card_ptr);
 232     }
 233     return true;
 234   }
 235 };
 236 
 237 void G1RemSet::updateRS(DirtyCardQueue* into_cset_dcq, uint worker_i) {
 238   RefineRecordRefsIntoCSCardTableEntryClosure into_cset_update_rs_cl(_g1, into_cset_dcq);
 239 
 240   G1GCParPhaseTimesTracker x(_g1p->phase_times(), G1GCPhaseTimes::UpdateRS, worker_i);
 241   {
 242     // Apply the closure to the entries of the hot card cache.
 243     G1GCParPhaseTimesTracker y(_g1p->phase_times(), G1GCPhaseTimes::ScanHCC, worker_i);
 244     _g1->iterate_hcc_closure(&into_cset_update_rs_cl, worker_i);
 245   }
 246   // Apply the closure to all remaining log entries.
 247   _g1->iterate_dirty_card_closure(&into_cset_update_rs_cl, worker_i);
 248 }
 249 
 250 void G1RemSet::cleanupHRRS() {
 251   HeapRegionRemSet::cleanup();
 252 }
 253 
 254 size_t G1RemSet::oops_into_collection_set_do(G1ParPushHeapRSClosure* oc,
 255                                              CodeBlobClosure* heap_region_codeblobs,
 256                                              uint worker_i) {
 257   // We cache the value of 'oc' closure into the appropriate slot in the
 258   // _cset_rs_update_cl for this worker
 259   assert(worker_i < n_workers(), "sanity");
 260   _cset_rs_update_cl[worker_i] = oc;
 261 




 221     assert(SafepointSynchronize::is_at_safepoint(), "not during an evacuation pause");
 222     assert(worker_i < ParallelGCThreads, "should be a GC worker");
 223 
 224     if (_g1rs->refine_card(card_ptr, worker_i, true)) {
 225       // 'card_ptr' contains references that point into the collection
 226       // set. We need to record the card in the DCQS
 227       // (_into_cset_dirty_card_queue_set)
 228       // that's used for that purpose.
 229       //
 230       // Enqueue the card
 231       _into_cset_dcq->enqueue(card_ptr);
 232     }
 233     return true;
 234   }
 235 };
 236 
 237 void G1RemSet::updateRS(DirtyCardQueue* into_cset_dcq, uint worker_i) {
 238   RefineRecordRefsIntoCSCardTableEntryClosure into_cset_update_rs_cl(_g1, into_cset_dcq);
 239 
 240   G1GCParPhaseTimesTracker x(_g1p->phase_times(), G1GCPhaseTimes::UpdateRS, worker_i);
 241   if (ConcurrentG1Refine::hot_card_cache_enabled()) {
 242     // Apply the closure to the entries of the hot card cache.
 243     G1GCParPhaseTimesTracker y(_g1p->phase_times(), G1GCPhaseTimes::ScanHCC, worker_i);
 244     _g1->iterate_hcc_closure(&into_cset_update_rs_cl, worker_i);
 245   }
 246   // Apply the closure to all remaining log entries.
 247   _g1->iterate_dirty_card_closure(&into_cset_update_rs_cl, worker_i);
 248 }
 249 
 250 void G1RemSet::cleanupHRRS() {
 251   HeapRegionRemSet::cleanup();
 252 }
 253 
 254 size_t G1RemSet::oops_into_collection_set_do(G1ParPushHeapRSClosure* oc,
 255                                              CodeBlobClosure* heap_region_codeblobs,
 256                                              uint worker_i) {
 257   // We cache the value of 'oc' closure into the appropriate slot in the
 258   // _cset_rs_update_cl for this worker
 259   assert(worker_i < n_workers(), "sanity");
 260   _cset_rs_update_cl[worker_i] = oc;
 261 


< prev index next >