RFR: 8344073: Test runtime/cds/appcds/TestParallelGCWithCDS.java#id0 failed

Calvin Cheung ccheung at openjdk.org
Tue Jul 8 22:15:38 UTC 2025


On Tue, 8 Jul 2025 21:36:14 GMT, Matias Saavedra Silva <matsaave at openjdk.org> wrote:

> TestParallelGCWithCDS.java runs with various heap sizes even though a heap size of 2MB can be too small for G1. This patch changes the test so that it only runs with a 4MB heap.

Looks good. I think it can be simplified further.

test/hotspot/jtreg/runtime/cds/appcds/TestParallelGCWithCDS.java line 128:

> 126:             // We dumped with G1, so we have an archived heap. At exec time, try to load them into
> 127:             // a small ParallelGC heap that may be too small.
> 128:             System.out.println("=======\n" + n + ". Exec with " + execGC);

Since you got rid of the `for` loop, I think it can be simplified without using the `n` variable.
Suggestion:

           System.out.println("2. Exec with " + execGC);

test/hotspot/jtreg/runtime/cds/appcds/TestParallelGCWithCDS.java line 143:

> 141:                 out.shouldNotHaveFatalError();
> 142:             }
> 143:             n++;

This can be removed together with its declaration at line 124.

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

PR Review: https://git.openjdk.org/jdk/pull/26204#pullrequestreview-2999215518
PR Review Comment: https://git.openjdk.org/jdk/pull/26204#discussion_r2193520949
PR Review Comment: https://git.openjdk.org/jdk/pull/26204#discussion_r2193521776


More information about the hotspot-runtime-dev mailing list