358 _g1p->phase_times()->record_update_rs_processed_buffers(worker_i, 0); 359 _g1p->phase_times()->record_update_rs_time(worker_i, 0.0); 360 } 361 if (G1UseParallelRSetScanning || (worker_i == 0)) { 362 scanRS(oc, code_root_cl, worker_i); 363 } else { 364 _g1p->phase_times()->record_scan_rs_time(worker_i, 0.0); 365 } 366 367 // We now clear the cached values of _cset_rs_update_cl for this worker 368 _cset_rs_update_cl[worker_i] = NULL; 369 } 370 371 void G1RemSet::prepare_for_oops_into_collection_set_do() { 372 cleanupHRRS(); 373 ConcurrentG1Refine* cg1r = _g1->concurrent_g1_refine(); 374 _g1->set_refine_cte_cl_concurrency(false); 375 DirtyCardQueueSet& dcqs = JavaThread::dirty_card_queue_set(); 376 dcqs.concatenate_logs(); 377 378 if (G1CollectedHeap::use_parallel_gc_threads()) { 379 // Don't set the number of workers here. It will be set 380 // when the task is run 381 // _seq_task->set_n_termination((int)n_workers()); 382 } 383 guarantee( _cards_scanned == NULL, "invariant" ); 384 _cards_scanned = NEW_C_HEAP_ARRAY(size_t, n_workers(), mtGC); 385 for (uint i = 0; i < n_workers(); ++i) { 386 _cards_scanned[i] = 0; 387 } 388 _total_cards_scanned = 0; 389 } 390 391 392 // This closure, applied to a DirtyCardQueueSet, is used to immediately 393 // update the RSets for the regions in the CSet. For each card it iterates 394 // through the oops which coincide with that card. It scans the reference 395 // fields in each oop; when it finds an oop that points into the collection 396 // set, the RSet for the region containing the referenced object is updated. 397 class UpdateRSetCardTableEntryIntoCSetClosure: public CardTableEntryClosure { 398 G1CollectedHeap* _g1; 399 CardTableModRefBS* _ct_bs; 400 public: 401 UpdateRSetCardTableEntryIntoCSetClosure(G1CollectedHeap* g1, 402 CardTableModRefBS* bs): | 358 _g1p->phase_times()->record_update_rs_processed_buffers(worker_i, 0); 359 _g1p->phase_times()->record_update_rs_time(worker_i, 0.0); 360 } 361 if (G1UseParallelRSetScanning || (worker_i == 0)) { 362 scanRS(oc, code_root_cl, worker_i); 363 } else { 364 _g1p->phase_times()->record_scan_rs_time(worker_i, 0.0); 365 } 366 367 // We now clear the cached values of _cset_rs_update_cl for this worker 368 _cset_rs_update_cl[worker_i] = NULL; 369 } 370 371 void G1RemSet::prepare_for_oops_into_collection_set_do() { 372 cleanupHRRS(); 373 ConcurrentG1Refine* cg1r = _g1->concurrent_g1_refine(); 374 _g1->set_refine_cte_cl_concurrency(false); 375 DirtyCardQueueSet& dcqs = JavaThread::dirty_card_queue_set(); 376 dcqs.concatenate_logs(); 377 378 guarantee( _cards_scanned == NULL, "invariant" ); 379 _cards_scanned = NEW_C_HEAP_ARRAY(size_t, n_workers(), mtGC); 380 for (uint i = 0; i < n_workers(); ++i) { 381 _cards_scanned[i] = 0; 382 } 383 _total_cards_scanned = 0; 384 } 385 386 387 // This closure, applied to a DirtyCardQueueSet, is used to immediately 388 // update the RSets for the regions in the CSet. For each card it iterates 389 // through the oops which coincide with that card. It scans the reference 390 // fields in each oop; when it finds an oop that points into the collection 391 // set, the RSet for the region containing the referenced object is updated. 392 class UpdateRSetCardTableEntryIntoCSetClosure: public CardTableEntryClosure { 393 G1CollectedHeap* _g1; 394 CardTableModRefBS* _ct_bs; 395 public: 396 UpdateRSetCardTableEntryIntoCSetClosure(G1CollectedHeap* g1, 397 CardTableModRefBS* bs): |