OpenJDK / jdk / hs
changeset 49118:663f20fc5109 jdk-10+44
8197968: [Backout] JDK-8196883 G1RemSet::refine_card_concurrently doesn't need to check for cards in collection set
Reviewed-by: kbarrett
author | tschatzl |
---|---|
date | Thu, 15 Feb 2018 00:20:22 +0100 |
parents | f9884e190f2b |
children | ed9ff662b1e0 |
files | src/hotspot/share/gc/g1/g1RemSet.cpp |
diffstat | 1 files changed, 16 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/hotspot/share/gc/g1/g1RemSet.cpp Fri Feb 09 12:53:08 2018 +0100 +++ b/src/hotspot/share/gc/g1/g1RemSet.cpp Thu Feb 15 00:20:22 2018 +0100 @@ -586,6 +586,20 @@ return; } + // While we are processing RSet buffers during the collection, we + // actually don't want to scan any cards on the collection set, + // since we don'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 deals with a reliability issue which + // involves scanning a card in the collection set and coming across + // an array that was being chunked and looking malformed. Note, + // however, that if evacuation fails, we have to scan any objects + // that were not moved and create any missing entries. + if (r->in_collection_set()) { + return; + } + // The result from the hot card cache insert call is either: // * pointer to the current card // (implying that the current card is not 'hot'), @@ -610,7 +624,8 @@ // Check whether the region formerly in the cache should be // ignored, as discussed earlier for the original card. The - // region could have been freed while in the cache. + // region could have been freed while in the cache. The cset is + // not relevant here, since we're in concurrent phase. if (!r->is_old_or_humongous()) { return; }