mirror of
https://github.com/openjdk/jdk.git
synced 2026-03-15 10:23:28 +00:00
8326781: G1ConcurrentMark::top_at_rebuild_start() should take a HeapRegion* not an uint
Reviewed-by: iwalulya, ayang
This commit is contained in:
parent
e6b3bda2c3
commit
e7e8083139
@ -561,7 +561,7 @@ public:
|
||||
// Sets the internal top_at_region_start for the given region to current top of the region.
|
||||
inline void update_top_at_rebuild_start(HeapRegion* r);
|
||||
// TARS for the given region during remembered set rebuilding.
|
||||
inline HeapWord* top_at_rebuild_start(uint region) const;
|
||||
inline HeapWord* top_at_rebuild_start(HeapRegion* r) const;
|
||||
|
||||
// Clear statistics gathered during the concurrent cycle for the given region after
|
||||
// it has been reclaimed.
|
||||
|
||||
@ -184,9 +184,8 @@ inline size_t G1CMTask::scan_objArray(objArrayOop obj, MemRegion mr) {
|
||||
return mr.word_size();
|
||||
}
|
||||
|
||||
inline HeapWord* G1ConcurrentMark::top_at_rebuild_start(uint region) const {
|
||||
assert(region < _g1h->max_reserved_regions(), "Tried to access TARS for region %u out of bounds", region);
|
||||
return _top_at_rebuild_starts[region];
|
||||
inline HeapWord* G1ConcurrentMark::top_at_rebuild_start(HeapRegion* r) const {
|
||||
return _top_at_rebuild_starts[r->hrm_index()];
|
||||
}
|
||||
|
||||
inline void G1ConcurrentMark::update_top_at_rebuild_start(HeapRegion* r) {
|
||||
|
||||
@ -105,7 +105,7 @@ class G1RebuildRSAndScrubTask : public WorkerTask {
|
||||
// - been allocated after rebuild start, or
|
||||
// - been reclaimed by a collection.
|
||||
bool should_rebuild_or_scrub(HeapRegion* hr) const {
|
||||
return _cm->top_at_rebuild_start(hr->hrm_index()) != nullptr;
|
||||
return _cm->top_at_rebuild_start(hr) != nullptr;
|
||||
}
|
||||
|
||||
// Helper used by both humongous objects and when chunking an object larger than the
|
||||
@ -229,7 +229,7 @@ class G1RebuildRSAndScrubTask : public WorkerTask {
|
||||
assert(should_rebuild_or_scrub(hr), "must be");
|
||||
|
||||
log_trace(gc, marking)("Scrub and rebuild region: " HR_FORMAT " pb: " PTR_FORMAT " TARS: " PTR_FORMAT " TAMS: " PTR_FORMAT,
|
||||
HR_FORMAT_PARAMS(hr), p2i(pb), p2i(_cm->top_at_rebuild_start(hr->hrm_index())), p2i(hr->top_at_mark_start()));
|
||||
HR_FORMAT_PARAMS(hr), p2i(pb), p2i(_cm->top_at_rebuild_start(hr)), p2i(hr->top_at_mark_start()));
|
||||
|
||||
if (scan_and_scrub_to_pb(hr, hr->bottom(), pb)) {
|
||||
log_trace(gc, marking)("Scan and scrub aborted for region: %u", hr->hrm_index());
|
||||
@ -246,7 +246,7 @@ class G1RebuildRSAndScrubTask : public WorkerTask {
|
||||
hr->note_end_of_scrubbing();
|
||||
|
||||
// Rebuild from TAMS (= parsable_bottom) to TARS.
|
||||
if (scan_from_pb_to_tars(hr, pb, _cm->top_at_rebuild_start(hr->hrm_index()))) {
|
||||
if (scan_from_pb_to_tars(hr, pb, _cm->top_at_rebuild_start(hr))) {
|
||||
log_trace(gc, marking)("Rebuild aborted for region: %u (%s)", hr->hrm_index(), hr->get_short_type_str());
|
||||
return true;
|
||||
}
|
||||
@ -272,7 +272,7 @@ class G1RebuildRSAndScrubTask : public WorkerTask {
|
||||
"Humongous object not live");
|
||||
|
||||
log_trace(gc, marking)("Rebuild for humongous region: " HR_FORMAT " pb: " PTR_FORMAT " TARS: " PTR_FORMAT,
|
||||
HR_FORMAT_PARAMS(hr), p2i(pb), p2i(_cm->top_at_rebuild_start(hr->hrm_index())));
|
||||
HR_FORMAT_PARAMS(hr), p2i(pb), p2i(_cm->top_at_rebuild_start(hr)));
|
||||
|
||||
// Scan the humongous object in chunks from bottom to top to rebuild remembered sets.
|
||||
HeapWord* humongous_end = hr->humongous_start_region()->bottom() + humongous->size();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user