src/share/vm/gc_implementation/g1/heapRegion.hpp
Print this page
rev 6923 : imported patch 8054819-rename-heapregionseq
*** 52,70 ****
class HeapRegionSetBase;
class nmethod;
#define HR_FORMAT "%u:(%s)["PTR_FORMAT","PTR_FORMAT","PTR_FORMAT"]"
#define HR_FORMAT_PARAMS(_hr_) \
! (_hr_)->hrs_index(), \
(_hr_)->is_survivor() ? "S" : (_hr_)->is_young() ? "E" : \
(_hr_)->startsHumongous() ? "HS" : \
(_hr_)->continuesHumongous() ? "HC" : \
!(_hr_)->is_empty() ? "O" : "F", \
p2i((_hr_)->bottom()), p2i((_hr_)->top()), p2i((_hr_)->end())
! // sentinel value for hrs_index
! #define G1_NO_HRS_INDEX ((uint) -1)
// A dirty card to oop closure for heap regions. It
// knows how to get the G1 heap and how to use the bitmap
// in the concurrent marker used by G1 to filter remembered
// sets.
--- 52,70 ----
class HeapRegionSetBase;
class nmethod;
#define HR_FORMAT "%u:(%s)["PTR_FORMAT","PTR_FORMAT","PTR_FORMAT"]"
#define HR_FORMAT_PARAMS(_hr_) \
! (_hr_)->hrm_index(), \
(_hr_)->is_survivor() ? "S" : (_hr_)->is_young() ? "E" : \
(_hr_)->startsHumongous() ? "HS" : \
(_hr_)->continuesHumongous() ? "HC" : \
!(_hr_)->is_empty() ? "O" : "F", \
p2i((_hr_)->bottom()), p2i((_hr_)->top()), p2i((_hr_)->end())
! // sentinel value for hrm_index
! #define G1_NO_HRM_INDEX ((uint) -1)
// A dirty card to oop closure for heap regions. It
// knows how to get the G1 heap and how to use the bitmap
// in the concurrent marker used by G1 to filter remembered
// sets.
*** 232,242 ****
G1BlockOffsetArrayContigSpace* offsets() { return &_offsets; }
protected:
// The index of this region in the heap region sequence.
! uint _hrs_index;
HumongousType _humongous_type;
// For a humongous region, region in which it starts.
HeapRegion* _humongous_start_region;
// For the start region of a humongous sequence, it's original end().
--- 232,242 ----
G1BlockOffsetArrayContigSpace* offsets() { return &_offsets; }
protected:
// The index of this region in the heap region sequence.
! uint _hrm_index;
HumongousType _humongous_type;
// For a humongous region, region in which it starts.
HeapRegion* _humongous_start_region;
// For the start region of a humongous sequence, it's original end().
*** 328,338 ****
// The predicted number of bytes to copy that was added to
// the total value for the collection set.
size_t _predicted_bytes_to_copy;
public:
! HeapRegion(uint hrs_index,
G1BlockOffsetSharedArray* sharedOffsetArray,
MemRegion mr);
// Initializing the HeapRegion not only resets the data structure, but also
// resets the BOT for that heap region.
--- 328,338 ----
// The predicted number of bytes to copy that was added to
// the total value for the collection set.
size_t _predicted_bytes_to_copy;
public:
! HeapRegion(uint hrm_index,
G1BlockOffsetSharedArray* sharedOffsetArray,
MemRegion mr);
// Initializing the HeapRegion not only resets the data structure, but also
// resets the BOT for that heap region.
*** 383,395 ****
size_t block_size(const HeapWord* p) const;
inline HeapWord* par_allocate_no_bot_updates(size_t word_size);
inline HeapWord* allocate_no_bot_updates(size_t word_size);
! // If this region is a member of a HeapRegionSeq, the index in that
// sequence, otherwise -1.
! uint hrs_index() const { return _hrs_index; }
// The number of bytes marked live in the region in the last marking phase.
size_t marked_bytes() { return _prev_marked_bytes; }
size_t live_bytes() {
return (top() - prev_top_at_mark_start()) * HeapWordSize + marked_bytes();
--- 383,395 ----
size_t block_size(const HeapWord* p) const;
inline HeapWord* par_allocate_no_bot_updates(size_t word_size);
inline HeapWord* allocate_no_bot_updates(size_t word_size);
! // If this region is a member of a HeapRegionManager, the index in that
// sequence, otherwise -1.
! uint hrm_index() const { return _hrm_index; }
// The number of bytes marked live in the region in the last marking phase.
size_t marked_bytes() { return _prev_marked_bytes; }
size_t live_bytes() {
return (top() - prev_top_at_mark_start()) * HeapWordSize + marked_bytes();
*** 456,466 ****
// Return the index + 1 of the last HC regions that's associated
// with this HS region.
uint last_hc_index() const {
assert(startsHumongous(), "don't call this otherwise");
! return hrs_index() + region_num();
}
// Same as Space::is_in_reserved, but will use the original size of the region.
// The original size is different only for start humongous regions. They get
// their _end set up to be the end of the last continues region of the
--- 456,466 ----
// Return the index + 1 of the last HC regions that's associated
// with this HS region.
uint last_hc_index() const {
assert(startsHumongous(), "don't call this otherwise");
! return hrm_index() + region_num();
}
// Same as Space::is_in_reserved, but will use the original size of the region.
// The original size is different only for start humongous regions. They get
// their _end set up to be the end of the last continues region of the
*** 811,821 ****
};
// HeapRegionClosure is used for iterating over regions.
// Terminates the iteration when the "doHeapRegion" method returns "true".
class HeapRegionClosure : public StackObj {
! friend class HeapRegionSeq;
friend class G1CollectedHeap;
bool _complete;
void incomplete() { _complete = false; }
--- 811,821 ----
};
// HeapRegionClosure is used for iterating over regions.
// Terminates the iteration when the "doHeapRegion" method returns "true".
class HeapRegionClosure : public StackObj {
! friend class HeapRegionManager;
friend class G1CollectedHeap;
bool _complete;
void incomplete() { _complete = false; }