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

Stefan Johansson sjohanss at openjdk.java.net
Thu Jun 10 10:24:17 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.

This pull request has now been integrated.

Changeset: f770f771
Author:    Stefan Johansson <sjohanss at openjdk.org>
URL:       https://git.openjdk.java.net/jdk/commit/f770f771f86db7d4878b71137cd5a72c7c40cb2e
Stats:     19 lines in 3 files changed: 1 ins; 13 del; 5 mod

8268390: G1 concurrent gc upgrade to full gc not working

Reviewed-by: kbarrett, tschatzl

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

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



More information about the hotspot-gc-dev mailing list