RFR (S) 8152698: Remove obsolete Unsafe.putOrdered{X} methods, usages, runtime and compiler support

Aleksey Shipilev aleksey.shipilev at oracle.com
Thu Mar 24 16:45:57 UTC 2016

(before you freak out about sun.misc.Unsafe, read fully)


I would like us to sweep up Unsafe.putOrdered{X} methods in favor of new
and properly-named Unsafe.put{X}Release:

Paul had already prodded the ground for this idea, now it's time to
implement it:

putRelease do exactly the same what putOrdered do barrier-wise. In fact,
C2 intrinsics for putOrdered and putRelease are identical. C1
intrinsifies putOrdered into putVolatile. unsafe.cpp also fallbacks to
putVolatile (actually, into a duplicate copy of it).

The only thing left would be sun.misc.Unsafe.putOrdered, which we cannot
yet remove. But, in the spirit of recent Unsafe cleanup, we can fallback
to j.i.m.Unsafe.putRelease, relieving runtime and compilers from even
knowing about putOrdered.


Testing: compiler/unsafe jtregs; JPRT -testset hotspot

I'd like to push through hs-comp to meet other VarHandles changes.


More information about the hotspot-dev mailing list