comparison src/share/vm/gc_implementation/g1/heapRegion.hpp @ 355:0edda524b58c

6722565: G1: assert !r->is_on_unclean_list() fires Summary: Under certain circumstances, two cleanup threads can claim and process the same region. Reviewed-by: apetrusenko, ysr
author tonyp
date Wed, 06 Aug 2008 11:57:31 -0400
parents 37f87013dfd8
children 1ee8caae33af
comparison
equal deleted inserted replaced
354:c0f8f7790199 355:0edda524b58c
166 166
167 class HeapRegion: public G1OffsetTableContigSpace { 167 class HeapRegion: public G1OffsetTableContigSpace {
168 friend class VMStructs; 168 friend class VMStructs;
169 private: 169 private:
170 170
171 enum HumongousType {
172 NotHumongous = 0,
173 StartsHumongous,
174 ContinuesHumongous
175 };
176
171 // The next filter kind that should be used for a "new_dcto_cl" call with 177 // The next filter kind that should be used for a "new_dcto_cl" call with
172 // the "traditional" signature. 178 // the "traditional" signature.
173 HeapRegionDCTOC::FilterKind _next_fk; 179 HeapRegionDCTOC::FilterKind _next_fk;
174 180
175 // Requires that the region "mr" be dense with objects, and begin and end 181 // Requires that the region "mr" be dense with objects, and begin and end
186 protected: 192 protected:
187 // If this region is a member of a HeapRegionSeq, the index in that 193 // If this region is a member of a HeapRegionSeq, the index in that
188 // sequence, otherwise -1. 194 // sequence, otherwise -1.
189 int _hrs_index; 195 int _hrs_index;
190 196
191 bool _humongous; // starts or continues a humongous object 197 HumongousType _humongous_type;
192 bool _humongous_start; // starts a humongous object
193 // For a humongous region, region in which it starts. 198 // For a humongous region, region in which it starts.
194 HeapRegion* _humongous_start_region; 199 HeapRegion* _humongous_start_region;
195 // For the start region of a humongous sequence, it's original end(). 200 // For the start region of a humongous sequence, it's original end().
196 HeapWord* _orig_end; 201 HeapWord* _orig_end;
197 202
306 GrainBytes = 1 << LogOfHRGrainBytes, 311 GrainBytes = 1 << LogOfHRGrainBytes,
307 GrainWords = 1 <<LogOfHRGrainWords, 312 GrainWords = 1 <<LogOfHRGrainWords,
308 MaxAge = 2, NoOfAges = MaxAge+1 313 MaxAge = 2, NoOfAges = MaxAge+1
309 }; 314 };
310 315
316 enum ClaimValues {
317 InitialClaimValue = 0,
318 FinalCountClaimValue = 1,
319 NoteEndClaimValue = 2,
320 ScrubRemSetClaimValue = 3
321 };
322
311 // Concurrent refinement requires contiguous heap regions (in which TLABs 323 // Concurrent refinement requires contiguous heap regions (in which TLABs
312 // might be allocated) to be zero-filled. Each region therefore has a 324 // might be allocated) to be zero-filled. Each region therefore has a
313 // zero-fill-state. 325 // zero-fill-state.
314 enum ZeroFillState { 326 enum ZeroFillState {
315 NotZeroFilled, 327 NotZeroFilled,
353 365
354 void zero_marked_bytes() { 366 void zero_marked_bytes() {
355 _prev_marked_bytes = _next_marked_bytes = 0; 367 _prev_marked_bytes = _next_marked_bytes = 0;
356 } 368 }
357 369
358 bool isHumongous() const { return _humongous; } 370 bool isHumongous() const { return _humongous_type != NotHumongous; }
359 bool startsHumongous() const { return _humongous_start; } 371 bool startsHumongous() const { return _humongous_type == StartsHumongous; }
360 bool continuesHumongous() const { return _humongous && ! _humongous_start; } 372 bool continuesHumongous() const { return _humongous_type == ContinuesHumongous; }
361 // For a humongous region, region in which it starts. 373 // For a humongous region, region in which it starts.
362 HeapRegion* humongous_start_region() const { 374 HeapRegion* humongous_start_region() const {
363 return _humongous_start_region; 375 return _humongous_start_region;
364 } 376 }
365 377