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

2022-05-09 Thread Maurizio Cimadamore
On Mon, 9 May 2022 18:09:51 GMT, ExE Boss  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


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

2022-05-09 Thread ExE Boss
On Mon, 9 May 2022 17:41:10 GMT, Maurizio Cimadamore  
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


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

2022-05-09 Thread Maurizio Cimadamore
> 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

-

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/7888/files
  - new: https://git.openjdk.java.net/jdk/pull/7888/files/3c88a2ef..7b774297

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk=7888=42
 - incr: https://webrevs.openjdk.java.net/?repo=jdk=7888=41-42

  Stats: 41 lines in 2 files changed: 3 ins; 4 del; 34 mod
  Patch: https://git.openjdk.java.net/jdk/pull/7888.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/7888/head:pull/7888

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