8327364: Parallel: Remove unused ParallelCompactData::add_obj

Reviewed-by: kbarrett
This commit is contained in:
Albert Mingkun Yang 2024-03-05 14:54:55 +00:00
parent 98f0b86641
commit c00c939f99
2 changed files with 0 additions and 32 deletions

View File

@ -527,35 +527,6 @@ HeapWord* ParallelCompactData::partial_obj_end(size_t region_idx) const
return result;
}
void ParallelCompactData::add_obj(HeapWord* addr, size_t len)
{
const size_t obj_ofs = pointer_delta(addr, _heap_start);
const size_t beg_region = obj_ofs >> Log2RegionSize;
// end_region is inclusive
const size_t end_region = (obj_ofs + len - 1) >> Log2RegionSize;
if (beg_region == end_region) {
// All in one region.
_region_data[beg_region].add_live_obj(len);
return;
}
// First region.
const size_t beg_ofs = region_offset(addr);
_region_data[beg_region].add_live_obj(RegionSize - beg_ofs);
// Middle regions--completely spanned by this object.
for (size_t region = beg_region + 1; region < end_region; ++region) {
_region_data[region].set_partial_obj_size(RegionSize);
_region_data[region].set_partial_obj_addr(addr);
}
// Last region.
const size_t end_ofs = region_offset(addr + len - 1);
_region_data[end_region].set_partial_obj_size(end_ofs + 1);
_region_data[end_region].set_partial_obj_addr(addr);
}
void
ParallelCompactData::summarize_dense_prefix(HeapWord* beg, HeapWord* end)
{

View File

@ -407,9 +407,6 @@ public:
inline BlockData* block(size_t block_idx) const;
inline size_t block(const BlockData* block_ptr) const;
void add_obj(HeapWord* addr, size_t len);
void add_obj(oop p, size_t len) { add_obj(cast_from_oop<HeapWord*>(p), len); }
// Fill in the regions covering [beg, end) so that no data moves; i.e., the
// destination of region n is simply the start of region n. Both arguments
// beg and end must be region-aligned.