RFR (sh/8): Backport: JDK-8222766: Shenandoah: streamline post-LRB CAS barrier (x86)

Roman Kennke rkennke at redhat.com
Fri Feb 21 20:44:02 UTC 2020


This is the backport for "JDK-8222766: Shenandoah: streamline post-LRB
CAS barrier (x86)"

It is mostly straightforward in the assembler parts.

It does some extra changes in C1 parts, because the way jdk8-C1
generates cas-obj is a bit funny: the assembler parts generate the CAS
instruction, and then in the C1 IR this is followed by a cmove to move
the correct boolean bits into the result register. There is an implicit
dependency between the asm and the IR via the condition flags.

Unfortunately, our new cas-obj assembly doesn't always exit with
condition flags intact. But we *do* have code to fill the result
register. So we should use that. The C1 adjustments pass the result
register to the CAS instruction and use that directly and skip emitting
the trailing cmove in IR.

Testing: hotspot_gc_shenandoah passes
Might be useful if Aleksey or somebody else could run this on 32bit. My
own 32bit setup seems broken ATM.

http://cr.openjdk.java.net/~rkennke/JDK-8222766-jdk8/webrev.00/

Please review carefully.

Thanks,
Roman



More information about the shenandoah-dev mailing list