RFR: 8186838: Generalize Atomic::inc/dec with templates
Andrew Haley
aph at redhat.com
Mon Sep 4 10:41:38 UTC 2017
On 04/09/17 11:26, Erik Österlund wrote:
> 1) I want evidence for this claim. Can you get leading and trailing dmb
> sy (rather than dmb ish) for atomic operations on ARMv7?
I hope not. There is no reason for us to want such a thing in HotSpot.
But even if we did want such a thing, we could crop down to asm: the
point is the usual cases, not weird corner cases.
> 2) Even if you could and the compiler happens to generate that - we can
> not rely on it because there is no contract to the compiler what fence
> instructions it elects to use. The only contract the compiler needs to
> abide to is how atomic C++ operations interact with other C++
> operations. And we do not want the underlying fencing to silently change
> when performing compiler upgrades.
There is no way that GCC writers would break ABI compatibility in such a
fundamental way. There would be a firestorm. I know this because even
if no-one else started the fire, I would. I am a GCC author.
--
Andrew Haley
Java Platform Lead Engineer
Red Hat UK Ltd. <https://www.redhat.com>
EAC8 43EB D3EF DB98 CC77 2FAD A5CD 6035 332F A671
More information about the hotspot-dev
mailing list