Re: RFR: 8254231: Implementation of Foreign Linker API (Incubator) [v15]

2020-11-11 Thread Doug Simon
On Wed, 11 Nov 2020 13:31:11 GMT, Jorn Vernee wrote: >> Where's the logic for the native thread to detach? We have a similar problem >> in libgraal. We have a [utility >>

Re: RFR: 8254231: Implementation of Foreign Linker API (Incubator) [v15]

2020-11-11 Thread Jorn Vernee
On Wed, 11 Nov 2020 13:25:32 GMT, Doug Simon wrote: >> The context is a thread that is spawned by native code doing an upcall. We >> need to attach the thread to the VM first in that case. Normally this would >> be handled by the calling code, but in our case the calling code doesn't >> know

Re: RFR: 8254231: Implementation of Foreign Linker API (Incubator) [v15]

2020-11-11 Thread Doug Simon
On Mon, 9 Nov 2020 11:50:54 GMT, Jorn Vernee wrote: >> src/hotspot/cpu/aarch64/universalUpcallHandler_aarch64.cpp line 99: >> >>> 97: if (thread == NULL) { >>> 98: JavaVM_ *vm = (JavaVM *)(_vm); >>> 99: vm -> functions -> AttachCurrentThreadAsDaemon(vm, _env, NULL); >> >> Style nit:

Re: RFR: 8254231: Implementation of Foreign Linker API (Incubator) [v15]

2020-11-10 Thread Coleen Phillimore
On Mon, 9 Nov 2020 16:31:23 GMT, Jorn Vernee wrote: >> src/hotspot/cpu/aarch64/universalUpcallHandler_aarch64.cpp line 121: >> >>> 119: upcall_info.upcall_method.name, >>> upcall_info.upcall_method.sig, >>> 120: , thread); >>> 121: } >> >>

Re: RFR: 8254231: Implementation of Foreign Linker API (Incubator) [v15]

2020-11-10 Thread Jorn Vernee
On Mon, 9 Nov 2020 04:10:30 GMT, David Holmes wrote: >> Maurizio Cimadamore has updated the pull request with a new target base due >> to a merge or a rebase. The pull request now contains 64 commits: >> >> - Merge branch '8254162' into 8254231_linker >> - Fix post-merge issues caused by

Re: RFR: 8254231: Implementation of Foreign Linker API (Incubator) [v15]

2020-11-09 Thread David Holmes
On 10/11/2020 2:34 am, Jorn Vernee wrote: On Mon, 9 Nov 2020 12:11:56 GMT, Jorn Vernee wrote: I agree with Coleen. I'll give this another try, but I think last time I tried this resolution of the class failed when trying to build the JDK, seemingly since it exists in an incubator module,

Re: RFR: 8254231: Implementation of Foreign Linker API (Incubator) [v15]

2020-11-09 Thread Jorn Vernee
On Mon, 9 Nov 2020 03:52:27 GMT, David Holmes wrote: >> Maurizio Cimadamore has updated the pull request with a new target base due >> to a merge or a rebase. The pull request now contains 64 commits: >> >> - Merge branch '8254162' into 8254231_linker >> - Fix post-merge issues caused by

Re: RFR: 8254231: Implementation of Foreign Linker API (Incubator) [v15]

2020-11-09 Thread Jorn Vernee
On Fri, 6 Nov 2020 22:02:31 GMT, Coleen Phillimore wrote: >> src/hotspot/cpu/aarch64/universalUpcallHandler_aarch64.cpp line 81: >> >>> 79: #endif >>> 80: >>> 81: Method* method = k->lookup_method(mname_sym, mdesc_sym); >> >> This "method" appears unused. > > This should be moved into

Re: RFR: 8254231: Implementation of Foreign Linker API (Incubator) [v15]

2020-11-09 Thread Jorn Vernee
On Mon, 9 Nov 2020 12:11:56 GMT, Jorn Vernee wrote: >> I agree with Coleen. > > I'll give this another try, but I think last time I tried this resolution of > the class failed when trying to build the JDK, seemingly since it exists in > an incubator module, which is not always added to the

Re: RFR: 8254231: Implementation of Foreign Linker API (Incubator) [v15]

2020-11-09 Thread Jorn Vernee
On Fri, 6 Nov 2020 22:07:39 GMT, Coleen Phillimore wrote: >> Maurizio Cimadamore has updated the pull request with a new target base due >> to a merge or a rebase. The pull request now contains 64 commits: >> >> - Merge branch '8254162' into 8254231_linker >> - Fix post-merge issues caused

Re: RFR: 8254231: Implementation of Foreign Linker API (Incubator) [v15]

2020-11-09 Thread Jorn Vernee
Hi David, On 09/11/2020 14:51, David Holmes wrote: Hi Jorn, On 9/11/2020 9:57 pm, Jorn Vernee wrote: On Mon, 9 Nov 2020 03:29:05 GMT, David Holmes wrote: src/hotspot/cpu/aarch64/universalUpcallHandler_aarch64.cpp line 99: 97:   if (thread == NULL) { 98: JavaVM_ *vm = (JavaVM

Re: RFR: 8254231: Implementation of Foreign Linker API (Incubator) [v15]

2020-11-09 Thread David Holmes
Hi Jorn, On 9/11/2020 9:57 pm, Jorn Vernee wrote: On Mon, 9 Nov 2020 03:29:05 GMT, David Holmes wrote: src/hotspot/cpu/aarch64/universalUpcallHandler_aarch64.cpp line 99: 97: if (thread == NULL) { 98: JavaVM_ *vm = (JavaVM *)(_vm); 99: vm -> functions ->

Re: RFR: 8254231: Implementation of Foreign Linker API (Incubator) [v15]

2020-11-09 Thread Jorn Vernee
On Mon, 9 Nov 2020 03:31:15 GMT, David Holmes wrote: >> src/hotspot/cpu/aarch64/universalUpcallHandler_aarch64.cpp line 55: >> >>> 53: >>> 54: // FIXME: This should be initialized explicitly instead of lazily/racily >>> 55: static void upcall_init() { >> >> The FIXME is right this should be

Re: RFR: 8254231: Implementation of Foreign Linker API (Incubator) [v15]

2020-11-09 Thread Jorn Vernee
On Mon, 9 Nov 2020 03:29:05 GMT, David Holmes wrote: >> Maurizio Cimadamore has updated the pull request with a new target base due >> to a merge or a rebase. The pull request now contains 64 commits: >> >> - Merge branch '8254162' into 8254231_linker >> - Fix post-merge issues caused by

Re: RFR: 8254231: Implementation of Foreign Linker API (Incubator) [v15]

2020-11-09 Thread Jorn Vernee
On Mon, 9 Nov 2020 06:07:32 GMT, Nick Gasson wrote: >> Maurizio Cimadamore has updated the pull request with a new target base due >> to a merge or a rebase. The pull request now contains 64 commits: >> >> - Merge branch '8254162' into 8254231_linker >> - Fix post-merge issues caused by

Re: RFR: 8254231: Implementation of Foreign Linker API (Incubator) [v15]

2020-11-08 Thread Nick Gasson
On Thu, 5 Nov 2020 21:26:16 GMT, Maurizio Cimadamore wrote: >> This patch contains the changes associated with the first incubation round >> of the foreign linker access API incubation >> (see JEP 389 [1]). This work is meant to sit on top of the foreign memory >> access support (see JEP 393

Re: RFR: 8254231: Implementation of Foreign Linker API (Incubator) [v15]

2020-11-08 Thread David Holmes
On Fri, 6 Nov 2020 21:42:41 GMT, Coleen Phillimore wrote: >> Maurizio Cimadamore has updated the pull request with a new target base due >> to a merge or a rebase. The pull request now contains 64 commits: >> >> - Merge branch '8254162' into 8254231_linker >> - Fix post-merge issues caused

Re: RFR: 8254231: Implementation of Foreign Linker API (Incubator) [v15]

2020-11-08 Thread David Holmes
On Thu, 5 Nov 2020 21:26:16 GMT, Maurizio Cimadamore wrote: >> This patch contains the changes associated with the first incubation round >> of the foreign linker access API incubation >> (see JEP 389 [1]). This work is meant to sit on top of the foreign memory >> access support (see JEP 393

Re: RFR: 8254231: Implementation of Foreign Linker API (Incubator) [v15]

2020-11-08 Thread David Holmes
On Thu, 5 Nov 2020 21:26:16 GMT, Maurizio Cimadamore wrote: >> This patch contains the changes associated with the first incubation round >> of the foreign linker access API incubation >> (see JEP 389 [1]). This work is meant to sit on top of the foreign memory >> access support (see JEP 393

Re: RFR: 8254231: Implementation of Foreign Linker API (Incubator) [v15]

2020-11-06 Thread Coleen Phillimore
On Thu, 5 Nov 2020 21:26:16 GMT, Maurizio Cimadamore wrote: >> This patch contains the changes associated with the first incubation round >> of the foreign linker access API incubation >> (see JEP 389 [1]). This work is meant to sit on top of the foreign memory >> access support (see JEP 393

Re: RFR: 8254231: Implementation of Foreign Linker API (Incubator) [v15]

2020-11-06 Thread Coleen Phillimore
On Fri, 6 Nov 2020 21:47:42 GMT, Coleen Phillimore wrote: >> Maurizio Cimadamore has updated the pull request with a new target base due >> to a merge or a rebase. The pull request now contains 64 commits: >> >> - Merge branch '8254162' into 8254231_linker >> - Fix post-merge issues caused

Re: RFR: 8254231: Implementation of Foreign Linker API (Incubator) [v15]

2020-11-05 Thread Maurizio Cimadamore
> This patch contains the changes associated with the first incubation round of > the foreign linker access API incubation > (see JEP 389 [1]). This work is meant to sit on top of the foreign memory > access support (see JEP 393 [2] and associated pull request [3]). > > The main goal of this