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

Y. Srinivas Ramakrishna ysr at openjdk.org
Tue Aug 29 18:48:25 UTC 2023


On Mon, 28 Aug 2023 22:37:07 GMT, Y. Srinivas Ramakrishna <ysr at openjdk.org> wrote:

>> src/hotspot/cpu/x86/gc/shenandoah/shenandoahBarrierSetAssembler_x86.cpp line 213:
>> 
>>> 211:                                                        Register src, Register dst, Register count) {
>>> 212: 
>>> 213:   if (!ShenandoahCardBarrier) {
>> 
>> Why wouldn't we handle this the same as other barriers.  assert(ShenandoahCardBarrier) here and check for ShenandoahCardBarrier before calling arraycopy_epilogue()?
>
> Today we call arraycopy_epilogue() unconditionally from common code (such as stub generators) irrespective of collector. We'll probably want a better barrier set abstraction across all collectors to do what you suggest in the future. For now, I'll just massage this to conform to the other platforms where we test and branch on the flag here (rather than test and return at the top, or do the job in the body that follows).

Updated.

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

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


More information about the shenandoah-dev mailing list