Mercurial > hg > graal-jvmci-8
comparison src/share/vm/gc_implementation/g1/heapRegionRemSet.hpp @ 1261:0414c1049f15
6923991: G1: improve scalability of RSet scanning
Summary: Implemented block-based work stealing. Moved copying during the rset scanning phase to the main copying phase. Made the size of rset table depend on the region size.
Reviewed-by: apetrusenko, tonyp
author | iveresov |
---|---|
date | Thu, 11 Feb 2010 15:52:19 -0800 |
parents | df6caf649ff7 |
children | f9ec1e4bbb44 |
comparison
equal
deleted
inserted
replaced
1260:8859772195c6 | 1261:0414c1049f15 |
---|---|
185 // Clear entries for the current region in any rem sets named in | 185 // Clear entries for the current region in any rem sets named in |
186 // the _outgoing_region_map. | 186 // the _outgoing_region_map. |
187 void clear_outgoing_entries(); | 187 void clear_outgoing_entries(); |
188 | 188 |
189 enum ParIterState { Unclaimed, Claimed, Complete }; | 189 enum ParIterState { Unclaimed, Claimed, Complete }; |
190 ParIterState _iter_state; | 190 volatile ParIterState _iter_state; |
191 volatile jlong _iter_claimed; | |
191 | 192 |
192 // Unused unless G1RecordHRRSOops is true. | 193 // Unused unless G1RecordHRRSOops is true. |
193 | 194 |
194 static const int MaxRecorded = 1000000; | 195 static const int MaxRecorded = 1000000; |
195 static OopOrNarrowOopStar* _recorded_oops; | 196 static OopOrNarrowOopStar* _recorded_oops; |
207 public: | 208 public: |
208 HeapRegionRemSet(G1BlockOffsetSharedArray* bosa, | 209 HeapRegionRemSet(G1BlockOffsetSharedArray* bosa, |
209 HeapRegion* hr); | 210 HeapRegion* hr); |
210 | 211 |
211 static int num_par_rem_sets(); | 212 static int num_par_rem_sets(); |
213 static void setup_remset_size(); | |
212 | 214 |
213 HeapRegion* hr() const { | 215 HeapRegion* hr() const { |
214 return _other_regions.hr(); | 216 return _other_regions.hr(); |
215 } | 217 } |
216 | 218 |
270 // Sets the iteration state to "complete". | 272 // Sets the iteration state to "complete". |
271 void set_iter_complete(); | 273 void set_iter_complete(); |
272 // Returns "true" iff the region's iteration is complete. | 274 // Returns "true" iff the region's iteration is complete. |
273 bool iter_is_complete(); | 275 bool iter_is_complete(); |
274 | 276 |
277 // Support for claiming blocks of cards during iteration | |
278 void set_iter_claimed(size_t x) { _iter_claimed = (jlong)x; } | |
279 size_t iter_claimed() const { return (size_t)_iter_claimed; } | |
280 // Claim the next block of cards | |
281 size_t iter_claimed_next(size_t step) { | |
282 size_t current, next; | |
283 do { | |
284 current = iter_claimed(); | |
285 next = current + step; | |
286 } while (Atomic::cmpxchg((jlong)next, &_iter_claimed, (jlong)current) != (jlong)current); | |
287 return current; | |
288 } | |
289 | |
275 // Initialize the given iterator to iterate over this rem set. | 290 // Initialize the given iterator to iterate over this rem set. |
276 void init_iterator(HeapRegionRemSetIterator* iter) const; | 291 void init_iterator(HeapRegionRemSetIterator* iter) const; |
277 | 292 |
278 #if 0 | 293 #if 0 |
279 // Apply the "do_card" method to the start address of every card in the | 294 // Apply the "do_card" method to the start address of every card in the |