RFR: 8268390: G1 concurrent gc upgrade to full gc not working

Stefan Johansson sjohanss at openjdk.java.net
Thu Jun 10 10:24:16 UTC 2021


On Thu, 10 Jun 2021 07:02:39 GMT, Thomas Schatzl <tschatzl at openjdk.org> wrote:

>> Please review this small change to enable concurrent GCs to be upgraded to Full collections when there are no free regions.
>> 
>> **Summary** 
>> During the review of PR #4342 it was noted that we currently never upgrade concurrent GCs (from `VM_G1TryInitiateConcMark::doit()`) to full collections. In `should_upgrade_to_full_gc()` there was a check to always return false for "concurrent" GC-causes. There is no obviously good reason for this, and this change will enable concurrent GCs to be upgraded.
>> 
>> This could not be included in PR #4342 because that would make us hit the same problem as reported in [JDK-8195158](https://bugs.openjdk.java.net/browse/JDK-8195158). The fix back then was to not upgrade concurrent GCs. The approach used now, which was added by PR #4357, is to use another GC cause for upgraded GCs. 
>> 
>> What this change does is basically just removing the `should_do_concurrent_full_gc()` check from `should_upgrade_to_full_gc()` and once that is done `has_regions_left_for_allocation()` might as well be folded into `should_upgrade_to_full_gc()`
>> 
>> **Testing**
>> Manual testing to verify this does not cause the assertion failure from JDK-8195158. Currently running Mach5 testing.
>
> Lgtm.

Thanks @tschatzl and @kimbarrett.

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

PR: https://git.openjdk.java.net/jdk/pull/4435


More information about the hotspot-gc-dev mailing list