RFR: 8304809: Remove develop flag G1ExitOnExpansionFailure

Thomas Schatzl tschatzl at openjdk.org
Fri Mar 24 12:11:36 UTC 2023


Hi all,

  please review this removal of the `G1ExitOnExpansionFailure` develop flag. This flag has apparently been there for a long time to better diagnose issues when committing regions fails. Which in itself isn't very useful, as it's a `develop` flag and disabled by default. However @albertnetymk made me aware that this is actually dead code: after JDK8u45 or so, when the heap expansion code has been rewritten, failure to commit will already exit the VM (in `G1PageBasedVirtualSpace` all commit related methods do call `os::commit_memory_or_exit`), so `expanded_by` must always be non-zero. The else-part will never be executed, so can be removed.

Just in case I added an `assert` to check that; testing tier1-5 with changes that do much more committing could not find any related issue. In the product, afaict getting here with `expanded_by` isn't disastrous either, this would only be a slightly expensive nop telling subsystems that nothing changed.

Testing: tier1-5, gha

Thanks,
  Thomas

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

Commit messages:
 - remove test helpers
 - is dead code, add test code
 - initial version, remove with amended log messages

Changes: https://git.openjdk.org/jdk/pull/13174/files
 Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=13174&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8304809
  Stats: 20 lines in 2 files changed: 0 ins; 13 del; 7 mod
  Patch: https://git.openjdk.org/jdk/pull/13174.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/13174/head:pull/13174

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


More information about the hotspot-gc-dev mailing list