RFR: Restrict generational mode to adaptive heuristic
William Kemper
wkemper at openjdk.org
Mon Mar 27 16:37:14 UTC 2023
On Mon, 27 Mar 2023 09:45:05 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:
>> This is a small change to Shenandoah, but it prevents us from running the tests with the generational mode enabled via a jtreg vm option. This requires us to properly integrate the generational mode with the jtreg tests. There are many test files changed, but the `generational` mode is now handled in the same fashion as other modes (`iu`, `passive`). There are two additional advantages to these changes:
>> * We no longer need to run the test suite twice (once in the default mode and again with `-XX:ShenandoahGCMode=generational`).
>> * Expanded test coverage, as some tests would spawn their own VMs with permutations of mode and heuristic options that ignored the generational mode.
>
> test/hotspot/jtreg/gc/shenandoah/TestAllocObjectArrays.java line 167:
>
>> 165: * @run main/othervm -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -Xmx1g -Xms1g
>> 166: * -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=adaptive -XX:ShenandoahGCMode=generational
>> 167: * -XX:-UseTLAB -XX:+ShenandoahVerify
>
> This `-XX:+ShenandoahVerify` seems excessive. This config is supposed to run without verification. Copy-paste error, it seems.
The first execution in this `no-tlab` configuration runs the default mode and heuristic with verification enabled, so I'm doing the same for the generational mode configuration.
> test/hotspot/jtreg/gc/shenandoah/TestParallelRefprocSanity.java line 1:
>
>> 1: /*
>
> Why is this removed?
After reference processing was made concurrent, Shenandoah no longer reads the `ParallelRefProcEnabled` flag. Reference processing is covered by `TestRefprocSanity.java`.
> test/hotspot/jtreg/gc/shenandoah/TestRegionSamplingLogging.java line 31:
>
>> 29: * @run main/othervm -Xmx1g -Xms1g -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions
>> 30: * -XX:+ShenandoahRegionSampling -XX:+ShenandoahRegionSampling
>> 31: * -Xlog:gc+region=trace:region-snapshots-%p.log::filesize=100,filecount=3
>
> So, `trace` is enough here? This looks like something we need to fix upstream, rather than do in a bulk change like this.
This feature of writing the region sampling data out to logs is only on the generational branch at this time. It wouldn't be hard to pull it out into a separate upstream PR.
-------------
PR Review Comment: https://git.openjdk.org/shenandoah/pull/233#discussion_r1149505379
PR Review Comment: https://git.openjdk.org/shenandoah/pull/233#discussion_r1149507947
PR Review Comment: https://git.openjdk.org/shenandoah/pull/233#discussion_r1149509452
More information about the shenandoah-dev
mailing list