RFR: JDK-8314777: GenShen: Alias young and old marking bits to legacy Shenandoah marking bit in gc state [v2]
Y. Srinivas Ramakrishna
ysr at openjdk.org
Tue Aug 22 22:13:17 UTC 2023
On Tue, 22 Aug 2023 20:47:47 GMT, Kelvin Nilsen <kdnilsen at openjdk.org> wrote:
>> This change sets the MARKING bit of _gc_state whenever either Young marking or Old marking is active. With this change, barrier code more closely resembles the code in the original single-generation Shenandoah. The performance impact is negligible. The primary benefit is to simplify code reviews and clarify that the addition of generational mode to Shenandoah does not negatively impact performance of single-generation Shenandoah.
>
> Kelvin Nilsen has updated the pull request incrementally with one additional commit since the last revision:
>
> Tidy up asserts
Some minor comments and a small cleanup/refactor suggestion that is separate and would need to upstream separately, and would simplify some code.
src/hotspot/share/gc/shenandoah/shenandoahVerifier.cpp line 842:
> 840: ((actual & ShenandoahHeap::MARKING) && (actual & (ShenandoahHeap::YOUNG_MARKING | ShenandoahHeap::OLD_MARKING))),
> 841: "Inconsistent gc marking state");
> 842:
Would this read easier?
#ifdef ASSERT
const ShenandoahSharedValue val = actual & (MARKING|YOUNG_MARKING|OLD_MARKING);
assert((val & MARKING) == ((val & YOUNG_MARKING) || (val & OLD_MARKING)), "Error");
#endif
-------------
Marked as reviewed by ysr (Committer).
PR Review: https://git.openjdk.org/shenandoah/pull/309#pullrequestreview-1590367114
PR Review Comment: https://git.openjdk.org/shenandoah/pull/309#discussion_r1302233167
More information about the shenandoah-dev
mailing list