Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
8254164: G1 only removes self forwarding pointers for last collection…
… set increment

Reviewed-by: sjohanss, kbarrett
  • Loading branch information
Thomas Schatzl committed Oct 12, 2020
1 parent bf46acf commit 59378a1
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/hotspot/share/gc/g1/g1EvacFailure.cpp
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2012, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -259,5 +259,10 @@ G1ParRemoveSelfForwardPtrsTask::G1ParRemoveSelfForwardPtrsTask(G1RedirtyCardsQue
void G1ParRemoveSelfForwardPtrsTask::work(uint worker_id) {
RemoveSelfForwardPtrHRClosure rsfp_cl(_rdcqs, worker_id);

_g1h->collection_set_iterate_increment_from(&rsfp_cl, &_hrclaimer, worker_id);
// We need to check all collection set regions whether they need self forward
// removals, not only the last collection set increment. The reason is that
// reference processing (e.g. finalizers) can make it necessary to resurrect an
// otherwise unreachable object at the very end of the collection. That object
// might cause an evacuation failure in any region in the collection set.
_g1h->collection_set_par_iterate_all(&rsfp_cl, &_hrclaimer, worker_id);
}

1 comment on commit 59378a1

@bridgekeeper
Copy link

@bridgekeeper bridgekeeper bot commented on 59378a1 Oct 12, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.