On Sparc you apparently emit the appropriate memory barrier or "fence"
instructions to prevent the processor from reordering load and store
operations. On IA32, however, I think your memory barriers are way too
heavy. You can get away with much cheaper memory barriers. You are
basically making the volatile keyword a _very_ expensive construct with
Hotspot (it is still pretty expensive but it shouldn't be that expensive).
Give me a week or two and I can send you a micro-benchmark where I think I can
explain what I mean.
instructions to prevent the processor from reordering load and store
operations. On IA32, however, I think your memory barriers are way too
heavy. You can get away with much cheaper memory barriers. You are
basically making the volatile keyword a _very_ expensive construct with
Hotspot (it is still pretty expensive but it shouldn't be that expensive).
Give me a week or two and I can send you a micro-benchmark where I think I can
explain what I mean.
- duplicates
-
JDK-4904703 Need support for JSR-166 in VM
-
- Resolved
-