1.1 --- a/src/share/vm/gc_implementation/g1/heapRegion.hpp Wed Jun 08 21:48:38 2011 -0400 1.2 +++ b/src/share/vm/gc_implementation/g1/heapRegion.hpp Fri Jun 10 13:16:40 2011 -0400 1.3 @@ -52,9 +52,11 @@ 1.4 class HeapRegion; 1.5 class HeapRegionSetBase; 1.6 1.7 -#define HR_FORMAT "%d:["PTR_FORMAT","PTR_FORMAT","PTR_FORMAT"]" 1.8 -#define HR_FORMAT_PARAMS(_hr_) (_hr_)->hrs_index(), (_hr_)->bottom(), \ 1.9 - (_hr_)->top(), (_hr_)->end() 1.10 +#define HR_FORMAT SIZE_FORMAT":(%s)["PTR_FORMAT","PTR_FORMAT","PTR_FORMAT"]" 1.11 +#define HR_FORMAT_PARAMS(_hr_) \ 1.12 + (_hr_)->hrs_index(), \ 1.13 + (_hr_)->is_survivor() ? "S" : (_hr_)->is_young() ? "E" : "-", \ 1.14 + (_hr_)->bottom(), (_hr_)->top(), (_hr_)->end() 1.15 1.16 // A dirty card to oop closure for heap regions. It 1.17 // knows how to get the G1 heap and how to use the bitmap 1.18 @@ -237,9 +239,8 @@ 1.19 G1BlockOffsetArrayContigSpace* offsets() { return &_offsets; } 1.20 1.21 protected: 1.22 - // If this region is a member of a HeapRegionSeq, the index in that 1.23 - // sequence, otherwise -1. 1.24 - int _hrs_index; 1.25 + // The index of this region in the heap region sequence. 1.26 + size_t _hrs_index; 1.27 1.28 HumongousType _humongous_type; 1.29 // For a humongous region, region in which it starts. 1.30 @@ -296,8 +297,7 @@ 1.31 enum YoungType { 1.32 NotYoung, // a region is not young 1.33 Young, // a region is young 1.34 - Survivor // a region is young and it contains 1.35 - // survivor 1.36 + Survivor // a region is young and it contains survivors 1.37 }; 1.38 1.39 volatile YoungType _young_type; 1.40 @@ -351,7 +351,8 @@ 1.41 1.42 public: 1.43 // If "is_zeroed" is "true", the region "mr" can be assumed to contain zeros. 1.44 - HeapRegion(G1BlockOffsetSharedArray* sharedOffsetArray, 1.45 + HeapRegion(size_t hrs_index, 1.46 + G1BlockOffsetSharedArray* sharedOffsetArray, 1.47 MemRegion mr, bool is_zeroed); 1.48 1.49 static int LogOfHRGrainBytes; 1.50 @@ -393,8 +394,7 @@ 1.51 1.52 // If this region is a member of a HeapRegionSeq, the index in that 1.53 // sequence, otherwise -1. 1.54 - int hrs_index() const { return _hrs_index; } 1.55 - void set_hrs_index(int index) { _hrs_index = index; } 1.56 + size_t hrs_index() const { return _hrs_index; } 1.57 1.58 // The number of bytes marked live in the region in the last marking phase. 1.59 size_t marked_bytes() { return _prev_marked_bytes; } 1.60 @@ -579,6 +579,8 @@ 1.61 void set_next_dirty_cards_region(HeapRegion* hr) { _next_dirty_cards_region = hr; } 1.62 bool is_on_dirty_cards_region_list() const { return get_next_dirty_cards_region() != NULL; } 1.63 1.64 + HeapWord* orig_end() { return _orig_end; } 1.65 + 1.66 // Allows logical separation between objects allocated before and after. 1.67 void save_marks(); 1.68