enhancement of cmpxchg and copy_to_survivor for ppc64

David Holmes david.holmes at oracle.com
Thu May 19 20:08:20 UTC 2016


Andrew,

Can you post this to the actual review thread for 8155949 please.

Thanks,
David

On 20/05/2016 1:04 AM, Andrew Haley wrote:
> There is one significant problem with this approach.
>
> Atomic::cmpxchg(jint) is defined like this in atomic.cpp:
>
>   unsigned Atomic::cmpxchg(unsigned int exchange_value,
>                            volatile unsigned int* dest, unsigned int compare_value,
>                            cmpxchg_memory_order order) {
>     assert(sizeof(unsigned int) == sizeof(jint), "more work to do");
>     return (unsigned int)Atomic::cmpxchg((jint)exchange_value, (volatile jint*)dest,
>                                          (jint)compare_value, order);
>   }
>
> Because this is in atomic.cpp, there is a *runtime* test on the memory
> order: the compiler can't constant propagate it.  If we're adding the
> cmpxchg_memory_order I think we should move Atomic::cmpxchg(jint) to
> atomic.inline.hpp.
>
> Andrew.
>


More information about the hotspot-runtime-dev mailing list