RFR: JDK-8314777: GenShen: Alias young and old marking bits to legacy Shenandoah marking bit in gc state [v3]
Kelvin Nilsen
kdnilsen at openjdk.org
Wed Aug 23 19:39:54 UTC 2023
On Tue, 22 Aug 2023 21:25:49 GMT, Y. Srinivas Ramakrishna <ysr at openjdk.org> wrote:
>> adding this
>
> Would this be more succinct and easier to read?
>
>
> if (mode()->is_generational() && is_concurrent_old_mark_in_progress()) {
> assert(_gc_state.is_set(MARKING), "Marking flag should be set");
> mask = YOUNG_MARKING;
> } else {
> assert(_gc_state.is_clear(MARKING|OLD_MARKING|YOUNG_MARKING), "All marking flags should be clear");
> mask = MARKING | YOUNG_MARKING;
> }
> set_gc_state_mask(mask, in_progress);
>
>
> where `is_set()` and `is_clear()` check if all flag bits in argument are either all set or all clear (which is different from their current sense). See comment below.
pursuing this, but not adding redundant call to is_generational() along the non-ASSERT control path.
-------------
PR Review Comment: https://git.openjdk.org/shenandoah/pull/309#discussion_r1303460395
More information about the shenandoah-dev
mailing list