RFR: 8319867: GenShen: Make old regions parseable at end of concurrent cycles [v2]
Y. Srinivas Ramakrishna
ysr at openjdk.org
Mon Nov 13 15:55:08 UTC 2023
On Sat, 11 Nov 2023 00:44:35 GMT, William Kemper <wkemper at openjdk.org> wrote:
>> src/hotspot/share/gc/shenandoah/shenandoahOldGeneration.cpp line 448:
>>
>>> 446: break;
>>> 447: case EVACUATING:
>>> 448: assert(_state == WAITING_FOR_BOOTSTRAP || _state == MARKING, "Cannot have old collection candidates without first marking, state is '%s'", state_name(_state));
>>
>> FWIW, the ASCII art state-transition-diagram doesn't show the transition from WAITING_FOR_BOOTSTRAP directly into EVACUATING, without passing through an intermediate MARKING.
>
> Yes, that can only happen at the end of a _GLOBAL_ collection. This is explained in the comment above the diagram. I will add it to the diagram.
Got it. One way to manage this and still get stronger checking during all, but in particular non-global, collections, might be to organize the state transition checks per collection type, and make assertions specific to the kind of collection in which the transition is happening/being checked. But perhaps that is overkill, and in any case not necessary in this PR.
-------------
PR Review Comment: https://git.openjdk.org/shenandoah/pull/355#discussion_r1391304232
More information about the shenandoah-dev
mailing list