comparison src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp @ 12835:69944b868a32

8014555: G1: Memory ordering problem with Conc refinement and card marking Summary: Add a StoreLoad barrier in the G1 post-barrier to fix a race with concurrent refinement. Also-reviewed-by: martin.doerr@sap.com Reviewed-by: iveresov, tschatzl, brutisso, roland, kvn
author mgerdin
date Tue, 08 Oct 2013 17:35:51 +0200
parents 9de9169ddde6
children aa6f2ea19d8f
comparison
equal deleted inserted replaced
12834:04b18a42c2f3 12835:69944b868a32
6033 // not dirty that area (one less thing to have to do while holding 6033 // not dirty that area (one less thing to have to do while holding
6034 // a lock). So we can only verify that [bottom(),pre_dummy_top()] 6034 // a lock). So we can only verify that [bottom(),pre_dummy_top()]
6035 // is dirty. 6035 // is dirty.
6036 G1SATBCardTableModRefBS* ct_bs = g1_barrier_set(); 6036 G1SATBCardTableModRefBS* ct_bs = g1_barrier_set();
6037 MemRegion mr(hr->bottom(), hr->pre_dummy_top()); 6037 MemRegion mr(hr->bottom(), hr->pre_dummy_top());
6038 ct_bs->verify_dirty_region(mr); 6038 if (hr->is_young()) {
6039 ct_bs->verify_g1_young_region(mr);
6040 } else {
6041 ct_bs->verify_dirty_region(mr);
6042 }
6039 } 6043 }
6040 6044
6041 void G1CollectedHeap::verify_dirty_young_list(HeapRegion* head) { 6045 void G1CollectedHeap::verify_dirty_young_list(HeapRegion* head) {
6042 G1SATBCardTableModRefBS* ct_bs = g1_barrier_set(); 6046 G1SATBCardTableModRefBS* ct_bs = g1_barrier_set();
6043 for (HeapRegion* hr = head; hr != NULL; hr = hr->get_next_young_region()) { 6047 for (HeapRegion* hr = head; hr != NULL; hr = hr->get_next_young_region()) {