Skip to content

Commit c00c939

Browse files
committedMar 5, 2024
8327364: Parallel: Remove unused ParallelCompactData::add_obj
Reviewed-by: kbarrett
1 parent 98f0b86 commit c00c939

File tree

2 files changed

+0
-32
lines changed

2 files changed

+0
-32
lines changed
 

‎src/hotspot/share/gc/parallel/psParallelCompact.cpp

-29
Original file line numberDiff line numberDiff line change
@@ -527,35 +527,6 @@ HeapWord* ParallelCompactData::partial_obj_end(size_t region_idx) const
527527
return result;
528528
}
529529

530-
void ParallelCompactData::add_obj(HeapWord* addr, size_t len)
531-
{
532-
const size_t obj_ofs = pointer_delta(addr, _heap_start);
533-
const size_t beg_region = obj_ofs >> Log2RegionSize;
534-
// end_region is inclusive
535-
const size_t end_region = (obj_ofs + len - 1) >> Log2RegionSize;
536-
537-
if (beg_region == end_region) {
538-
// All in one region.
539-
_region_data[beg_region].add_live_obj(len);
540-
return;
541-
}
542-
543-
// First region.
544-
const size_t beg_ofs = region_offset(addr);
545-
_region_data[beg_region].add_live_obj(RegionSize - beg_ofs);
546-
547-
// Middle regions--completely spanned by this object.
548-
for (size_t region = beg_region + 1; region < end_region; ++region) {
549-
_region_data[region].set_partial_obj_size(RegionSize);
550-
_region_data[region].set_partial_obj_addr(addr);
551-
}
552-
553-
// Last region.
554-
const size_t end_ofs = region_offset(addr + len - 1);
555-
_region_data[end_region].set_partial_obj_size(end_ofs + 1);
556-
_region_data[end_region].set_partial_obj_addr(addr);
557-
}
558-
559530
void
560531
ParallelCompactData::summarize_dense_prefix(HeapWord* beg, HeapWord* end)
561532
{

‎src/hotspot/share/gc/parallel/psParallelCompact.hpp

-3
Original file line numberDiff line numberDiff line change
@@ -407,9 +407,6 @@ class ParallelCompactData
407407
inline BlockData* block(size_t block_idx) const;
408408
inline size_t block(const BlockData* block_ptr) const;
409409

410-
void add_obj(HeapWord* addr, size_t len);
411-
void add_obj(oop p, size_t len) { add_obj(cast_from_oop<HeapWord*>(p), len); }
412-
413410
// Fill in the regions covering [beg, end) so that no data moves; i.e., the
414411
// destination of region n is simply the start of region n. Both arguments
415412
// beg and end must be region-aligned.

1 commit comments

Comments
 (1)

openjdk-notifier[bot] commented on Mar 5, 2024

@openjdk-notifier[bot]
Please sign in to comment.