RFR: Coalesce and fill old, pinned regions after old gen final mark

William Kemper wkemper at openjdk.org
Wed Jul 6 00:23:12 UTC 2022


On Tue, 5 Jul 2022 17:56:49 GMT, Kelvin Nilsen <kdnilsen at openjdk.org> wrote:

>> Pinned regions were not being coalesced and filled. This fixes a crash observed with the specjbb 2015 benchmark.
>
> src/hotspot/share/gc/shenandoah/heuristics/shenandoahOldHeuristics.cpp line 217:
> 
>> 215:         candidates[cand_idx]._garbage = 0;
>> 216:         cand_idx++;
>> 217:       }
> 
> Even when sorted to the end of the candidate list, it is still possible that the region might be selected as part of a mixed evacuation.  What's to prevent that from happening?  Also, as I contemplate this scenario, what will happen if an old-gen region is not pinned "now", but becomes pinned before it is included into the mixed-evacuation collection set?  Do we handle that case properly?

If it is selected as a candidate for an old evacuation, access to it will be protected by the mark bitmap (`heap->doing_mixed_evacuations()` will be true).

Hmm, we might not handle that case properly. Independent of the filling dead objects issue, I can see nothing to prevent old regions with a `pin_count() > 0` from being added to a mixed collection (which would be bad for other reasons). I shall convert this PR to draft until we have a solution that handles that scenario. Perhaps we can also address Ramki's concern that regions that become 'unpinned' before the mixed collection _should_ be included.

-------------

PR: https://git.openjdk.org/shenandoah/pull/149


More information about the shenandoah-dev mailing list