8327477: Parallel: Remove _data_location and _highest_ref in ParallelCompactData

Reviewed-by: gli, tschatzl
This commit is contained in:
Albert Mingkun Yang 2024-03-08 09:38:08 +00:00
parent bdd1aebea3
commit f9d479fe1e
2 changed files with 3 additions and 24 deletions

View File

@ -255,11 +255,11 @@ print_generic_summary_region(size_t i, const ParallelCompactData::RegionData* c)
ParallelCompactData& sd = PSParallelCompact::summary_data();
size_t dci = c->destination() ? sd.addr_to_region_idx(c->destination()) : 0;
log_develop_trace(gc, compaction)(
REGION_IDX_FORMAT " " PTR_FORMAT " "
REGION_IDX_FORMAT " "
REGION_IDX_FORMAT " " PTR_FORMAT " "
REGION_DATA_FORMAT " " REGION_DATA_FORMAT " "
REGION_DATA_FORMAT " " REGION_IDX_FORMAT " %d",
i, p2i(c->data_location()), dci, p2i(c->destination()),
i, dci, p2i(c->destination()),
c->partial_obj_size(), c->live_obj_size(),
c->data_size(), c->source_region(), c->destination_count());
@ -540,7 +540,6 @@ ParallelCompactData::summarize_dense_prefix(HeapWord* beg, HeapWord* end)
_region_data[cur_region].set_destination(addr);
_region_data[cur_region].set_destination_count(0);
_region_data[cur_region].set_source_region(cur_region);
_region_data[cur_region].set_data_location(addr);
// Update live_obj_size so the region appears completely full.
size_t live_size = RegionSize - _region_data[cur_region].partial_obj_size();
@ -734,7 +733,6 @@ bool ParallelCompactData::summarize(SplitInfo& split_info,
}
_region_data[cur_region].set_destination_count(destination_count);
_region_data[cur_region].set_data_location(region_to_addr(cur_region));
dest_addr += words;
}

View File

@ -279,9 +279,6 @@ public:
// Number of times the block table was filled.
DEBUG_ONLY(inline size_t blocks_filled_count() const;)
// The location of the java heap data that corresponds to this region.
inline HeapWord* data_location() const;
// Whether this region is available to be claimed, has been claimed, or has
// been completed.
//
@ -304,7 +301,7 @@ public:
inline void set_destination_count(uint count);
inline void set_live_obj_size(size_t words);
inline void set_data_location(HeapWord* addr);
inline void set_completed();
inline bool claim_unsafe();
@ -363,11 +360,6 @@ public:
#ifdef ASSERT
size_t _blocks_filled_count; // Number of block table fills.
// These enable optimizations that are only partially implemented. Use
// debug builds to prevent the code fragments from breaking.
HeapWord* _data_location;
HeapWord* _highest_ref;
#endif // #ifdef ASSERT
#ifdef ASSERT
@ -538,17 +530,6 @@ inline void ParallelCompactData::RegionData::decrement_destination_count()
Atomic::add(&_dc_and_los, dc_mask);
}
inline HeapWord* ParallelCompactData::RegionData::data_location() const
{
DEBUG_ONLY(return _data_location;)
NOT_DEBUG(return nullptr;)
}
inline void ParallelCompactData::RegionData::set_data_location(HeapWord* addr)
{
DEBUG_ONLY(_data_location = addr;)
}
inline void ParallelCompactData::RegionData::set_completed()
{
assert(claimed(), "must be claimed first");