RFR: 8304809: Remove develop flag G1ExitOnExpansionFailure

Thomas Schatzl tschatzl at openjdk.org
Mon Mar 27 08:20:44 UTC 2023


On Fri, 24 Mar 2023 12:16:16 GMT, Albert Mingkun Yang <ayang 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
>
> Marked as reviewed by ayang (Reviewer).

Thanks @albertnetymk @kimbarrett for your reviews

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

PR Comment: https://git.openjdk.org/jdk/pull/13174#issuecomment-1484705058


More information about the hotspot-gc-dev mailing list