comparison src/share/vm/gc_implementation/g1/g1CollectedHeap.inline.hpp @ 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 d55c004e1d4d
children 096c224171c4 de6a9e811145
comparison
equal deleted inserted replaced
12834:04b18a42c2f3 12835:69944b868a32
27 27
28 #include "gc_implementation/g1/concurrentMark.hpp" 28 #include "gc_implementation/g1/concurrentMark.hpp"
29 #include "gc_implementation/g1/g1CollectedHeap.hpp" 29 #include "gc_implementation/g1/g1CollectedHeap.hpp"
30 #include "gc_implementation/g1/g1AllocRegion.inline.hpp" 30 #include "gc_implementation/g1/g1AllocRegion.inline.hpp"
31 #include "gc_implementation/g1/g1CollectorPolicy.hpp" 31 #include "gc_implementation/g1/g1CollectorPolicy.hpp"
32 #include "gc_implementation/g1/g1SATBCardTableModRefBS.hpp"
32 #include "gc_implementation/g1/heapRegionSeq.inline.hpp" 33 #include "gc_implementation/g1/heapRegionSeq.inline.hpp"
33 #include "utilities/taskqueue.hpp" 34 #include "utilities/taskqueue.hpp"
34 35
35 // Inline functions for G1CollectedHeap 36 // Inline functions for G1CollectedHeap
36 37
132 133
133 HeapWord* end = start + word_size; 134 HeapWord* end = start + word_size;
134 assert(containing_hr->is_in(end - 1), "it should also contain end - 1"); 135 assert(containing_hr->is_in(end - 1), "it should also contain end - 1");
135 136
136 MemRegion mr(start, end); 137 MemRegion mr(start, end);
137 g1_barrier_set()->dirty(mr); 138 g1_barrier_set()->g1_mark_as_young(mr);
138 } 139 }
139 140
140 inline RefToScanQueue* G1CollectedHeap::task_queue(int i) const { 141 inline RefToScanQueue* G1CollectedHeap::task_queue(int i) const {
141 return _task_queues->queue(i); 142 return _task_queues->queue(i);
142 } 143 }