290 // A DirtyCardQueue that is used to hold cards containing references
291 // that point into the collection set. This DCQ is associated with a
292 // special DirtyCardQueueSet (see g1CollectedHeap.hpp). Under normal
293 // circumstances (i.e. the pause successfully completes), these cards
294 // are just discarded (there's no need to update the RSets of regions
295 // that were in the collection set - after the pause these regions
296 // are wholly 'free' of live objects. In the event of an evacuation
297 // failure the cards/buffers in this queue set are passed to the
298 // DirtyCardQueueSet that is used to manage RSet updates
299 DirtyCardQueue into_cset_dcq(&_into_cset_dirty_card_queue_set);
300
301 updateRS(&into_cset_dcq, worker_i);
302 size_t cards_scanned = scanRS(oc, heap_region_codeblobs, worker_i);
303
304 // We now clear the cached values of _cset_rs_update_cl for this worker
305 _cset_rs_update_cl[worker_i] = NULL;
306 return cards_scanned;
307 }
308
309 void G1RemSet::prepare_for_oops_into_collection_set_do() {
310 cleanupHRRS();
311 _g1->set_refine_cte_cl_concurrency(false);
312 DirtyCardQueueSet& dcqs = JavaThread::dirty_card_queue_set();
313 dcqs.concatenate_logs();
314 }
315
316 void G1RemSet::cleanup_after_oops_into_collection_set_do() {
317 // Cleanup after copy
318 _g1->set_refine_cte_cl_concurrency(true);
319 // Set all cards back to clean.
320 _g1->cleanUpCardTable();
321
322 DirtyCardQueueSet& into_cset_dcqs = _into_cset_dirty_card_queue_set;
323 int into_cset_n_buffers = into_cset_dcqs.completed_buffers_num();
324
325 if (_g1->evacuation_failed()) {
326 double restore_remembered_set_start = os::elapsedTime();
327
328 // Restore remembered sets for the regions pointing into the collection set.
329 // We just need to transfer the completed buffers from the DirtyCardQueueSet
330 // used to hold cards that contain references that point into the collection set
|
290 // A DirtyCardQueue that is used to hold cards containing references
291 // that point into the collection set. This DCQ is associated with a
292 // special DirtyCardQueueSet (see g1CollectedHeap.hpp). Under normal
293 // circumstances (i.e. the pause successfully completes), these cards
294 // are just discarded (there's no need to update the RSets of regions
295 // that were in the collection set - after the pause these regions
296 // are wholly 'free' of live objects. In the event of an evacuation
297 // failure the cards/buffers in this queue set are passed to the
298 // DirtyCardQueueSet that is used to manage RSet updates
299 DirtyCardQueue into_cset_dcq(&_into_cset_dirty_card_queue_set);
300
301 updateRS(&into_cset_dcq, worker_i);
302 size_t cards_scanned = scanRS(oc, heap_region_codeblobs, worker_i);
303
304 // We now clear the cached values of _cset_rs_update_cl for this worker
305 _cset_rs_update_cl[worker_i] = NULL;
306 return cards_scanned;
307 }
308
309 void G1RemSet::prepare_for_oops_into_collection_set_do() {
310 _g1->set_refine_cte_cl_concurrency(false);
311 DirtyCardQueueSet& dcqs = JavaThread::dirty_card_queue_set();
312 dcqs.concatenate_logs();
313 }
314
315 void G1RemSet::cleanup_after_oops_into_collection_set_do() {
316 // Cleanup after copy
317 _g1->set_refine_cte_cl_concurrency(true);
318 // Set all cards back to clean.
319 _g1->cleanUpCardTable();
320
321 DirtyCardQueueSet& into_cset_dcqs = _into_cset_dirty_card_queue_set;
322 int into_cset_n_buffers = into_cset_dcqs.completed_buffers_num();
323
324 if (_g1->evacuation_failed()) {
325 double restore_remembered_set_start = os::elapsedTime();
326
327 // Restore remembered sets for the regions pointing into the collection set.
328 // We just need to transfer the completed buffers from the DirtyCardQueueSet
329 // used to hold cards that contain references that point into the collection set
|