339 // DirtyCardQueueSet that is used to manage RSet updates |
339 // DirtyCardQueueSet that is used to manage RSet updates |
340 DirtyCardQueue into_cset_dcq(&_g1->into_cset_dirty_card_queue_set()); |
340 DirtyCardQueue into_cset_dcq(&_g1->into_cset_dirty_card_queue_set()); |
341 |
341 |
342 assert((ParallelGCThreads > 0) || worker_i == 0, "invariant"); |
342 assert((ParallelGCThreads > 0) || worker_i == 0, "invariant"); |
343 |
343 |
344 // The two flags below were introduced temporarily to serialize |
344 updateRS(&into_cset_dcq, worker_i); |
345 // the updating and scanning of remembered sets. There are some |
345 scanRS(oc, code_root_cl, worker_i); |
346 // race conditions when these two operations are done in parallel |
|
347 // and they are causing failures. When we resolve said race |
|
348 // conditions, we'll revert back to parallel remembered set |
|
349 // updating and scanning. See CRs 6677707 and 6677708. |
|
350 if (G1UseParallelRSetUpdating || (worker_i == 0)) { |
|
351 updateRS(&into_cset_dcq, worker_i); |
|
352 } else { |
|
353 _g1p->phase_times()->record_update_rs_processed_buffers(worker_i, 0); |
|
354 _g1p->phase_times()->record_update_rs_time(worker_i, 0.0); |
|
355 } |
|
356 if (G1UseParallelRSetScanning || (worker_i == 0)) { |
|
357 scanRS(oc, code_root_cl, worker_i); |
|
358 } else { |
|
359 _g1p->phase_times()->record_scan_rs_time(worker_i, 0.0); |
|
360 } |
|
361 |
346 |
362 // We now clear the cached values of _cset_rs_update_cl for this worker |
347 // We now clear the cached values of _cset_rs_update_cl for this worker |
363 _cset_rs_update_cl[worker_i] = NULL; |
348 _cset_rs_update_cl[worker_i] = NULL; |
364 } |
349 } |
365 |
350 |