RFR 8151163 All Buffer implementations should leverage Unsafe unaligned accessors <was> Re: ByteBuffer views, alignment, word tearing
Paul Sandoz
paul.sandoz at oracle.com
Wed Jul 13 08:57:49 UTC 2016
> On 12 Jul 2016, at 19:33, Andrew Haley <aph at redhat.com> wrote:
>
> Hi,
>
> On 12/07/16 14:43, Paul Sandoz wrote:
>
>> Would you mind formally reviewing the patches?
>>
>> Including hotspot-dev as i have updated a hotspot test so should
>> probably push to hs.
>>
>> I rebased to hs and fixed a silly bug in generated heap view buffers
>> that were incorrectly calculating the unsafe byte offset:
>>
>> http://cr.openjdk.java.net/~psandoz/jdk9/JDK-8151163-buffer-unsafe-unaligned-access/webrev/ <http://cr.openjdk.java.net/~psandoz/jdk9/JDK-8151163-buffer-unsafe-unaligned-access/webrev/>
>>
>> http://cr.openjdk.java.net/~psandoz/jdk9/JDK-8151163-buffer-unsafe-unaligned-access-hotspot/webrev/ <http://cr.openjdk.java.net/~psandoz/jdk9/JDK-8151163-buffer-unsafe-unaligned-access-hotspot/webrev/>
>>
>> JPRT runs for core and hotspot pass.
>
> These are fine. I checked that the word-tearing problems were fixed
> too, and the generated code looks good.
>
Thanks for reviewing and checking.
It occurred to me that we don’t actually mention the atomicity properties of the ByteBuffer implementations when accessing binary data directly or via the views. We probably should using @implNote, but as another issue.
Paul.
More information about the hotspot-dev
mailing list