RFR (S): CR 8004318/JEP 171 Fences intrinsics

Aleksey Shipilev aleksey.shipilev at oracle.com
Wed Dec 5 00:02:52 PST 2012

On 12/05/2012 03:13 AM, Kirk Pepperdine wrote:
> I didn't think you'd take this to be an straight-forward question.

libpsychic.so.1: not found.

> This was more an expression of concern about the C++ification of the
> platform. I'm not so convinced we should be introducing these
> annotations until we have explored other options that maybe more
> suitable for Java.

Fences are the members of Unsafe, which is known to hold the out-of-band
methods, suitable for programming in JVMese, not exactly in Java. The
libraries and on-JVM-runtimes are here to bridge the gap between JVMese
and languages, and by that extension, with users.

Should JMM refresh happen any time in the future, at that point we can
talk whether fences are eligible for promotion to first-class Java
language constructs; before that happens, fences are there among Unsafe
methods, eligible to use in libraries and runtimes if that allows to
gain substantial performance benefits while still maintaining the
illusion of safe memory model.

Bottom-line: it's very easy to confuse the exposure of JVM internals
with the endorsement of new Java construct. You might as well start the
rally against Unsafe.allocateMemory because it conflicts with safe
"garbage-collected" Java.


More information about the hotspot-compiler-dev mailing list