RFR: 8236073: G1: Use SoftMaxHeapSize to guide GC heuristics

Thomas Schatzl tschatzl at openjdk.org
Tue Sep 30 13:45:28 UTC 2025


Hi all,

  please review this change to implement `SoftMaxHeapSize` for G1.

Main change is that `SoftMaxHeapSize` now impacts the `G1IHOPControl::target_occupancy()`, i.e. the amount of bytes G1 when reclaim should start.

Most of the other changes are just about updating logging/JFR and making sure that the `SoftMaxHeapSize` values are consistent across calls.

Testing: tier1-5

Thanks,
  Thomas

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

Commit messages:
 - * add test showing that the GC responds to changes of the SoftMaxHeapSize variable
 - * some comment update for target_occupancy()
 - * fix gtests
 - * observe MinHeapSize for `G1CollectedHeap::soft_max_capacity()`
 - * updates
 - initial version

Changes: https://git.openjdk.org/jdk/pull/27524/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=27524&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8236073
  Stats: 123 lines in 10 files changed: 82 ins; 4 del; 37 mod
  Patch: https://git.openjdk.org/jdk/pull/27524.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/27524/head:pull/27524

PR: https://git.openjdk.org/jdk/pull/27524


More information about the hotspot-dev mailing list