Integrated: 8304809: Remove develop flag G1ExitOnExpansionFailure
Thomas Schatzl
tschatzl at openjdk.org
Mon Mar 27 08:20:46 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
This pull request has now been integrated.
Changeset: 4acf20df
Author: Thomas Schatzl <tschatzl at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/4acf20df7b4729dbf1b6fbab8a94d84c76437031
Stats: 20 lines in 2 files changed: 0 ins; 13 del; 7 mod
8304809: Remove develop flag G1ExitOnExpansionFailure
Reviewed-by: ayang, kbarrett
-------------
PR: https://git.openjdk.org/jdk/pull/13174
More information about the hotspot-gc-dev
mailing list