7016955: G1: remove the is_zeroed parameter from the HeapRegion constructor
The is_zeroed parameter is no longer used and so can be removed. Reviewed-by: johnc, jmasa, brutisso
This commit is contained in:
parent
cf5f4f736f
commit
6573cbf346
@ -6423,7 +6423,7 @@ HeapRegion* G1CollectedHeap::new_heap_region(uint hrs_index,
|
||||
MemRegion mr(bottom, end);
|
||||
assert(_g1_reserved.contains(mr), "invariant");
|
||||
// This might return NULL if the allocation fails
|
||||
return new HeapRegion(hrs_index, _bot_shared, mr, true /* is_zeroed */);
|
||||
return new HeapRegion(hrs_index, _bot_shared, mr);
|
||||
}
|
||||
|
||||
void G1CollectedHeap::verify_region_sets() {
|
||||
|
@ -476,10 +476,6 @@ HeapWord* HeapRegion::next_block_start_careful(HeapWord* addr) {
|
||||
return low;
|
||||
}
|
||||
|
||||
void HeapRegion::initialize(MemRegion mr, bool clear_space, bool mangle_space) {
|
||||
G1OffsetTableContigSpace::initialize(mr, false, mangle_space);
|
||||
hr_clear(false/*par*/, clear_space);
|
||||
}
|
||||
#ifdef _MSC_VER // the use of 'this' below gets a warning, make it go away
|
||||
#pragma warning( disable:4355 ) // 'this' : used in base member initializer list
|
||||
#endif // _MSC_VER
|
||||
@ -487,8 +483,8 @@ void HeapRegion::initialize(MemRegion mr, bool clear_space, bool mangle_space) {
|
||||
|
||||
HeapRegion::HeapRegion(uint hrs_index,
|
||||
G1BlockOffsetSharedArray* sharedOffsetArray,
|
||||
MemRegion mr, bool is_zeroed) :
|
||||
G1OffsetTableContigSpace(sharedOffsetArray, mr, is_zeroed),
|
||||
MemRegion mr) :
|
||||
G1OffsetTableContigSpace(sharedOffsetArray, mr),
|
||||
_hrs_index(hrs_index),
|
||||
_humongous_type(NotHumongous), _humongous_start_region(NULL),
|
||||
_in_collection_set(false),
|
||||
@ -507,7 +503,7 @@ HeapRegion::HeapRegion(uint hrs_index,
|
||||
_orig_end = mr.end();
|
||||
// Note that initialize() will set the start of the unmarked area of the
|
||||
// region.
|
||||
this->initialize(mr, !is_zeroed, SpaceDecorator::Mangle);
|
||||
hr_clear(false /*par*/, false /*clear_space*/);
|
||||
set_top(bottom());
|
||||
set_saved_mark();
|
||||
|
||||
@ -908,14 +904,6 @@ void HeapRegion::verify(VerifyOption vo,
|
||||
// G1OffsetTableContigSpace code; copied from space.cpp. Hope this can go
|
||||
// away eventually.
|
||||
|
||||
void G1OffsetTableContigSpace::initialize(MemRegion mr, bool clear_space, bool mangle_space) {
|
||||
// false ==> we'll do the clearing if there's clearing to be done.
|
||||
ContiguousSpace::initialize(mr, false, mangle_space);
|
||||
_offsets.zero_bottom_entry();
|
||||
_offsets.initialize_threshold();
|
||||
if (clear_space) clear(mangle_space);
|
||||
}
|
||||
|
||||
void G1OffsetTableContigSpace::clear(bool mangle_space) {
|
||||
ContiguousSpace::clear(mangle_space);
|
||||
_offsets.zero_bottom_entry();
|
||||
@ -983,11 +971,14 @@ void G1OffsetTableContigSpace::set_saved_mark() {
|
||||
|
||||
G1OffsetTableContigSpace::
|
||||
G1OffsetTableContigSpace(G1BlockOffsetSharedArray* sharedOffsetArray,
|
||||
MemRegion mr, bool is_zeroed) :
|
||||
MemRegion mr) :
|
||||
_offsets(sharedOffsetArray, mr),
|
||||
_par_alloc_lock(Mutex::leaf, "OffsetTableContigSpace par alloc lock", true),
|
||||
_gc_time_stamp(0)
|
||||
{
|
||||
_offsets.set_space(this);
|
||||
initialize(mr, !is_zeroed, SpaceDecorator::Mangle);
|
||||
// false ==> we'll do the clearing if there's clearing to be done.
|
||||
ContiguousSpace::initialize(mr, false, SpaceDecorator::Mangle);
|
||||
_offsets.zero_bottom_entry();
|
||||
_offsets.initialize_threshold();
|
||||
}
|
||||
|
@ -165,10 +165,8 @@ class G1OffsetTableContigSpace: public ContiguousSpace {
|
||||
HeapWord* _pre_dummy_top;
|
||||
|
||||
public:
|
||||
// Constructor. If "is_zeroed" is true, the MemRegion "mr" may be
|
||||
// assumed to contain zeros.
|
||||
G1OffsetTableContigSpace(G1BlockOffsetSharedArray* sharedOffsetArray,
|
||||
MemRegion mr, bool is_zeroed = false);
|
||||
MemRegion mr);
|
||||
|
||||
void set_bottom(HeapWord* value);
|
||||
void set_end(HeapWord* value);
|
||||
@ -189,7 +187,6 @@ class G1OffsetTableContigSpace: public ContiguousSpace {
|
||||
}
|
||||
void reset_pre_dummy_top() { _pre_dummy_top = NULL; }
|
||||
|
||||
virtual void initialize(MemRegion mr, bool clear_space, bool mangle_space);
|
||||
virtual void clear(bool mangle_space);
|
||||
|
||||
HeapWord* block_start(const void* p);
|
||||
@ -340,10 +337,9 @@ class HeapRegion: public G1OffsetTableContigSpace {
|
||||
size_t _predicted_bytes_to_copy;
|
||||
|
||||
public:
|
||||
// If "is_zeroed" is "true", the region "mr" can be assumed to contain zeros.
|
||||
HeapRegion(uint hrs_index,
|
||||
G1BlockOffsetSharedArray* sharedOffsetArray,
|
||||
MemRegion mr, bool is_zeroed);
|
||||
MemRegion mr);
|
||||
|
||||
static int LogOfHRGrainBytes;
|
||||
static int LogOfHRGrainWords;
|
||||
@ -598,8 +594,6 @@ class HeapRegion: public G1OffsetTableContigSpace {
|
||||
void hr_clear(bool par, bool clear_space);
|
||||
void par_clear();
|
||||
|
||||
void initialize(MemRegion mr, bool clear_space, bool mangle_space);
|
||||
|
||||
// Get the start of the unmarked area in this region.
|
||||
HeapWord* prev_top_at_mark_start() const { return _prev_top_at_mark_start; }
|
||||
HeapWord* next_top_at_mark_start() const { return _next_top_at_mark_start; }
|
||||
|
Loading…
Reference in New Issue
Block a user