Single byte Atomic::cmpxchg implementation
erik.osterlund at lnu.se
Thu Sep 4 09:05:13 UTC 2014
The implementation of single byte Atomic::cmpxchg on x86 (and all other platforms) emulates the single byte cmpxchgb instruction using a loop of jint-sized load and cmpxchgl and code to dynamically align the destination address.
This code is used for GC-code related to remembered sets currently.
I have the changes on my platform (amd64, bsd) to simply use the native cmpxchgb instead but could provide a patch fixing this unnecessary performance glitch for all supported x86 if anybody wants this?
More information about the hotspot-dev