JDK-8155982 : CompareAndExchange/Swap should leverage MemoryAccess class
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 10
  • Priority: P3
  • Status: Closed
  • Resolution: Won't Fix
  • Submitted: 2016-05-03
  • Updated: 2020-08-19
  • Resolved: 2020-01-14
Related Reports
Relates :  
Description
JDK-8150921 introduced a new MemoryAccess helper class in unsafe.cpp for handling the various Unsafe memory accesses, wrapping them in t->doing_unsafe_access() calls if needed, normalizing the stored values, etc.

The CompareAndExchange and CompareAndSwap intrinsics should also leverage the MemoryAccess class.
Comments
Does this relate to the Unsafe intrinsics? If so intrinsics would seem to be a compiler issue not runtime.
15-01-2019

[~gtriantafill] No, this is not part of the atomic cleanup work. This is an entirely separate item.
01-08-2017

[~kbarrett], is this part of the atomic cleanup work?
01-08-2017

I don't see the connection between the MemoryAccess "unsafe access" helper and the "CAS" methods ??
09-05-2017

[~eosterlund] looks like you're doing some major cleanup in this general area - mind taking this over?
09-05-2017