RFR: 8315247: GenShen: Condition calls to post-write barrier code generation by a flag

William Kemper wkemper at openjdk.org
Tue Aug 29 18:48:27 UTC 2023


On Mon, 28 Aug 2023 21:13:22 GMT, Kelvin Nilsen <kdnilsen at openjdk.org> wrote:

>> Protect the card barrier code generation by a new global `ShenandoahCardBarrier`, which is disabled by default and enabled for GenShen (generational mode Shenandoah) only. If the user forces the barrier flag to a value inconsistent with mode, we exit with an appropriate error message.
>> 
>> The changes have been made for x86, aarch, and ppc. I have tested on x86 on a cloud host running jtreg1-4 and SPECjbb. A round of aarch64 and x86 pipeline tests have run (but ran into existing assertion that William is fixing). Will request PPC testing from partners able to test. RISC-V & S390 don't currently support generational mode Shenandoah.
>
> src/hotspot/share/gc/shenandoah/shenandoah_globals.hpp line 523:
> 
>> 521:   product(bool, ShenandoahCardBarrier, false, DIAGNOSTIC,                   \
>> 522:           "Turn on/off card-marking post-write barrier in Shenandoah")      \
>> 523:                                                                             \
> 
> I was thinking this would not be visible on the command line.  If we make it visible, then we would need to assure consistency with mode == generational.
> 
> My thought was we would just set this global variable in, for example, ShenandoahArguments::initialize() if !strcmp(ShenandoahGCMode, "generational")

This approach has parity with the other barrier flags. `shenandoahGenerationalMode.cpp` asserts that the flag is on. 

It shouldn't be strictly necessary with the default being `false`, but we may want to have `shenandoahPassiveMode.cpp` explicitly turn this flag off as it does the other barrier flags.

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

PR Review Comment: https://git.openjdk.org/shenandoah/pull/313#discussion_r1307974222


More information about the shenandoah-dev mailing list