JEP 171: Fence Intrinsics

Kirk Pepperdine kirk at kodewerk.com
Thu Dec 13 23:19:12 PST 2012


How about sun.misc.CPU?

Regards,
Kirk

On 2012-12-03, at 7:25 PM, David Chase <david.r.chase at oracle.com> wrote:

> I'll defer to your judgement on the JMM issues, but from a user (programmer) POV, does this distinction make a difference?  I think their (in)ability to write "portable" code (across style checkers, across class loaders) would be a big deal.
> 
> How about "sun.misc.VM" instead?  Unsafe seems to be booby-trapped against use by non-system classloaders; I don't see how that is necessary here.
> 
> David
> 
> On 2012-12-03, at 12:54 PM, Doug Lea <dl at cs.oswego.edu> wrote:
> 
>> On 12/03/12 12:45, David Chase wrote:
>>> Is this the right place to comment on this? I think these should not go in
>>> Unsafe; fence intrinsics belong with compareAndSet in j.u.concurrent.atomic.
>> 
>> They cannot. The methods cannot be spec'ed using only the concepts
>> in the JLS/JMM. So they are not "Java methods", but "JVM methods".
>> (This is the same rationale for placing @Contended in sun.misc.)
>> Someday, a serious effort is needed to enable rigorous specs
>> of core intrinsics along these lines (possible even with a
>> Java-level JMM memory model overhaul). But I don't think anyone
>> wants to hold these methods hostage for years until this happens.
>> 
>> -Doug
>> 
>> 
>> 
> 



More information about the hotspot-dev mailing list