RFR: JDK-8221751: Shenandoah: Improve SATB enqueueing

Andrew Haley aph at redhat.com
Tue Apr 2 16:56:41 UTC 2019


On 4/2/19 4:41 PM, Roman Kennke wrote:
> s there also a short version of this check:
> 
> __ mov(rscratch2, ShenandoahHeap::MARKING | ShenandoahHeap::TRAVERSAL);
> __ tst(rscratch1, rscratch2);
> __ br(Assembler::EQ, done);
> 
> because I need this too in a couple of places.

Not really, no. There is no short immediate form of
ShenandoahHeap::MARKING | ShenandoahHeap::TRAVERSAL. Of course you
could do it with two tbz instructions and that would be shorter, but
ewww. You could change it to

__ tst(rscratch1, ShenandoahHeap::MARKING | ShenandoahHeap::TRAVERSAL);
__ br(Assembler::EQ, done);

by moving TRAVERSAL immediately after MARKING in GCStateBitPos. But
you might think that's a bit weird. :-)

-- 
Andrew Haley
Java Platform Lead Engineer
Red Hat UK Ltd. <https://www.redhat.com>
EAC8 43EB D3EF DB98 CC77 2FAD A5CD 6035 332F A671



More information about the hotspot-gc-dev mailing list