8233065: PSParallelCompact::move_and_update is unused and should be removed
Reviewed-by: lkorinth, tschatzl
--- a/src/hotspot/share/gc/parallel/psParallelCompact.cpp Mon Nov 11 12:06:22 2019 +0100
+++ b/src/hotspot/share/gc/parallel/psParallelCompact.cpp Mon Nov 11 13:20:26 2019 +0100
@@ -3201,46 +3201,6 @@
}
}
-void
-PSParallelCompact::move_and_update(ParCompactionManager* cm, SpaceId space_id) {
- const MutableSpace* sp = space(space_id);
- if (sp->is_empty()) {
- return;
- }
-
- ParallelCompactData& sd = PSParallelCompact::summary_data();
- ParMarkBitMap* const bitmap = mark_bitmap();
- HeapWord* const dp_addr = dense_prefix(space_id);
- HeapWord* beg_addr = sp->bottom();
- HeapWord* end_addr = sp->top();
-
- assert(beg_addr <= dp_addr && dp_addr <= end_addr, "bad dense prefix");
-
- const size_t beg_region = sd.addr_to_region_idx(beg_addr);
- const size_t dp_region = sd.addr_to_region_idx(dp_addr);
- if (beg_region < dp_region) {
- update_and_deadwood_in_dense_prefix(cm, space_id, beg_region, dp_region);
- }
-
- // The destination of the first live object that starts in the region is one
- // past the end of the partial object entering the region (if any).
- HeapWord* const dest_addr = sd.partial_obj_end(dp_region);
- HeapWord* const new_top = _space_info[space_id].new_top();
- assert(new_top >= dest_addr, "bad new_top value");
- const size_t words = pointer_delta(new_top, dest_addr);
-
- if (words > 0) {
- ObjectStartArray* start_array = _space_info[space_id].start_array();
- MoveAndUpdateClosure closure(bitmap, cm, start_array, dest_addr, words);
-
- ParMarkBitMap::IterationStatus status;
- status = bitmap->iterate(&closure, dest_addr, end_addr);
- assert(status == ParMarkBitMap::full, "iteration not complete");
- assert(bitmap->find_obj_beg(closure.source(), end_addr) == end_addr,
- "live objects skipped because closure is full");
- }
-}
-
jlong PSParallelCompact::millis_since_last_gc() {
// We need a monotonically non-decreasing time in ms but
// os::javaTimeMillis() does not guarantee monotonicity.
--- a/src/hotspot/share/gc/parallel/psParallelCompact.hpp Mon Nov 11 12:06:22 2019 +0100
+++ b/src/hotspot/share/gc/parallel/psParallelCompact.hpp Mon Nov 11 13:20:26 2019 +0100
@@ -1130,9 +1130,6 @@
static inline HeapWord* dense_prefix(SpaceId space_id);
static inline ObjectStartArray* start_array(SpaceId space_id);
- // Move and update the live objects in the specified space.
- static void move_and_update(ParCompactionManager* cm, SpaceId space_id);
-
// Process the end of the given region range in the dense prefix.
// This includes saving any object not updated.
static void dense_prefix_regions_epilogue(ParCompactionManager* cm,