Request for review: 7010665 - Misplaced membar in C1 implementation of Unsafe.get/putXXX
David Holmes
David.Holmes at oracle.com
Thu Jan 6 23:09:41 PST 2011
http://cr.openjdk.java.net/~dholmes/7010665/
The memory barriers were misplaced in the intrinsic versions of the
Unsafe.get/put<type>Volatile methods
get
old: -> membar_acquire(), load; membar()
new: -> load; membar_acquire()
put
old: -> membar_release(); store
new: -> membar_release(); store; membar()
These now match the C1 handling of Java volatile variables (see
LIRGenerator::do_StoreField and LIRGenerator::do_LoadField in the same
file).
The non-intrinsic versions are being fixed as part of 7009756.
Thanks,
David
More information about the hotspot-dev
mailing list