RFR: 8333129: Move ShrinkHeapInSteps flag to Serial GC

David Holmes dholmes at openjdk.org
Thu May 30 07:10:02 UTC 2024


On Wed, 29 May 2024 12:36:40 GMT, Zhengyu Gu <zgu at openjdk.org> wrote:

> A trivial change that moves Serial GC specific flag `ShrinkHeapInSteps` to `serial_globals.hpp`

@zhengyu123 I don't think we can do this in quite such a direct way. This flag was added in JDK 9 under [JDK-8146436](https://bugs.openjdk.org/browse/JDK-8146436) and applied to all GC's AFAICS. Over time it seems to have been relegated to only working with SerialGC, but I can still find articles that reference it for GC tuning e.g.

https://docs.oracle.com/en/java/javase/22/gctuning/factors-affecting-garbage-collection-performance.html

So if this is indeed only for SerialGC now then we need to check when it stopped applying elsewhere and whether all the relevant docs have been updated. Then I think we would need to deprecate it for non-Serial (which is tricky because the flag deprecation process isn't intended to be runtime selective like that). I need to flag this directly with our GC team

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

Changes requested by dholmes (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/19452#pullrequestreview-2087407510


More information about the hotspot-gc-dev mailing list