RFR: 8373403: [TESTBUG] TestG1ClassUnloadingHWM.java could fail with large G1HeapRegionSize and small InitialHeapSize
Thomas Schatzl
tschatzl at openjdk.org
Wed Dec 10 13:54:48 UTC 2025
On Wed, 10 Dec 2025 09:48:44 GMT, Man Cao <manc at openjdk.org> wrote:
> Hi all,
>
> Could anyone review this test-only improvement to make TestG1ClassUnloadingHWM.java more robust in various configurations?
> See https://bugs.openjdk.org/browse/JDK-8373403 for more details.
>
> -Man
I think this is a test bug: it should check whether the Metadata GCs is a full gc and not a young gc starting a concurrent mark. Right now the test just checks whether there is any full gc and not a concurrent start gc at all. The regexp should add a `Metadata GC Threshold` part there.
@walulyai' s comment hints at another issue: if there is only one region, there is no gain in collecting that region (unless, very unlikely, that single region is completely empty). Either the concurrent mark will select it as an evacuation candidate and copy its contents to another (single) region, or do nothing.
Either way nothing is gained. However this is a different issue imo.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/28738#issuecomment-3637194010
More information about the hotspot-gc-dev
mailing list