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

Kim Barrett kbarrett at openjdk.java.net
Wed Jun 9 17:19:12 UTC 2021

On Wed, 9 Jun 2021 16:33:11 GMT, Stefan Johansson <sjohanss 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.

Looks good.


Marked as reviewed by kbarrett (Reviewer).

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

More information about the hotspot-gc-dev mailing list