comparison src/share/vm/gc_implementation/g1/g1BlockOffsetTable.hpp @ 20336:6701abbc4441

8054818: Refactor HeapRegionSeq to manage heap region and auxiliary data Summary: Let HeapRegionSeq manage the heap region and auxiliary data to decrease the amount of responsibilities of G1CollectedHeap, and encapsulate this work from other code. Reviewed-by: jwilhelm, jmasa, mgerdin, brutisso
author tschatzl
date Tue, 19 Aug 2014 10:50:27 +0200
parents 9441d22e429a
children 1f1d373cd044
comparison
equal deleted inserted replaced
20335:eec72fa4b108 20336:6701abbc4441
229 // reserved region this table covers. 229 // reserved region this table covers.
230 void resize(size_t new_word_size); 230 void resize(size_t new_word_size);
231 231
232 void set_bottom(HeapWord* new_bottom); 232 void set_bottom(HeapWord* new_bottom);
233 233
234 // Updates all the BlockOffsetArray's sharing this shared array to
235 // reflect the current "top"'s of their spaces.
236 void update_offset_arrays();
237
238 // Return the appropriate index into "_offset_array" for "p". 234 // Return the appropriate index into "_offset_array" for "p".
239 inline size_t index_for(const void* p) const; 235 inline size_t index_for(const void* p) const;
240 236
241 // Return the address indicating the start of the region corresponding to 237 // Return the address indicating the start of the region corresponding to
242 // "index" in "_offset_array". 238 // "index" in "_offset_array".
478 void alloc_block_work1(HeapWord* blk_start, HeapWord* blk_end) { 474 void alloc_block_work1(HeapWord* blk_start, HeapWord* blk_end) {
479 alloc_block_work2(&_next_offset_threshold, &_next_offset_index, 475 alloc_block_work2(&_next_offset_threshold, &_next_offset_index,
480 blk_start, blk_end); 476 blk_start, blk_end);
481 } 477 }
482 478
479 // Zero out the entry for _bottom (offset will be zero).
480 void zero_bottom_entry();
483 public: 481 public:
484 G1BlockOffsetArrayContigSpace(G1BlockOffsetSharedArray* array, MemRegion mr); 482 G1BlockOffsetArrayContigSpace(G1BlockOffsetSharedArray* array, MemRegion mr);
485 483
486 // Initialize the threshold to reflect the first boundary after the 484 // Initialize the threshold to reflect the first boundary after the
487 // bottom of the covered region. 485 // bottom of the covered region.
488 HeapWord* initialize_threshold(); 486 HeapWord* initialize_threshold();
489 487
490 // Zero out the entry for _bottom (offset will be zero). 488 void reset_bot() {
491 void zero_bottom_entry(); 489 zero_bottom_entry();
490 initialize_threshold();
491 }
492 492
493 // Return the next threshold, the point at which the table should be 493 // Return the next threshold, the point at which the table should be
494 // updated. 494 // updated.
495 HeapWord* threshold() const { return _next_offset_threshold; } 495 HeapWord* threshold() const { return _next_offset_threshold; }
496 496