JDK-8132332 : Unsafe intrinsics overhaul for VarHandle.{getAcquire|setRelease}
  • Type: Sub-task
  • Component: core-libs
  • Sub-Component: java.lang.invoke
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2015-07-24
  • Updated: 2015-07-28
  • Resolved: 2015-07-28
Related Reports
Relates :  
Description
We do have the {set|get}{.|Volatile|Acquire|Release} accessors for most types. Most of these accessors delegate their gory work to Unsafe. This issue should handle the proper intrinsification of new Unsafe methods for VarHandles work.

In particular, should we really intrinsify putOrdered*, or we can emulate them with fences? Should we intrinsify getAcquire*? What is the difference in intrinsics between putOrdered and putVolatile? 
Comments
Yes, we need to turn getAcquire/setRelease into native methods, and let them be treated on VM side. Nominally, because CPUOrder barriers are apparently required on both sides of access, and also IRIW handling is only doable on VM side. Therefore, the change implements all methods in unsafe.cpp, and rewires the inline_unsafe_access to handle two more flavors of intrinsics: Acquire and Release. Patches: http://cr.openjdk.java.net/~shade/8132332/8132332.hs.patch http://cr.openjdk.java.net/~shade/8132332/8132332.jdk.patch
28-07-2015