RFR: 8257774: G1: Trigger collect when free region count drops below threshold to prevent evacuation failures [v9]

Stefan Johansson sjohanss at openjdk.java.net
Wed Jun 2 14:49:33 UTC 2021


On Tue, 1 Jun 2021 20:26:14 GMT, Aditya Mandaleeka <adityam at openjdk.org> wrote:

> I think you're right, this cause can be confusing when it's on a full collection. The question then is where to switch the cause, and what to switch it to. The problem is that we don't know at the point the cause is set what kind of collection will end up happening. We may decide to upgrade to a full collection in `G1CollectedHeap::do_collection_pause_at_safepoint` or in `satisfy_failed_allocation_helper`. We could put a check in `do_full_collection` that checks if the cause is preventive collection and changes it (to Allocation Failure? something else?), but that seems a bit clunky. Stefan/Thomas, do you have any suggestions?

We discussed this a bit today and the general idea is that we should change the GC-cause for upgraded GCs to something better and more descriptive. We can do that outside this change, either before or after. I filed [JDK-8268122](https://bugs.openjdk.java.net/browse/JDK-8268122) and will look into this.

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

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



More information about the hotspot-gc-dev mailing list