Single byte Atomic::cmpxchg implementation

Aleksey Shipilev aleksey.shipilev at oracle.com
Thu Sep 4 09:15:05 UTC 2014


Hi,

On 09/04/2014 01:05 PM, Erik Österlund wrote:
> 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?

Yes please, let's have look at this. Do you have a quantifiable
performance improvement with your change?

-Aleksey.



More information about the hotspot-dev mailing list