Compressed oops are copied bytewise on windows amd64.
David Holmes
david.holmes at oracle.com
Thu Oct 13 03:20:07 PDT 2011
Hi Axel,
On 13/10/2011 5:24 PM, Siebenborn, Axel wrote:
> on windows-amd64 the interpreter copies compressed oops using memmove.
>
> However, memmove is not thread safe and might copy bytewise.
>
> Another thread can see a partly copied compressed oop.
I'm not seeing the connection with compressed oops here.
> I added a small test, where a second java thread reads from the array,
> while the first copies.
>
> The second thread could also be the parallel marking of the CMS.
>
> I prepared the following webrev:
>
> http://www.sapjvm.com/as/webrevs/atomic_array_copy/
>
> The suggested fix replaces the memmove by a simple copy loop.
How is the copy loop any more "atomic" than the memmove ? I confess I'm
having trouble understanding what the "atomic" refers to in these functions.
That said I think win-x64 should do the same as linux-x64 and presently
they differ (perhaps a tool issue, I'm not sure)
David Holmes
------------
> If someone provides me a BugID, I’ll change the webrev accordingly and
> add the test.
>
> Regards,
>
> Axel
>
More information about the hotspot-runtime-dev
mailing list