On Mon, 9 May 2022 17:41:10 GMT, Maurizio Cimadamore <mcimadam...@openjdk.org> 
wrote:

>> This PR contains the API and implementation changes for JEP-424 [1]. A more 
>> detailed description of such changes, to avoid repetitions during the review 
>> process, is included as a separate comment.
>> 
>> [1] - https://openjdk.java.net/jeps/424
>
> Maurizio Cimadamore has updated the pull request incrementally with one 
> additional commit since the last revision:
> 
>   Fix crashes in heap segment benchmarks due to misaligned access

test/micro/org/openjdk/bench/java/lang/foreign/LoopOverPollutedSegments.java 
line 69:

> 67:     static final ValueLayout.OfInt JAVA_INT_UNALIGNED = 
> JAVA_INT.withBitAlignment(8);
> 68:     static final ValueLayout.OfFloat JAVA_FLOAT_UNALIGNED = 
> JAVA_FLOAT.withBitAlignment(8);
> 69:     static final VarHandle intHandleUnaligned = 
> JAVA_INT_UNALIGNED.arrayElementVarHandle();

To match `LoopOverNonConstantHeap`, this should probably be named 
`VH_INT_UNALIGNED`.

--------------------------------------------------------------------------------

Maybe these could also be moved into 
`org.openjdk.bench.java.lang.foreign.Utils`[^1]

[^1]: 
https://github.com/openjdk/jdk/blob/7b774297b1d04e104a988ea5bd2f2b04c8de3461/test/micro/org/openjdk/bench/java/lang/foreign/Utils.java#L29-L43

-------------

PR: https://git.openjdk.java.net/jdk/pull/7888

Reply via email to