RFR: 8304809: Remove develop flag G1ExitOnExpansionFailure
Kim Barrett
kbarrett at openjdk.org
Mon Mar 27 01:09:30 UTC 2023
On Fri, 24 Mar 2023 12:02:03 GMT, Thomas Schatzl <tschatzl at openjdk.org> wrote:
> 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
Looks good.
-------------
Marked as reviewed by kbarrett (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/13174#pullrequestreview-1358186393
More information about the hotspot-gc-dev
mailing list