RFR: Avoid stub when calling to write-barrier from C2, remove all related code

Roman Kennke rkennke at redhat.com
Mon Nov 19 18:13:56 UTC 2018


Hi Aleksey,

>> And rebased on top of removal of ShenandoahWriteBarrierCsetTestInIR:
>> http://cr.openjdk.java.net/~rkennke/remove-c2-wb-stub/webrev.01/
> 
> I am actually pleasantly surprised the effects are almost invisible after this change. There are
> some generated code differences -- for example, XMM spills seem to be less frequent when barriers
> are present in the hot loops -- but otherwise the change is performance-neutral.
> 
> I guess that is a testament for WB slowpath improvements.

Thanks for verifying this. Yeah, I was pleasantly surprised too.


> Do we really need to check for flags here? ShenandoahBarrierSetC2::is_shenandoah_wb_pre_call does
> not check any SATB-related flags.
> 
>  362 bool ShenandoahBarrierSetC2::is_shenandoah_wb_call(Node* call) {
>  363   if (ShenandoahWriteBarrier || ShenandoahStoreValEnqueueBarrier) {
>  364     return call->is_CallLeaf() &&
>  365            call->as_CallLeaf()->entry_point() == CAST_FROM_FN_PTR(address,
> ShenandoahRuntime::write_barrier_JRT);
>  366   } else {
>  367     return false;
>  368   }
>  369 }
>  370

You're right, that's not needed.

http://cr.openjdk.java.net/~rkennke/remove-c2-wb-stub/webrev.01/

Good now?

Roman



More information about the shenandoah-dev mailing list