JEP 171: Fence Intrinsics
Doug Lea
dl at cs.oswego.edu
Sun Dec 16 15:21:47 PST 2012
On 12/14/12 02:17, Kirk Pepperdine wrote:
> Hi Doug et all...
>
> I've been thinking about these intrinsics/annotations and I've been wondering
> if it would be worth exploring somehow setting up intrinsics to allow access
> to the MSRs? With better access to MSR, people might have a better chance of
> using measures to sort out strange effects due to unfortunately alignments of
> data in caches.
I think the main challenge here would be to find some reasonable
light abstraction over MSR-like stuff on all the processors Java
runs on (x86, arm, sparc, power etc) that doesn't lose big by
abstracting away. It took years to figure out JMM
rules that support efficient processor mappings (for
those usages covered by the JMM, which were not enough).
Offhand, this doesn't seem very likely. But it probably
isn't what you want anyway....
>
> But given that all that is really needed is a
> thin C++ wrapper over a small amount of assembler, it would be so much easier
> to support this either in the JVMTI or in s.m.u.
Here's a plan: Allow C++ code to be embedded in Java code.
Then allow asm to be embedded in the C++ code. Done. :-)
-Doug
More information about the hotspot-dev
mailing list