[jdk20] Integrated: 8298215: gc/g1/TestVerifyGCType.java failed with "Missing expected verification pattern Verifying After GC for: Pause Young (Prepare Mixed): expected true, was false"
Kim Barrett
kbarrett at openjdk.org
Tue Dec 20 00:17:52 UTC 2022
On Sun, 18 Dec 2022 22:42:11 GMT, Kim Barrett <kbarrett at openjdk.org> wrote:
> Please review this fix to the calculation of the number of young regions to use.
>
> That calculation was recently changed (JDK-8297186), but that change has a
> problem. It ensures the desired number of young regions calculated at the end
> of a collection includes at least one eden region, to ensure progress is made.
> It accomplished this by ensuring the minimum length was the number of already
> allocated regions + 1 when doing the calculation at the end of a GC. But for
> a revision of the length during the mutator phase it intentionally didn't do
> that, as we want to trigger a collection rather than forceably expand.
>
> However, a revision may occur immediately after the GC (indeed that's fairly
> likely after JDK-8137022).
>
> A better calculation is to ensure the desired number of young regions is at
> least the number of survivor regions + 1. (That's effectively what the old
> code was doing in the end-of-GC calculation, since at that time all allocated
> regions are survivor regions.) So that's the basic change. This also removes
> the need to distinguish between updating for GC or during the mutator phase
> that was introduced by JDK-8297186 (the "after-gc" argument).
>
> Also changed the test to also include the subprocess log in the error message
> when the check for verification messages fails, to aid any future debugging.
>
> Testing:
>
> mach5 tier1-3. This isn't all that revealing, since the test failure was very
> intermittent.
>
> Hand tested with my changes to address JDK-8293824. With just those changes
> the test was failing pretty reliably (instead of intermittently). Adding the
> changes proposed here lets that test (seemingly) reliably pass. (There might
> still be some work to do for JDK-8293824.)
>
> There are some naming and description comment improvements around
> update_young_length_bounds that I'd like to make, but I'm deferring those as a
> separate RFE and keeping this bug fix fairly minimal.
This pull request has now been integrated.
Changeset: ea40f299
Author: Kim Barrett <kbarrett at openjdk.org>
URL: https://git.openjdk.org/jdk20/commit/ea40f299397f19f1bbedd4eeb4d24802a709a912
Stats: 49 lines in 4 files changed: 4 ins; 26 del; 19 mod
8298215: gc/g1/TestVerifyGCType.java failed with "Missing expected verification pattern Verifying After GC for: Pause Young (Prepare Mixed): expected true, was false"
Reviewed-by: iwalulya, tschatzl
-------------
PR: https://git.openjdk.org/jdk20/pull/52
More information about the hotspot-gc-dev
mailing list