RFR: RFR: Eliminate write-barrier assembly stub (part 2)
Aleksey Shipilev
shade at redhat.com
Mon Mar 12 09:03:16 UTC 2018
On 03/10/2018 12:15 PM, Roman Kennke wrote:
> Differential:
> http://cr.openjdk.java.net/~rkennke/eliminate_wb_stub-c2/webrev.02.diff/
> Full patch:
> http://cr.openjdk.java.net/~rkennke/eliminate_wb_stub-c2/webrev.02/
Oh, I see why we cannot remove the stub: FPU spills.
shenandoah_wb_C is getting called with CallLeafNoFPNode for a reason: it makes the compiler to
believe the stub is not using FPU/XMM registers, and thus it can spill registers to them. When the
actual barrier hits, our shenandoah_wb_C saves the FPU/XMM registers before calling to the runtime
(and that call would use XMM for, say, object copying). See:
http://hg.openjdk.java.net/shenandoah/jdk/rev/842e412a3f86
The patch is at least inconsistent here (should be Op_CallLeaf):
4242 if (n->Opcode() == Op_CallLeafNoFP && n->as_Call()->_entry_point ==
CAST_FROM_FN_PTR(address, ShenandoahBarrierSet::write_barrier_JRT)) {
So, I really believe we should keep the stub intact, maybe clean it up a bit by collapsing (!c_abi)
branches, removing ShenandoahWriteBarrierCsetTestInIR, etc.
Thanks,
-Aleksey
More information about the shenandoah-dev
mailing list