137 }
138
139 G1SATBCardTableLoggingModRefBS(MemRegion whole_heap);
140
141 virtual void initialize() { }
142 virtual void initialize(G1RegionToSpaceMapper* mapper);
143
144 virtual void resize_covered_region(MemRegion new_region) { ShouldNotReachHere(); }
145
146 // NB: if you do a whole-heap invalidation, the "usual invariant" defined
147 // above no longer applies.
148 void invalidate(MemRegion mr);
149
150 void write_region(MemRegion mr) { invalidate(mr); }
151 void write_ref_array_work(MemRegion mr) { invalidate(mr); }
152
153 template <DecoratorSet decorators, typename T>
154 void write_ref_field_post(T* field, oop new_val);
155 void write_ref_field_post_slow(volatile jbyte* byte);
156
157 virtual void flush_deferred_barriers(JavaThread* thread);
158
159 virtual bool card_mark_must_follow_store() const {
160 return true;
161 }
162
163 // Callbacks for runtime accesses.
164 template <DecoratorSet decorators, typename BarrierSetT = G1SATBCardTableLoggingModRefBS>
165 class AccessBarrier: public ModRefBarrierSet::AccessBarrier<decorators, BarrierSetT> {
166 typedef ModRefBarrierSet::AccessBarrier<decorators, BarrierSetT> ModRef;
167 typedef BarrierSet::AccessBarrier<decorators, BarrierSetT> Raw;
168
169 public:
170 // Needed for loads on non-heap weak references
171 template <typename T>
172 static oop oop_load_not_in_heap(T* addr);
173
174 // Needed for non-heap stores
175 template <typename T>
176 static void oop_store_not_in_heap(T* addr, oop new_value);
177
|
137 }
138
139 G1SATBCardTableLoggingModRefBS(MemRegion whole_heap);
140
141 virtual void initialize() { }
142 virtual void initialize(G1RegionToSpaceMapper* mapper);
143
144 virtual void resize_covered_region(MemRegion new_region) { ShouldNotReachHere(); }
145
146 // NB: if you do a whole-heap invalidation, the "usual invariant" defined
147 // above no longer applies.
148 void invalidate(MemRegion mr);
149
150 void write_region(MemRegion mr) { invalidate(mr); }
151 void write_ref_array_work(MemRegion mr) { invalidate(mr); }
152
153 template <DecoratorSet decorators, typename T>
154 void write_ref_field_post(T* field, oop new_val);
155 void write_ref_field_post_slow(volatile jbyte* byte);
156
157 virtual void on_thread_attach(JavaThread* thread);
158 virtual void on_thread_detach(JavaThread* thread);
159
160 virtual bool card_mark_must_follow_store() const {
161 return true;
162 }
163
164 // Callbacks for runtime accesses.
165 template <DecoratorSet decorators, typename BarrierSetT = G1SATBCardTableLoggingModRefBS>
166 class AccessBarrier: public ModRefBarrierSet::AccessBarrier<decorators, BarrierSetT> {
167 typedef ModRefBarrierSet::AccessBarrier<decorators, BarrierSetT> ModRef;
168 typedef BarrierSet::AccessBarrier<decorators, BarrierSetT> Raw;
169
170 public:
171 // Needed for loads on non-heap weak references
172 template <typename T>
173 static oop oop_load_not_in_heap(T* addr);
174
175 // Needed for non-heap stores
176 template <typename T>
177 static void oop_store_not_in_heap(T* addr, oop new_value);
178
|