RFR: 8339661: ZGC: Move some page resets and verification to callsites

Erik Österlund eosterlund at openjdk.org
Mon Sep 9 14:47:06 UTC 2024


On Fri, 6 Sep 2024 12:43:28 GMT, Joel Sikström <duke at openjdk.org> wrote:

> Currently, `ZPage::reset()` does different things depending on where the page is being reset and what it will be used for. This leads to checks being somewhat hard to understand and to follow the edge-cases of.
> 
> By moving some of the reset logic that is now part of `ZPage::reset()` to the callsite, some operations can be made easier to understand the reason behind when reading the code.
> 
> Main highlights:
> - Clear logic behind initializing remsets at callsites, now guarded by asserts in `ZPage::remset_initialize()`.
> - `ZPage::clone_limited()` retains the value of the top-pointer.
> - The kind of verification for remsets are now at callsites:
>   - Allocations from the page cache, and only if the page got a remset
>   - Old-to-old in-place relocations, where only the inactive remset is checked

Nice change! Looks good.

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

Marked as reviewed by eosterlund (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/20890#pullrequestreview-2290147705


More information about the hotspot-gc-dev mailing list