RFR (XS) 8156068: Unsafe.{get|set}Opaque should be single copy atomic

Paul Sandoz paul.sandoz at oracle.com
Thu May 5 20:27:29 UTC 2016


> On 5 May 2016, at 12:06, Aleksey Shipilev <aleksey.shipilev at oracle.com> wrote:
> 
> Hi,
> 
> Please review a tiny fix in C2 intrinsics that make
> Unsafe.{get|set}Opaque single-copy atomic, as intended. These opaque
> methods are supposed to act like std::atomic(..., memord_relaxed), that
> is, do not induce ordering, but still provide access atomicity.
> 
> Interpreter and C1 are delegating to volatile get/set, and so are atomic
> already. C2 has a little bug that was introduced along with the initial
> VarHandles change.
> 
> Bug:
> https://bugs.openjdk.java.net/browse/JDK-8156068
> 
> Webrev:
> http://cr.openjdk.java.net/~shade/8156068/webrev.00/
> 
> Testing: jcstress atomicity test on 32-bit x86; RBT (hs-tier0-comp).
> 

+1

Paul.

> Thanks,
> -Aleksey
> 
> 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 841 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/attachments/20160505/312d2a04/signature-0001.asc>


More information about the hotspot-compiler-dev mailing list