RFR: 8358529: GenShen: Heuristics do not respond to changes in SoftMaxHeapSize
Rui Li
duke at openjdk.org
Tue Jun 24 17:19:56 UTC 2025
Generational shenandoah currently doesn't pick up the changes of managed flag `SoftMaxHeapSize` when the app is running. This is because the value of `_soft_max_capacity` in `shenandoahGeneration` is never changed.
This change delegates the soft max heap size in `shenandoahGeneration` to `ShenandoahGenerationalHeap::heap()->soft_max_capacity()`, which does pick up the flag value changes.
Also, found `ShenandoahHeap:: initialize` uses `_num_regions * reg_size_bytes` rather than user input flag value. Updated to using actual flag value.
-------------
Commit messages:
- Remove extra include lines
- Address comments
- 8358529: GenShen: Heuristics do not respond to changes in SoftMaxHeapSize
Changes: https://git.openjdk.org/jdk/pull/25943/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=25943&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8358529
Stats: 156 lines in 4 files changed: 69 ins; 44 del; 43 mod
Patch: https://git.openjdk.org/jdk/pull/25943.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/25943/head:pull/25943
PR: https://git.openjdk.org/jdk/pull/25943
More information about the hotspot-gc-dev
mailing list