Skip to content
Browse files
8274053: [BACKOUT] JDK-8270842: G1: Only young regions need to redirt…
…y outside references in remset.

Reviewed-by: sjohanss
  • Loading branch information
Thomas Schatzl committed Sep 21, 2021
1 parent a5108a6 commit afd218d39a3125fcea50968edef6e6cfbacfff50
Showing with 13 additions and 10 deletions.
  1. +13 −10 src/hotspot/share/gc/g1/g1EvacFailure.cpp
@@ -81,7 +81,6 @@ class RemoveSelfForwardPtrObjClosure: public ObjectClosure {
G1CollectedHeap* _g1h;
G1ConcurrentMark* _cm;
HeapRegion* _hr;
const bool _is_young;
size_t _marked_bytes;
UpdateLogBuffersDeferred* _log_buffer_cl;
bool _during_concurrent_start;
@@ -96,7 +95,6 @@ class RemoveSelfForwardPtrObjClosure: public ObjectClosure {
@@ -143,14 +141,19 @@ class RemoveSelfForwardPtrObjClosure: public ObjectClosure {
_marked_bytes += (obj_size * HeapWordSize);

// During evacuation failure we do not record inter-region
// references referencing regions that need a remembered set
// update originating from young regions (including eden) that
// failed evacuation. Make up for that omission now by rescanning
// these failed objects.
if (_is_young) {
// While we were processing RSet buffers during the collection,
// we actually didn't scan any cards on the collection set,
// since we didn't want to update remembered sets with entries
// that point into the collection set, given that live objects
// from the collection set are about to move and such entries
// will be stale very soon.
// This change also dealt with a reliability issue which
// involved scanning a card in the collection set and coming
// across an array that was being chunked and looking malformed.
// The problem is that, if evacuation fails, we might have
// remembered set entries missing given that we skipped cards on
// the collection set. So, we'll recreate such entries now.

HeapWord* obj_end = obj_addr + obj_size;
_last_forwarded_object_end = obj_end;

1 comment on commit afd218d


This comment has been minimized.

Copy link

@openjdk-notifier openjdk-notifier bot commented on afd218d Sep 21, 2021

Please sign in to comment.