RFR: Handle old, pinned regions [v7]
Y. Srinivas Ramakrishna
ysr at openjdk.org
Thu Aug 4 21:51:22 UTC 2022
On Wed, 3 Aug 2022 01:10:57 GMT, William Kemper <wkemper at openjdk.org> wrote:
>> Prior to this change, mixed collections were entirely ignoring the pinned status of old regions. Pinned old regions would not be coalesced and filled (which could lead to a crash) and their pin status was not being synchronized with the pin count (which could also lead to a crash). To address these problems, the following changes have been made:
>>
>> * Before adding old regions to the collection set, their pinned status is synchronized.
>> * Pinned old regions will _not_ be added to a mixed collection, they will be skipped and considered for inclusion in the next mixed collection.
>> * Any old regions which have not been evacuated after the last mixed collection will be made parseable (coalesced and filled) _at the start of the next old marking cycle_.
>
> William Kemper has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 21 commits:
>
> - Merge branch 'shenandoah-master' into fill-old-pinned
> - Do not drop abbreviated argument when recording success concurrent cycle
> - Fix whitespace
> - Prepare for review
> - Merge branch 'shenandoah-master' into fill-old-pinned
> - Validate old gen state transitions
> - Make use of old generation without down casting
> - Make verifier aware of changes to old generation state machine
> - Make rset scan aware of changes to old generation state machine
> - Fix use of index as count and over-counting of garbage
> - ... and 11 more: https://git.openjdk.org/shenandoah/compare/60e43d04...bdda91d6
I am in the midst of the review (comments pending), but one question came up that I thought I'd get resolved first, so I had the right mental mode here.
The filler objects are overlaid over dead objects both for performance (being able to skip over them quickly), not having to scan zombie objects are processing stale pointers (safety), and also to be able to safely skip these zombie objects because their sizes may not be computable safely if their klass's have been unloaded. It's the last one that I worry about. If we delay the fillers until (well after) class unloading, will this not cause our scans to be potentially vulnerable to stumbling when trying to compute their size? Or does the use of the marking bitmap always ensure that our closures are never trying to walk over dead objects by trying to determine their size?
Thanks!
Apropos of my previous remark, it would be good, if not already the case to somehow be able to assert this of closures that might walk regions in this state.
-------------
PR: https://git.openjdk.org/shenandoah/pull/149
More information about the shenandoah-dev
mailing list