Withdrawn: 8317819: Scope should reflect lifetime of underying resource (mainline)

2023-10-13 Thread Jorn Vernee
On Tue, 10 Oct 2023 17:17:00 GMT, Jorn Vernee wrote: > Port of: https://github.com/openjdk/panama-foreign/pull/898 > > Original PR body: > >> >> This patch addresses some issues with `MemorySegment.Scope::equals`. More >> specifically, when two segments are crea

Re: RFR: 8317545: AIX PPC64: Implementation of Foreign Function & Memory API [v2]

2023-10-13 Thread Jorn Vernee
On Fri, 13 Oct 2023 13:02:24 GMT, Jorn Vernee wrote: >> Not sure how `jdouble` would be used. JNI doesn't support C structures and >> the double alignment is only an issue in structures. Do we support embedding >> `jdouble` in structures? I guess changing it would prob

Re: RFR: 8317545: AIX PPC64: Implementation of Foreign Function & Memory API [v2]

2023-10-13 Thread Jorn Vernee
On Fri, 13 Oct 2023 12:34:53 GMT, Martin Doerr wrote: > I guess changing it would probably be better? Yeah, I think so. > Note that we will need something which maps to the 8-Byte aligned double. > Otherwise we get an Exception when passing a JAVA_DOUBLE as normal argument. Okay, so it sounds

Re: RFR: 8317837: Leftover FFM implementation-only changes

2023-10-13 Thread Jorn Vernee
On Tue, 10 Oct 2023 21:41:01 GMT, Jorn Vernee wrote: > Port of miscellaneous leftover implementation-only changes from the > panama-foreign repo: > > These four related to improving the performance of the internal `strlen` > implementation: > > - https://github.com/o

Re: RFR: 8317837: Leftover FFM implementation-only changes [v2]

2023-10-13 Thread Jorn Vernee
gt; - https://github.com/openjdk/panama-foreign/pull/890 (note that this is a > javadoc block in the implementation only) > - https://github.com/openjdk/panama-foreign/pull/908 > - https://github.com/openjdk/panama-foreign/pull/910 > > Testing: `jdk_foreign` Jorn Vernee h

Re: RFR: 8317545: AIX PPC64: Implementation of Foreign Function & Memory API

2023-10-13 Thread Jorn Vernee
On Fri, 13 Oct 2023 10:12:24 GMT, Martin Doerr wrote: > The AIX linker has a few minor diffs to the linux ABIv1 linker. In addition, > double values have only 4 Byte alignment. This PR is based on JDK22 version > of the FFI. src/java.base/share/classes/jdk/internal/foreign/abi/ppc64/aix/AixPPC

RFR: 8318072: DonwcallLinker does not acquire/release segments in interpreter

2023-10-13 Thread Jorn Vernee
Implement missing by-reference argument acquire/release functionality in DowncallLinker::invokeInterpBindings. I've also simplified the related code a bit: - `retIndexMap` was not used. I've removed it - `BindingInterpreter.StoreFunc::store`'s type argument was not used. Removed - UpcallLinker wa

RFR: 8317837: Leftover FFM implementation-only changes

2023-10-12 Thread Jorn Vernee
Port of miscellaneous leftover implementation-only changes from the panama-foreign repo: These four related to improving the performance of the internal `strlen` implementation: - https://github.com/openjdk/panama-foreign/pull/862 - https://github.com/openjdk/panama-foreign/pull/860 - htt

Re: RFR: 8317819: Scope should reflect lifetime of underying resource (mainline) [v2]

2023-10-12 Thread Jorn Vernee
gments originated outside Java code is not very >> interesting - if users really care about lifetime of such segments they >> should override the scope with `MemorySegment::reinterpret`. This leads to >> some changes in the javadoc of other methods where I replaced `fresh scope

RFR: 8317824: Beef up javadoc for base offset in var handles derived from layouts (mainline)

2023-10-12 Thread Jorn Vernee
Port of: https://github.com/openjdk/panama-foreign/pull/901 Original PR body: > This PR adds more javadoc to explain how base offsets in var handles obtained > from layouts can be used. > > First, a number of examples in the main `MemoryLayout` javadoc is rectified, > as such examples did not

RFR: 8317819: Scope should reflect lifetime of underying resource (mainline)

2023-10-12 Thread Jorn Vernee
Port of: https://github.com/openjdk/panama-foreign/pull/898 Original PR body: > > This patch addresses some issues with `MemorySegment.Scope::equals`. More > specifically, when two segments are created from the same array/buffer, their > underlying scope should be equal, but currently it is no

Re: RFR: 8317819: Scope should reflect lifetime of underying resource (mainline)

2023-10-12 Thread Jorn Vernee
On Tue, 10 Oct 2023 17:17:00 GMT, Jorn Vernee wrote: > Port of: https://github.com/openjdk/panama-foreign/pull/898 > > Original PR body: > >> >> This patch addresses some issues with `MemorySegment.Scope::equals`. More >> specifically, when two segments are crea

Integrated: 8312522: Implementation of Foreign Function & Memory API

2023-10-12 Thread Jorn Vernee
On Tue, 1 Aug 2023 10:29:06 GMT, Jorn Vernee wrote: > This patch contains the implementation of the foreign linker & memory API JEP > for Java 22. The initial patch is composed of commits brought over directly > from the [panama-foreign repo](https://github.com/openjdk/panama-for

Re: RFR: 8312522: Implementation of Foreign Function & Memory API [v36]

2023-10-10 Thread Jorn Vernee
ama-foreign/pull/849 Several test fixes to > make sure the `jdk_foreign` tests can pass on 32-bit machines, taking > linux-x86 as a test bed. > 9. https://github.com/openjdk/panama-foreign/pull/850 Make the linker API > required. The `Linker::nativeLinker` method is not longer al

Re: RFR: 8312522: Implementation of Foreign Function & Memory API [v35]

2023-10-10 Thread Jorn Vernee
ama-foreign/pull/849 Several test fixes to > make sure the `jdk_foreign` tests can pass on 32-bit machines, taking > linux-x86 as a test bed. > 9. https://github.com/openjdk/panama-foreign/pull/850 Make the linker API > required. The `Linker::nativeLinker` method is not longer al

Re: RFR: 8312522: Implementation of Foreign Function & Memory API [v34]

2023-10-06 Thread Jorn Vernee
ama-foreign/pull/849 Several test fixes to > make sure the `jdk_foreign` tests can pass on 32-bit machines, taking > linux-x86 as a test bed. > 9. https://github.com/openjdk/panama-foreign/pull/850 Make the linker API > required. The `Linker::nativeLinker` method is not longer allo

Re: RFR: 8312522: Implementation of Foreign Function & Memory API [v33]

2023-10-06 Thread Jorn Vernee
On Mon, 2 Oct 2023 16:07:09 GMT, Jorn Vernee wrote: >> This patch contains the implementation of the foreign linker & memory API >> JEP for Java 22. The initial patch is composed of commits brought over >> directly from the [panama-foreign >> repo](https://githu

Re: RFR: 8312522: Implementation of Foreign Function & Memory API [v33]

2023-10-02 Thread Jorn Vernee
ama-foreign/pull/849 Several test fixes to > make sure the `jdk_foreign` tests can pass on 32-bit machines, taking > linux-x86 as a test bed. > 9. https://github.com/openjdk/panama-foreign/pull/850 Make the linker API > required. The `Linker::nativeLinker` method is not longer al

Re: RFR: 8312522: Implementation of Foreign Function & Memory API [v32]

2023-09-30 Thread Jorn Vernee
On Thu, 28 Sep 2023 13:33:32 GMT, Jorn Vernee wrote: >> This patch contains the implementation of the foreign linker & memory API >> JEP for Java 22. The initial patch is composed of commits brought over >> directly from the [panama-foreign >> repo](https://githu

Re: RFR: 8312522: Implementation of Foreign Function & Memory API [v32]

2023-09-28 Thread Jorn Vernee
ama-foreign/pull/849 Several test fixes to > make sure the `jdk_foreign` tests can pass on 32-bit machines, taking > linux-x86 as a test bed. > 9. https://github.com/openjdk/panama-foreign/pull/850 Make the linker API > required. The `Linker::nativeLinker` method is not longer al

Re: RFR: 8312522: Implementation of Foreign Function & Memory API [v31]

2023-09-28 Thread Jorn Vernee
ama-foreign/pull/849 Several test fixes to > make sure the `jdk_foreign` tests can pass on 32-bit machines, taking > linux-x86 as a test bed. > 9. https://github.com/openjdk/panama-foreign/pull/850 Make the linker API > required. The `Linker::nativeLinker` method is not longer allo

Re: RFR: 8316970: Add internal annotation to mark restricted methods [v2]

2023-09-27 Thread Jorn Vernee
On Wed, 27 Sep 2023 17:23:48 GMT, Maurizio Cimadamore wrote: >> This patch adds a new internal annotation that is used to mark all >> restricted me >> thods in the FFM API. The new annotation is similar to the one we used for >> preview API methods. >> >> We plan to use the new annotation for

Re: RFR: 8312522: Implementation of Foreign Function & Memory API [v28]

2023-09-27 Thread Jorn Vernee
On Wed, 27 Sep 2023 14:52:52 GMT, Jorn Vernee wrote: >> test/hotspot/jtreg/compiler/rangechecks/TestRangeCheckHoistingScaledIV.java >> line 32: >> >>> 30: * @modules jdk.incubator.vector >>> 31: * @compile -source ${jdk.version} TestRangeCheckHoisti

Re: RFR: 8312522: Implementation of Foreign Function & Memory API [v30]

2023-09-27 Thread Jorn Vernee
ama-foreign/pull/849 Several test fixes to > make sure the `jdk_foreign` tests can pass on 32-bit machines, taking > linux-x86 as a test bed. > 9. https://github.com/openjdk/panama-foreign/pull/850 Make the linker API > required. The `Linker::nativeLinker` method is not longer al

Re: RFR: 8312522: Implementation of Foreign Function & Memory API [v29]

2023-09-27 Thread Jorn Vernee
ama-foreign/pull/849 Several test fixes to > make sure the `jdk_foreign` tests can pass on 32-bit machines, taking > linux-x86 as a test bed. > 9. https://github.com/openjdk/panama-foreign/pull/850 Make the linker API > required. The `Linker::nativeLinker` method is not longer all

Re: RFR: 8312522: Implementation of Foreign Function & Memory API [v28]

2023-09-27 Thread Jorn Vernee
On Wed, 27 Sep 2023 15:04:12 GMT, Alan Bateman wrote: >> Jorn Vernee has updated the pull request incrementally with two additional >> commits since the last revision: >> >> - Fix visibility issues >> >>Reviewed-by: mcimadamore >> - Revie

Re: RFR: 8312522: Implementation of Foreign Function & Memory API [v28]

2023-09-27 Thread Jorn Vernee
On Wed, 27 Sep 2023 14:50:32 GMT, Alan Bateman wrote: >> Jorn Vernee has updated the pull request incrementally with two additional >> commits since the last revision: >> >> - Fix visibility issues >> >>Reviewed-by: mcimadamore >> - Revie

Re: RFR: 8312522: Implementation of Foreign Function & Memory API [v28]

2023-09-26 Thread Jorn Vernee
ama-foreign/pull/849 Several test fixes to > make sure the `jdk_foreign` tests can pass on 32-bit machines, taking > linux-x86 as a test bed. > 9. https://github.com/openjdk/panama-foreign/pull/850 Make the linker API > required. The `Linker::nativeLinker` method is not longer all

Re: RFR: 8312522: Implementation of Foreign Function & Memory API [v27]

2023-09-26 Thread Jorn Vernee
On Tue, 26 Sep 2023 18:44:01 GMT, Paul Sandoz wrote: >> Jorn Vernee has updated the pull request incrementally with one additional >> commit since the last revision: >> >> fix typos > > src/java.base/share/classes/java/lang/Module.java line 328: > >>

Re: RFR: 8312522: Implementation of Foreign Function & Memory API [v27]

2023-09-26 Thread Jorn Vernee
On Tue, 26 Sep 2023 21:59:35 GMT, Paul Sandoz wrote: > In the implementation the functional interfaces > `BindingInterpreter.StoreFunc/LoadFunc` are package private, but are used in > internal public signatures. This was previously like this and it's not a big > deal but i recommend making tho

Re: RFR: 8312522: Implementation of Foreign Function & Memory API [v27]

2023-09-26 Thread Jorn Vernee
On Tue, 26 Sep 2023 21:28:43 GMT, Paul Sandoz wrote: >> Jorn Vernee has updated the pull request incrementally with one additional >> commit since the last revision: >> >> fix typos > > src/java.base/share/classes/java/lang/foreign/Linker.java lin

Re: RFR: 8312522: Implementation of Foreign Function & Memory API [v27]

2023-09-25 Thread Jorn Vernee
ama-foreign/pull/849 Several test fixes to > make sure the `jdk_foreign` tests can pass on 32-bit machines, taking > linux-x86 as a test bed. > 9. https://github.com/openjdk/panama-foreign/pull/850 Make the linker API > required. The `Linker::nativeLinker` method is not longer al

Re: RFR: 8312522: Implementation of Foreign Function & Memory API [v26]

2023-09-25 Thread Jorn Vernee
ama-foreign/pull/849 Several test fixes to > make sure the `jdk_foreign` tests can pass on 32-bit machines, taking > linux-x86 as a test bed. > 9. https://github.com/openjdk/panama-foreign/pull/850 Make the linker API > required. The `Linker::nativeLinker` method is not longer al

Re: RFR: 8312522: Implementation of Foreign Function & Memory API [v22]

2023-09-25 Thread Jorn Vernee
On Fri, 22 Sep 2023 16:58:05 GMT, Maurizio Cimadamore wrote: >> Here you go: >> https://cr.openjdk.org/~jvernee/FFM_22_PR_v1/java.base/java/lang/foreign/SegmentAllocator.html#allocateFrom(java.lang.foreign.ValueLayout,java.lang.foreign.MemorySegment,java.lang.foreign.ValueLayout,long,long) > >

Re: RFR: 8312522: Implementation of Foreign Function & Memory API [v25]

2023-09-25 Thread Jorn Vernee
ama-foreign/pull/849 Several test fixes to > make sure the `jdk_foreign` tests can pass on 32-bit machines, taking > linux-x86 as a test bed. > 9. https://github.com/openjdk/panama-foreign/pull/850 Make the linker API > required. The `Linker::nativeLinker` method is not longer al

Re: RFR: 8312522: Implementation of Foreign Function & Memory API [v22]

2023-09-22 Thread Jorn Vernee
On Fri, 22 Sep 2023 13:41:50 GMT, Maurizio Cimadamore wrote: >> Jorn Vernee has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Avoid eager use of LibFallback in FallbackLinker static block > > src/java.base/s

Re: RFR: 8312522: Implementation of Foreign Function & Memory API [v24]

2023-09-22 Thread Jorn Vernee
ama-foreign/pull/849 Several test fixes to > make sure the `jdk_foreign` tests can pass on 32-bit machines, taking > linux-x86 as a test bed. > 9. https://github.com/openjdk/panama-foreign/pull/850 Make the linker API > required. The `Linker::nativeLinker` method is not longer al

Re: RFR: 8312522: Implementation of Foreign Function & Memory API [v22]

2023-09-22 Thread Jorn Vernee
On Fri, 22 Sep 2023 15:19:35 GMT, Maurizio Cimadamore wrote: >> I don't mind changing it back to the old style, but I think the style should >> be consistent for all the allocateFrom overloads? So, I'd have to change all >> of them back. > > I forgot about the change that went into mainline. D

Re: RFR: 8312522: Implementation of Foreign Function & Memory API [v23]

2023-09-22 Thread Jorn Vernee
On Fri, 22 Sep 2023 15:26:45 GMT, Chen Liang wrote: > Just curious, for `Enable-Native-Access`, if it's present on an automatic > module `Automatic-Module-Name` jar, can it apply to only that automatic > module instead of all unnamed modules? No. It's only there for executable jars (run using

Re: RFR: 8312522: Implementation of Foreign Function & Memory API [v23]

2023-09-22 Thread Jorn Vernee
ama-foreign/pull/849 Several test fixes to > make sure the `jdk_foreign` tests can pass on 32-bit machines, taking > linux-x86 as a test bed. > 9. https://github.com/openjdk/panama-foreign/pull/850 Make the linker API > required. The `Linker::nativeLinker` method is not longer allo

Re: RFR: 8312522: Implementation of Foreign Function & Memory API [v22]

2023-09-22 Thread Jorn Vernee
On Mon, 18 Sep 2023 14:17:30 GMT, Jorn Vernee wrote: >> This patch contains the implementation of the foreign linker & memory API >> JEP for Java 22. The initial patch is composed of commits brought over >> directly from the [panama-foreign >> repo](https://githu

Re: RFR: 8312522: Implementation of Foreign Function & Memory API [v22]

2023-09-22 Thread Jorn Vernee
On Fri, 22 Sep 2023 13:39:00 GMT, Maurizio Cimadamore wrote: >> Jorn Vernee has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Avoid eager use of LibFallback in FallbackLinker static block > > src/java.base/s

Re: RFR: 8312522: Implementation of Foreign Function & Memory API [v22]

2023-09-22 Thread Jorn Vernee
On Fri, 22 Sep 2023 14:29:35 GMT, Maurizio Cimadamore wrote: >> Jorn Vernee has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Avoid eager use of LibFallback in FallbackLinker static block > > test/mic

Re: RFR: 8312522: Implementation of Foreign Function & Memory API [v22]

2023-09-22 Thread Jorn Vernee
On Fri, 22 Sep 2023 14:10:58 GMT, Maurizio Cimadamore wrote: >> Also, in the panama repo I see this: >> >> Allocates a memory segment with the given layout and initializes it with the >> bytes in the provided source memory segment. >> >> Which seems more correct - e.g. more consistent with ot

Re: RFR: 8312522: Implementation of Foreign Function & Memory API [v22]

2023-09-22 Thread Jorn Vernee
On Fri, 22 Sep 2023 14:31:30 GMT, Jorn Vernee wrote: >> This was changed in the main line repo as a result of: >> https://github.com/openjdk/jdk/pull/14997 Since all the other methods were >> using `{@return ...}` I changed this new overload to that style as well. > >

Re: RFR: 8312522: Implementation of Foreign Function & Memory API [v22]

2023-09-22 Thread Jorn Vernee
On Fri, 22 Sep 2023 14:31:08 GMT, Jorn Vernee wrote: >> Panama repo change: >> https://github.com/openjdk/panama-foreign/commit/06e2017883c939188103c4dd53185417a00b2921 >> >> But, this code was altered in a follow up merge - maybe the merge was >> problematic? &g

Re: RFR: 8316641: VarHandle template classes can share code in the base class [v2]

2023-09-21 Thread Jorn Vernee
On Thu, 21 Sep 2023 08:50:00 GMT, Chen Liang wrote: >> VarHandle implementations have many static fields and methods that can be >> pulled to the common superclass to avoid repeated initialization and code >> duplication. >> >> In addition, the Unsafe-based Buffer field access are replaced by

Re: RFR: 8316421: libjava should load shell32.dll eagerly [v3]

2023-09-21 Thread Jorn Vernee
On Thu, 21 Sep 2023 06:08:27 GMT, Daniel Jeliński wrote: >> Please review this patch that makes java.dll load shell32.dll earlier. >> Delay-loading requires some additional code (delayimp.lib), and offers no >> benefits since we always load shell32 during JVM startup. >> >> Other than removing

Re: RFR: 8316421: libjava should load shell32.dll eagerly [v2]

2023-09-20 Thread Jorn Vernee
On Wed, 20 Sep 2023 14:41:59 GMT, Jorn Vernee wrote: >> Daniel Jeliński has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Remove unused define > > src/java.base/windows/native/libjava/java_props_md.c line 2

Re: RFR: 8316421: libjava should load shell32.dll eagerly [v2]

2023-09-20 Thread Jorn Vernee
On Mon, 18 Sep 2023 18:10:12 GMT, Daniel Jeliński wrote: >> Please review this patch that makes java.dll load shell32.dll earlier. >> Delay-loading requires some additional code (delayimp.lib), and offers no >> benefits since we always load shell32 during JVM startup. >> >> Other than removing

Re: RFR: 8316421: libjava should load shell32.dll eagerly

2023-09-18 Thread Jorn Vernee
On Mon, 18 Sep 2023 18:05:19 GMT, Daniel Jeliński wrote: > Hmm, indeed `VER_PLATFORM_WIN32_WINDOWS` was not used... Removed now. Was > that the `define` you were referring to? Err, sorry, I was talking about the `_WIN32_NT` define, but that was actually already removed in https://github.com/o

Re: RFR: 8316421: libjava should load shell32.dll eagerly

2023-09-18 Thread Jorn Vernee
On Mon, 18 Sep 2023 16:05:37 GMT, Daniel Jeliński wrote: > based on the above, I believe we can ignore WinXP compatibility here. I tend to agree. > During compilation we enable APIs from Win8: This is interesting. I think that means the `define` at the start of src/java.base/windows/native/li

Re: RFR: 8316421: libjava should load shell32.dll eagerly

2023-09-18 Thread Jorn Vernee
On Mon, 18 Sep 2023 14:44:13 GMT, Daniel Jeliński wrote: > Please review this patch that makes java.dll load shell32.dll earlier. > Delay-loading requires some additional code (delayimp.lib), and offers no > benefits since we always load shell32 during JVM startup. > > Other than removing the

Re: RFR: 8312522: Implementation of Foreign Function & Memory API [v22]

2023-09-18 Thread Jorn Vernee
ama-foreign/pull/849 Several test fixes to > make sure the `jdk_foreign` tests can pass on 32-bit machines, taking > linux-x86 as a test bed. > 9. https://github.com/openjdk/panama-foreign/pull/850 Make the linker API > required. The `Linker::nativeLinker` method is not longer al

Re: RFR: 8312522: Implementation of Foreign Function & Memory API [v21]

2023-09-18 Thread Jorn Vernee
On Wed, 13 Sep 2023 19:43:53 GMT, ExE Boss wrote: >> Jorn Vernee has updated the pull request incrementally with two additional >> commits since the last revision: >> >> - add missing space + reflow lines >> - Fix typo >> >>

Re: RFR: 8316196: VarHandleSegmentViewBase::newIllegalArg... to use hexadecimal form [v2]

2023-09-15 Thread Jorn Vernee
On Fri, 15 Sep 2023 06:06:18 GMT, Per Minborg wrote: >> This PR proposes to use hexadecimal formatting for raw addresses in >> `VarHandleSegmentViewBase`. > > Per Minborg has updated the pull request with a new target base due to a > merge or a rebase. The incremental webrev excludes the unrela

Re: RFR: 8312522: Implementation of Foreign Function & Memory API [v21]

2023-09-12 Thread Jorn Vernee
ama-foreign/pull/849 Several test fixes to > make sure the `jdk_foreign` tests can pass on 32-bit machines, taking > linux-x86 as a test bed. > 9. https://github.com/openjdk/panama-foreign/pull/850 Make the linker API > required. The `Linker::nativeLinker` method is not longer all

Re: RFR: 8312522: Implementation of Foreign Function & Memory API [v20]

2023-09-11 Thread Jorn Vernee
ama-foreign/pull/849 Several test fixes to > make sure the `jdk_foreign` tests can pass on 32-bit machines, taking > linux-x86 as a test bed. > 9. https://github.com/openjdk/panama-foreign/pull/850 Make the linker API > required. The `Linker::nativeLinker` method is not longer allo

Re: RFR: 8312522: Implementation of Foreign Function & Memory API [v16]

2023-09-08 Thread Jorn Vernee
On Fri, 8 Sep 2023 11:20:39 GMT, ExE Boss wrote: >> Jorn Vernee has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Add support for sliced allocation > > src/java.base/share/classes/jdk/internal/foreign/Native

Re: RFR: 8312522: Implementation of Foreign Function & Memory API [v19]

2023-09-08 Thread Jorn Vernee
ama-foreign/pull/849 Several test fixes to > make sure the `jdk_foreign` tests can pass on 32-bit machines, taking > linux-x86 as a test bed. > 9. https://github.com/openjdk/panama-foreign/pull/850 Make the linker API > required. The `Linker::nativeLinker` method is not longer allo

Re: RFR: 8315891: java/foreign/TestLinker.java failed with "error occurred while instantiating class TestLinker: null" [v2]

2023-09-08 Thread Jorn Vernee
On Fri, 8 Sep 2023 10:52:06 GMT, Maurizio Cimadamore wrote: >> This PR adds a privileged block surrounding the request to load the fallback >> linker library in LibFallback. >> The lack of this block is causing test failures when platforms using the >> fallback linker are tested using a securi

Re: RFR: 8315891: java/foreign/TestLinker.java failed with "error occurred while instantiating class TestLinker: null"

2023-09-08 Thread Jorn Vernee
On Fri, 8 Sep 2023 10:19:05 GMT, Maurizio Cimadamore wrote: > This PR adds a privileged block surrounding the request to load the fallback > linker library in LibFallback. > The lack of this block is causing test failures when platforms using the > fallback linker are tested using a security m

Re: RFR: 8312522: Implementation of Foreign Function & Memory API [v18]

2023-09-07 Thread Jorn Vernee
ama-foreign/pull/849 Several test fixes to > make sure the `jdk_foreign` tests can pass on 32-bit machines, taking > linux-x86 as a test bed. > 9. https://github.com/openjdk/panama-foreign/pull/850 Make the linker API > required. The `Linker::nativeLinker` method is not longer al

Re: RFR: 8312522: Implementation of Foreign Function & Memory API [v17]

2023-09-07 Thread Jorn Vernee
ama-foreign/pull/849 Several test fixes to > make sure the `jdk_foreign` tests can pass on 32-bit machines, taking > linux-x86 as a test bed. > 9. https://github.com/openjdk/panama-foreign/pull/850 Make the linker API > required. The `Linker::nativeLinker` method is not longer al

Re: RFR: 8312522: Implementation of Foreign Function & Memory API [v16]

2023-09-07 Thread Jorn Vernee
ama-foreign/pull/849 Several test fixes to > make sure the `jdk_foreign` tests can pass on 32-bit machines, taking > linux-x86 as a test bed. > 9. https://github.com/openjdk/panama-foreign/pull/850 Make the linker API > required. The `Linker::nativeLinker` method is not longer al

Re: RFR: 8312522: Implementation of Foreign Function & Memory API [v15]

2023-09-07 Thread Jorn Vernee
On Thu, 7 Sep 2023 11:39:30 GMT, Jorn Vernee wrote: >> This patch contains the implementation of the foreign linker & memory API >> JEP for Java 22. The initial patch is composed of commits brought over >> directly from the [panama-foreign >> repo](https://githu

Re: RFR: 8314260: Unable to load system libraries on Windows when using a SecurityManager [v4]

2023-09-07 Thread Jorn Vernee
On Thu, 7 Sep 2023 07:46:03 GMT, Per Minborg wrote: >> This PR proposes to read the system environment variable "SystemRoot" using >> a privileged operation so it will work in the event a default >> SecurityManager is in place. >> >> As the `SecurityManager` is deprecated for removal, no suppo

Re: RFR: 8312522: Implementation of Foreign Function & Memory API [v10]

2023-09-07 Thread Jorn Vernee
On Wed, 6 Sep 2023 16:03:40 GMT, Paul Sandoz wrote: >> [This SO question](https://stackoverflow.com/a/40348010) points to a gitlab >> repo that seems to have the latest version: >> https://gitlab.com/x86-psABIs/x86-64-ABI But, I'm not sure how stable that >> is, or if that's an authoritative s

Re: RFR: 8312522: Implementation of Foreign Function & Memory API [v15]

2023-09-07 Thread Jorn Vernee
ama-foreign/pull/849 Several test fixes to > make sure the `jdk_foreign` tests can pass on 32-bit machines, taking > linux-x86 as a test bed. > 9. https://github.com/openjdk/panama-foreign/pull/850 Make the linker API > required. The `Linker::nativeLinker` method is not longer all

Re: RFR: 8312522: Implementation of Foreign Function & Memory API [v14]

2023-09-06 Thread Jorn Vernee
ama-foreign/pull/849 Several test fixes to > make sure the `jdk_foreign` tests can pass on 32-bit machines, taking > linux-x86 as a test bed. > 9. https://github.com/openjdk/panama-foreign/pull/850 Make the linker API > required. The `Linker::nativeLinker` method is not longer al

Re: RFR: 8312522: Implementation of Foreign Function & Memory API [v13]

2023-09-06 Thread Jorn Vernee
ama-foreign/pull/849 Several test fixes to > make sure the `jdk_foreign` tests can pass on 32-bit machines, taking > linux-x86 as a test bed. > 9. https://github.com/openjdk/panama-foreign/pull/850 Make the linker API > required. The `Linker::nativeLinker` method is not longer allo

Re: RFR: 8312522: Implementation of Foreign Function & Memory API [v10]

2023-09-06 Thread Jorn Vernee
On Tue, 5 Sep 2023 21:01:00 GMT, Paul Sandoz wrote: >> Jorn Vernee has updated the pull request incrementally with five additional >> commits since the last revision: >> >> - 8315096: Allowed access modes in memory segment should depend on layout >> alig

Re: RFR: 8312522: Implementation of Foreign Function & Memory API [v11]

2023-09-06 Thread Jorn Vernee
On Wed, 6 Sep 2023 10:46:33 GMT, Martin Doerr wrote: >> Jorn Vernee has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Fix typo in doc >> >> Co-authored-by: Paul Sandoz > > Please ada

Re: RFR: 8312522: Implementation of Foreign Function & Memory API [v12]

2023-09-06 Thread Jorn Vernee
ama-foreign/pull/849 Several test fixes to > make sure the `jdk_foreign` tests can pass on 32-bit machines, taking > linux-x86 as a test bed. > 9. https://github.com/openjdk/panama-foreign/pull/850 Make the linker API > required. The `Linker::nativeLinker` method is not longer al

Re: RFR: 8312522: Implementation of Foreign Function & Memory API [v10]

2023-09-06 Thread Jorn Vernee
On Tue, 5 Sep 2023 21:10:47 GMT, Paul Sandoz wrote: >> Jorn Vernee has updated the pull request incrementally with five additional >> commits since the last revision: >> >> - 8315096: Allowed access modes in memory segment should depend on layout >> alig

Re: RFR: 8312522: Implementation of Foreign Function & Memory API [v11]

2023-09-06 Thread Jorn Vernee
ama-foreign/pull/849 Several test fixes to > make sure the `jdk_foreign` tests can pass on 32-bit machines, taking > linux-x86 as a test bed. > 9. https://github.com/openjdk/panama-foreign/pull/850 Make the linker API > required. The `Linker::nativeLinker` method is not longer al

Re: RFR: 8312522: Implementation of Foreign Function & Memory API [v11]

2023-09-06 Thread Jorn Vernee
On Tue, 5 Sep 2023 21:56:54 GMT, Paul Sandoz wrote: >> Jorn Vernee has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Fix typo in doc >> >> Co-authored-by: Paul Sandoz > > sr

Re: RFR: 8314949: linux PPC64 Big Endian: Implementation of Foreign Function & Memory API [v7]

2023-09-05 Thread Jorn Vernee
On Mon, 4 Sep 2023 21:17:06 GMT, Martin Doerr wrote: >> I've found a way to solve the remaining FFI problem on linux PPC64 Big >> Endian. Large structs (>8 Bytes) which are passed in registers or on stack >> require shifting the Bytes in the last slot if the size is not a multiple of >> 8. Thi

Re: RFR: 8312522: Implementation of Foreign Function & Memory API [v9]

2023-09-04 Thread Jorn Vernee
On Mon, 4 Sep 2023 11:33:30 GMT, Jorn Vernee wrote: >> This patch contains the implementation of the foreign linker & memory API >> JEP for Java 22. The initial patch is composed of commits brought over >> directly from the [panama-foreign >> repo](https://githu

Re: RFR: 8312522: Implementation of Foreign Function & Memory API [v10]

2023-09-04 Thread Jorn Vernee
ama-foreign/pull/849 Several test fixes to > make sure the `jdk_foreign` tests can pass on 32-bit machines, taking > linux-x86 as a test bed. > 9. https://github.com/openjdk/panama-foreign/pull/850 Make the linker API > required. The `Linker::nativeLinker` method is not longer allo

Re: RFR: 8314949: linux PPC64 Big Endian: Implementation of Foreign Function & Memory API [v5]

2023-09-04 Thread Jorn Vernee
On Mon, 4 Sep 2023 14:56:18 GMT, Martin Doerr wrote: >> I've found a way to solve the remaining FFI problem on linux PPC64 Big >> Endian. Large structs (>8 Bytes) which are passed in registers or on stack >> require shifting the Bytes in the last slot if the size is not a multiple of >> 8. Thi

Re: RFR: 8314949: linux PPC64 Big Endian: Implementation of Foreign Function & Memory API [v4]

2023-09-04 Thread Jorn Vernee
On Mon, 4 Sep 2023 14:54:05 GMT, Martin Doerr wrote: > Do you see a good place for such a comment? PPC CallArranger seems like a good place to me. We have a similar explanation comment in the AArch64 CallArranger. > Maybe it would be better to use a different size for the last chunk. Maybe >

Re: RFR: 8314949: linux PPC64 Big Endian: Implementation of Foreign Function & Memory API [v5]

2023-09-04 Thread Jorn Vernee
On Mon, 4 Sep 2023 14:56:18 GMT, Martin Doerr wrote: >> I've found a way to solve the remaining FFI problem on linux PPC64 Big >> Endian. Large structs (>8 Bytes) which are passed in registers or on stack >> require shifting the Bytes in the last slot if the size is not a multiple of >> 8. Thi

Re: RFR: 8314949: linux PPC64 Big Endian: Implementation of Foreign Function & Memory API [v3]

2023-09-04 Thread Jorn Vernee
On Mon, 4 Sep 2023 14:50:37 GMT, Martin Doerr wrote: >>> as it would no longer need an input type? >> >> Yes. Then both shift ops would always operate on `long`. > > I've changed it. Note that I need many more conversions because buffer > load/store also use subtypes of `int`. Please take a loo

Re: RFR: 8314949: linux PPC64 Big Endian: Implementation of Foreign Function & Memory API [v3]

2023-09-04 Thread Jorn Vernee
On Mon, 4 Sep 2023 14:27:27 GMT, Maurizio Cimadamore wrote: > as it would no longer need an input type? Yes. Then both shift ops would always operate on `long`. - PR Review Comment: https://git.openjdk.org/jdk/pull/15417#discussion_r1315016599

Re: RFR: 8314949: linux PPC64 Big Endian: Implementation of Foreign Function & Memory API [v3]

2023-09-04 Thread Jorn Vernee
On Mon, 4 Sep 2023 12:20:52 GMT, Martin Doerr wrote: >> Sorry for the delay, I've been on vacation. > >> Sorry for the delay, I've been on vacation. > > No problem. Hope you had a good time! Thanks for your feedback. @TheRealMDoerr We've been discussing the shifts in order to wrap our heads ar

Re: RFR: 8314949: linux PPC64 Big Endian: Implementation of Foreign Function & Memory API [v4]

2023-09-04 Thread Jorn Vernee
On Mon, 4 Sep 2023 12:22:00 GMT, Martin Doerr wrote: >> I've found a way to solve the remaining FFI problem on linux PPC64 Big >> Endian. Large structs (>8 Bytes) which are passed in registers or on stack >> require shifting the Bytes in the last slot if the size is not a multiple of >> 8. Thi

Re: RFR: 8314949: linux PPC64 Big Endian: Implementation of Foreign Function & Memory API [v3]

2023-09-04 Thread Jorn Vernee
On Mon, 4 Sep 2023 12:19:42 GMT, Martin Doerr wrote: >> src/java.base/share/classes/jdk/internal/foreign/abi/Binding.java line 398: >> >>> 396: bindings.add(Binding.cast(type, int.class)); >>> 397: type = int.class; >>> 398: } >> >> Part of the casts

Re: RFR: 8312522: Implementation of Foreign Function & Memory API [v9]

2023-09-04 Thread Jorn Vernee
ama-foreign/pull/849 Several test fixes to > make sure the `jdk_foreign` tests can pass on 32-bit machines, taking > linux-x86 as a test bed. > 9. https://github.com/openjdk/panama-foreign/pull/850 Make the linker API > required. The `Linker::nativeLinker` method is not longer al

Re: RFR: 8312522: Implementation of Foreign Function & Memory API [v8]

2023-09-04 Thread Jorn Vernee
ama-foreign/pull/849 Several test fixes to > make sure the `jdk_foreign` tests can pass on 32-bit machines, taking > linux-x86 as a test bed. > 9. https://github.com/openjdk/panama-foreign/pull/850 Make the linker API > required. The `Linker::nativeLinker` method is not longer al

Re: RFR: 8312522: Implementation of Foreign Function & Memory API [v7]

2023-09-04 Thread Jorn Vernee
ama-foreign/pull/849 Several test fixes to > make sure the `jdk_foreign` tests can pass on 32-bit machines, taking > linux-x86 as a test bed. > 9. https://github.com/openjdk/panama-foreign/pull/850 Make the linker API > required. The `Linker::nativeLinker` method is not longer al

Re: RFR: 8312522: Implementation of Foreign Function & Memory API [v6]

2023-09-04 Thread Jorn Vernee
ama-foreign/pull/849 Several test fixes to > make sure the `jdk_foreign` tests can pass on 32-bit machines, taking > linux-x86 as a test bed. > 9. https://github.com/openjdk/panama-foreign/pull/850 Make the linker API > required. The `Linker::nativeLinker` method is not longer allo

Re: RFR: 8314949: linux PPC64 Big Endian: Implementation of Foreign Function & Memory API [v3]

2023-09-04 Thread Jorn Vernee
On Fri, 25 Aug 2023 09:24:15 GMT, Maurizio Cimadamore wrote: >> The ABI says: "An aggregate or union smaller than one doubleword in size is >> padded so that it appears in the least significant bits of the doubleword. >> All others are padded, if necessary, at their tail." >> [https://refspec

Re: RFR: 8314949: linux PPC64 Big Endian: Implementation of Foreign Function & Memory API [v3]

2023-09-04 Thread Jorn Vernee
On Fri, 25 Aug 2023 10:59:45 GMT, Martin Doerr wrote: >> I've found a way to solve the remaining FFI problem on linux PPC64 Big >> Endian. Large structs (>8 Bytes) which are passed in registers or on stack >> require shifting the Bytes in the last slot if the size is not a multiple of >> 8. Th

Re: RFR: 8312522: Implementation of Foreign Function & Memory API [v5]

2023-08-16 Thread Jorn Vernee
ama-foreign/pull/849 Several test fixes to > make sure the `jdk_foreign` tests can pass on 32-bit machines, taking > linux-x86 as a test bed. > 9. https://github.com/openjdk/panama-foreign/pull/850 Make the linker API > required. The `Linker::nativeLinker` method is not longer allo

Re: RFR: 8314330: java/foreign tests should respect vm flags when start new processes

2023-08-16 Thread Jorn Vernee
On Wed, 16 Aug 2023 00:14:47 GMT, Leonid Mesnik wrote: > The test helper which spawn new jvms is updated to start them using VM flags > for testing. Marked as reviewed by jvernee (Reviewer). test/jdk/java/foreign/UpcallTestHelper.java line 25: > 23: > 24: import jdk.test.lib.process.ProcessT

Re: RFR: 8312522: Implementation of Foreign Function & Memory API [v3]

2023-08-11 Thread Jorn Vernee
On Thu, 10 Aug 2023 23:31:57 GMT, Chen Liang wrote: > Just curious, what's the rationale for finalizing the API when there are > significant changes from the last preview? A preview API is finalized when it is ready. The preview process, as outlined by [JEP 12](https://bugs.openjdk.org/browse/

Re: RFR: 8312522: Implementation of Foreign Function & Memory API [v4]

2023-08-11 Thread Jorn Vernee
ama-foreign/pull/849 Several test fixes to > make sure the `jdk_foreign` tests can pass on 32-bit machines, taking > linux-x86 as a test bed. > 9. https://github.com/openjdk/panama-foreign/pull/850 Make the linker API > required. The `Linker::nativeLinker` method is not longer al

Re: RFR: 8312522: Implementation of Foreign Function & Memory API [v3]

2023-08-10 Thread Jorn Vernee
ama-foreign/pull/849 Several test fixes to > make sure the `jdk_foreign` tests can pass on 32-bit machines, taking > linux-x86 as a test bed. > 9. https://github.com/openjdk/panama-foreign/pull/850 Make the linker API > required. The `Linker::nativeLinker` method is not longer all

Re: RFR: 8312522: Implementation of Foreign Function & Memory API

2023-08-10 Thread Jorn Vernee
On Tue, 1 Aug 2023 10:29:06 GMT, Jorn Vernee wrote: > This patch contains the implementation of the foreign linker & memory API JEP > for Java 22. The initial patch is composed of commits brought over directly > from the [panama-foreign repo](https://github.com/openjdk/panama-for

<    1   2   3   4   5   6   7   8   9   10   >