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

Aleksey Shipilev shade at redhat.com
Mon Nov 19 16:44:43 UTC 2018


On 11/19/18 11:39 AM, Roman Kennke wrote:
> 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.

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

-Aleksey



More information about the shenandoah-dev mailing list