RFR: 8371381: [Shenandoah] Setting ergo flags should use FLAG_SET_ERGO [v2]
Rui Li
duke at openjdk.org
Wed Nov 12 00:22:39 UTC 2025
> Setting ergo flags using `FLAG_SET_ERGO`, instead of `FLAG_SET_DEFAULT`, so we can have the right origin info.
>
> Had to expand `ShenandoahEvacReserve` range from `range(1,100)` to `range(0,100)` because when we use shenandoah passive mode and degen is also turned off (`-XX:ShenandoahGCMode=passive -XX:-ShenandoahDegeneratedGC`), we set the ShenandoahEvacReserve to 0: https://github.com/openjdk/jdk/blob/c6a8027b94bbcbde5f7dcabd0bff48b93bbb5a7f/src/hotspot/share/gc/shenandoah/mode/shenandoahPassiveMode.cpp#L41 The issue is surfaced now because `FLAG_SET_DEFAULT` doesn't check the range but `FLAG_SET_ERGO` does.
>
> Testing: jtreg gc. GHA pending.
Rui Li has updated the pull request incrementally with one additional commit since the last revision:
Use FLAG_SET_DEFAULT for ShenandoahEvacReserve in passive
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/28242/files
- new: https://git.openjdk.org/jdk/pull/28242/files/1a5a09bf..65fc9878
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=28242&range=01
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=28242&range=00-01
Stats: 8 lines in 2 files changed: 4 ins; 0 del; 4 mod
Patch: https://git.openjdk.org/jdk/pull/28242.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/28242/head:pull/28242
PR: https://git.openjdk.org/jdk/pull/28242
More information about the hotspot-gc-dev
mailing list