RFR: 8311843: GenShen: assertion failed "Old generation affiliated regions must be less than capacity" [v2]

Kelvin Nilsen kdnilsen at openjdk.org
Sat Aug 26 00:03:40 UTC 2023


On Fri, 25 Aug 2023 23:52:59 GMT, William Kemper <wkemper at openjdk.org> wrote:

>> If we adopt this convention, we should get rid of any asserts that endeavor to enforce max/min generation capacities  (or change these to enforce that capacity never shrinks below 0 and never grows above heap->capacity())
>
> `transfer_to_old` does check if young has enough affiliated regions to transfer:
> 
>   if (young_gen->free_unaffiliated_regions() < regions) {
>     return false;
> 
> 
> I think the original error here was caused by the Mutator free set holding many more regions than were available to the young generation (the issue with `reserve_regions`). I don't expect that to happen again, but I did add a log message if the transfer fails.
> 
> We are already somewhat loose when it comes to enforcing generational capacities. Are you proposing we have `shFreeSet` be the sole arbiter of capacity? That sounds like a good simplification - also sounds like a different PR?

I understand that it checks, but the check should never fail, because the two asserts that precede the call (and did not need to be removed) confirm that the region to be flipped is in the Mutator free set (i.e. is part of young capacity) and is entirely empty (so must be unaffiliated).

I need to study the reserve_regions problem more.  I saw that you refactored a bit.  I didn't catch that you were fixing a bug.

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

PR Review Comment: https://git.openjdk.org/shenandoah/pull/311#discussion_r1306235144


More information about the shenandoah-dev mailing list