RFR: 8282191: Implementation of Foreign Function & Memory API (Preview) [v43]

Maurizio Cimadamore mcimadamore at openjdk.java.net
Mon May 9 20:30:09 UTC 2022


On Mon, 9 May 2022 18:09:51 GMT, ExE Boss <duke at openjdk.java.net> wrote:

>> 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

I noted other possible cleanups for benchmarks, I'll work on something after we integrate this PR as I'd like to minimize the churn.

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

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



More information about the build-dev mailing list