Request for review (S): 7100935: win32: memmove is not atomic but is used for pd_conjoint_*_atomic operations

David Holmes david.holmes at
Wed Oct 19 00:46:21 PDT 2011

On 19/10/2011 4:47 PM, David Holmes wrote:
> Hi Axel,
> On 18/10/2011 11:15 PM, Siebenborn, Axel wrote:
>> 7100935: win32: memmove is not atomic but is used for
>> pd_conjoint_*_atomic.
>> The fix is to replace the call to memmove by a simple copy loop.
>> I made the fix for windows_x86_64 and for sparc.
> x86_32 is fixed too :)
>> I added the tests for copying oops and the copy of short arrays of
>> Volker.
>> I did not use the template of my original change.
>> However, win compiler would inline the template and so does gcc. It's
>> strange, that Sun's compiler doesn't.
> The code changes look okay to me too.

But can you update the copyright year from 2010 to 2011 - thanks.

> I have a slight issue with the tests. Both tests are set to run with
> -Xint, but for windows this impacts compiled code as well (as far as I
> can see on Windows C1/C2 do not intrinsify these operations and so use
> the runtime pd_conjoint_*_atomic functions). Not quite sure how to
> handle this - I'll look into and get back to you.

We can request that the test be run twice eg:

  @run main/othervm -Xint TestConjointAtomicArraycopy
  @run main/othervm -Xcomp TestConjointAtomicArraycopy

-Xcomp will use the default compiler for the platform (client or server 
based on ergonomics) but request that all code get compiled on first 
use. That will guarantee we test the compiled version of the code.


> Thanks,
> David

More information about the hotspot-runtime-dev mailing list