Integrated: 8268327: Upstream: 8268169: The system lookup can not find stdio functions such as printf on Windows 10

2021-06-08 Thread Jorn Vernee
On Mon, 7 Jun 2021 13:23:46 GMT, Jorn Vernee wrote: > Hi, > > The documentation of `CLinker::systemLookup` [1] says this: > > > * Obtains a system lookup which is suitable to find symbols in the standard C > libraries. > > > However, currently it is not poss

Re: RFR: 8268328: Upstream: 8267989: Exceptions thrown during upcalls should be handled (Pt. 1)

2021-06-08 Thread Jorn Vernee
On Mon, 7 Jun 2021 15:14:39 GMT, Jorn Vernee wrote: > Hi, > > This is part 1 of a two part upstreaming process of the patch mentioned in > the subject line. The patch was split into 2 in order to document 2 separate > specification changes that arose from a change in the imple

Withdrawn: 8268328: Upstream: 8267989: Exceptions thrown during upcalls should be handled (Pt. 1)

2021-06-08 Thread Jorn Vernee
On Mon, 7 Jun 2021 15:14:39 GMT, Jorn Vernee wrote: > Hi, > > This is part 1 of a two part upstreaming process of the patch mentioned in > the subject line. The patch was split into 2 in order to document 2 separate > specification changes that arose from a change in the imple

Re: RFR: 8268339: Upstream: 8267989: Exceptions thrown during upcalls should be handled (Pt. 2) [v2]

2021-06-08 Thread Jorn Vernee
handled during the upcall > itself, for instance by translating the exception into an error code that is > then returned to the native caller, which can deal with it appropriately. > > See also the original review for panama-foreign: > https://github.com/openjdk/panama-foreign/p

Re: RFR: 8268339: Upstream: 8267989: Exceptions thrown during upcalls should be handled (Pt. 2) [v3]

2021-06-08 Thread Jorn Vernee
handled during the upcall > itself, for instance by translating the exception into an error code that is > then returned to the native caller, which can deal with it appropriately. > > See also the original review for panama-foreign: > https://github.com/openjdk/panama-foreign/p

Re: RFR: 8268339: Upstream: 8267989: Exceptions thrown during upcalls should be handled (Pt. 2) [v3]

2021-06-08 Thread Jorn Vernee
On Tue, 8 Jun 2021 17:07:43 GMT, Jorn Vernee wrote: >> Hi, >> >> This is part 2 of a two part upstreaming process of the patch mentioned in >> the subject line. The patch was split into 2 in order to document 2 separate >> specification changes that arose from

Re: RFR: 8268339: Upstream: 8267989: Exceptions thrown during upcalls should be handled (Pt. 2) [v4]

2021-06-08 Thread Jorn Vernee
handled during the upcall > itself, for instance by translating the exception into an error code that is > then returned to the native caller, which can deal with it appropriately. > > See also the original review for panama-foreign: > https://github.com/openjdk/panama-foreign/p

Re: RFR: 8268339: Upstream: 8267989: Exceptions thrown during upcalls should be handled (Pt. 2) [v5]

2021-06-08 Thread Jorn Vernee
handled during the upcall > itself, for instance by translating the exception into an error code that is > then returned to the native caller, which can deal with it appropriately. > > See also the original review for panama-foreign: > https://github.com/openjdk/panama-foreign/p

Re: RFR: 8266835: Add a --validate option to the jar tool [v3]

2021-06-08 Thread Jorn Vernee
> https://mail.openjdk.java.net/pipermail/core-libs-dev/2021-May/077420.html > > Testing: running jdk/tools/jar test suite locally, tier 1-3 (in progress), > manual testing. Jorn Vernee has updated the pull request incrementally with one additional commit since the last r

Re: RFR: 8266835: Add a --validate option to the jar tool [v2]

2021-06-08 Thread Jorn Vernee
On Tue, 8 Jun 2021 17:28:21 GMT, Alan Bateman wrote: >> Jorn Vernee has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Update error message > > This all looks reasonable, I just wonder if the --validate des

Re: RFR: 8267421: j.l.constant.DirectMethodHandleDesc.Kind.valueOf(int) implementation doesn't conform to the spec regarding REF_invokeInterface handling

2021-06-09 Thread Jorn Vernee
On Tue, 8 Jun 2021 16:46:36 GMT, Vicente Romero wrote: > Please review this PR which is just syncing the implementation of > DirectMethodHandleDesc.Kind.valueOf(int) with its spec. My reading of the > method's spec is that if the value of the `refKind` parameter is: > MethodHandleInfo.REF_invo

Re: RFR: 8266835: Add a --validate option to the jar tool [v3]

2021-06-09 Thread Jorn Vernee
On Tue, 8 Jun 2021 18:32:36 GMT, Jorn Vernee wrote: >> This patch adds a `--validate` option to the jar tool which can be used to >> validate a jar file that might be malformed. For instance, if a jar is a >> multi-release jar, it is malformed if different versions expose

Re: RFR: 8266835: Add a --validate option to the jar tool [v4]

2021-06-09 Thread Jorn Vernee
> https://mail.openjdk.java.net/pipermail/core-libs-dev/2021-May/077420.html > > Testing: running jdk/tools/jar test suite locally, tier 1-3 (in progress), > manual testing. Jorn Vernee has updated the pull request incrementally with one additional commit since the last

Re: RFR: 8266835: Add a --validate option to the jar tool [v3]

2021-06-09 Thread Jorn Vernee
On Wed, 9 Jun 2021 13:02:50 GMT, Alan Bateman wrote: >> Jorn Vernee has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Improve help message. > > src/jdk.jartool/share/classes/sun/tools/jar/resources/jar.

Integrated: 8266835: Add a --validate option to the jar tool

2021-06-09 Thread Jorn Vernee
On Tue, 11 May 2021 10:51:18 GMT, Jorn Vernee wrote: > This patch adds a `--validate` option to the jar tool which can be used to > validate a jar file that might be malformed. For instance, if a jar is a > multi-release jar, it is malformed if different versions expose differen

Integrated: 8268339: Upstream: 8267989: Exceptions thrown during upcalls should be handled

2021-06-10 Thread Jorn Vernee
On Mon, 7 Jun 2021 16:38:01 GMT, Jorn Vernee wrote: > Hi, > > ~This is part 2 of a two part upstreaming process of the patch mentioned in > the subject line. The patch was split into 2 in order to document 2 separate > specification changes that arose from a change in the imple

Re: RFR: 8268339: Upstream: 8267989: Exceptions thrown during upcalls should be handled [v5]

2021-06-10 Thread Jorn Vernee
On Tue, 8 Jun 2021 19:25:36 GMT, Paul Sandoz wrote: >> Jorn Vernee has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Suggest try/catch Throwable in upcallStub javadoc > > test/jdk/java/foreign/TestUpcallEx

[jdk17] RFR: 8268717: Upstream: 8268673: Stack walk across optimized entry frame on fresh native thread fails

2021-06-16 Thread Jorn Vernee
Upstream a critical fix from the panama-foreign repo. See the prior review thread here: https://github.com/openjdk/panama-foreign/pull/558 Testing: tier 1-2, local run of run-test-jdk_foreign. - Commit messages: - Fix a couple of CI build problems - Upstream: 8268673: Stack walk

[jdk17] RFR: 8268888: Upstream 8268230: Foreign Linker API & Windows user32/kernel32: String conversion seems broken

2021-06-16 Thread Jorn Vernee
Upstream fix for 8268230 to mainline JDK. Prior review thread can be found here: https://github.com/openjdk/panama-foreign/pull/554 Testing: jdk_foreign test suite on Windows and Linux (WSL). - Commit messages: - 8268230: Foreign Linker API & Windows user32/kernel32: String conver

Re: [jdk17] RFR: 8268888: Upstream 8268230: Foreign Linker API & Windows user32/kernel32: String conversion seems broken [v2]

2021-06-16 Thread Jorn Vernee
> Upstream fix for 8268230 to mainline JDK. > > Prior review thread can be found here: > https://github.com/openjdk/panama-foreign/pull/554 > > Testing: jdk_foreign test suite on Windows and Linux (WSL). Jorn Vernee has updated the pull request incrementally with one additi

Re: [jdk17] RFR: 8268717: Upstream: 8268673: Stack walk across optimized entry frame on fresh native thread fails [v2]

2021-06-17 Thread Jorn Vernee
On Thu, 17 Jun 2021 00:23:19 GMT, David Holmes wrote: >> Jorn Vernee has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Add comment about optimized entry frames only being generated on x86_64 > > src/hotspot/

Re: [jdk17] RFR: 8268717: Upstream: 8268673: Stack walk across optimized entry frame on fresh native thread fails [v2]

2021-06-17 Thread Jorn Vernee
> Upstream a critical fix from the panama-foreign repo. > > See the prior review thread here: > https://github.com/openjdk/panama-foreign/pull/558 > > Testing: tier 1-2, local run of run-test-jdk_foreign. Jorn Vernee has updated the pull request incrementally with one additi

Re: [jdk17] RFR: 8268717: Upstream: 8268673: Stack walk across optimized entry frame on fresh native thread fails [v3]

2021-06-17 Thread Jorn Vernee
> Upstream a critical fix from the panama-foreign repo. > > See the prior review thread here: > https://github.com/openjdk/panama-foreign/pull/558 > > Testing: tier 1-2, local run of run-test-jdk_foreign. Jorn Vernee has updated the pull request incrementally with two additio

Re: [jdk17] RFR: 8268717: Upstream: 8268673: Stack walk across optimized entry frame on fresh native thread fails

2021-06-17 Thread Jorn Vernee
On Thu, 17 Jun 2021 12:30:46 GMT, David Holmes wrote: > Now that you have explained it I think a much simpler comment will suffice :) Ok, I've shortened the comment. Thanks :) - PR: https://git.openjdk.java.net/jdk17/pull/76

Re: [jdk17] RFR: 8268717: Upstream: 8268673: Stack walk across optimized entry frame on fresh native thread fails [v3]

2021-06-17 Thread Jorn Vernee
On Thu, 17 Jun 2021 12:50:10 GMT, Jorn Vernee wrote: >> Upstream a critical fix from the panama-foreign repo. >> >> See the prior review thread here: >> https://github.com/openjdk/panama-foreign/pull/558 >> >> Testing: tier 1-2, local run of run-test-jdk_

Re: [jdk17] RFR: 8268717: Upstream: 8268673: Stack walk across optimized entry frame on fresh native thread fails [v2]

2021-06-17 Thread Jorn Vernee
On Thu, 17 Jun 2021 11:28:54 GMT, Jorn Vernee wrote: >> Upstream a critical fix from the panama-foreign repo. >> >> See the prior review thread here: >> https://github.com/openjdk/panama-foreign/pull/558 >> >> Testing: tier 1-2, local run of run-test-jdk_

[jdk17] Integrated: 8268717: Upstream: 8268673: Stack walk across optimized entry frame on fresh native thread fails

2021-06-21 Thread Jorn Vernee
On Wed, 16 Jun 2021 11:19:37 GMT, Jorn Vernee wrote: > Upstream a critical fix from the panama-foreign repo. > > See the prior review thread here: > https://github.com/openjdk/panama-foreign/pull/558 > > Testing: tier 1-2, local run of run-test-jdk_foreign. This pull re

[jdk17] Integrated: 8268888: Upstream 8268230: Foreign Linker API & Windows user32/kernel32: String conversion seems broken

2021-06-22 Thread Jorn Vernee
On Wed, 16 Jun 2021 12:20:48 GMT, Jorn Vernee wrote: > Upstream fix for 8268230 to mainline JDK. > > Prior review thread can be found here: > https://github.com/openjdk/panama-foreign/pull/554 > > Testing: jdk_foreign test suite on Windows and Linux (WSL). This pull re

[jdk17] RFR: 8269240: java/foreign/stackwalk/TestAsyncStackWalk.java test failed with concurrent GC

2021-06-28 Thread Jorn Vernee
This patch rewrites the prologue and epilogue of panama upcalls, in order to fix the test failure from the title. Previously, we did a call to potentially attach the current thread to the VM, and then afterwards did the same suspend and stack reguard checks that we do on the back-edge of a nati

Re: [jdk17] RFR: 8269240: java/foreign/stackwalk/TestAsyncStackWalk.java test failed with concurrent GC

2021-06-28 Thread Jorn Vernee
On Fri, 25 Jun 2021 17:38:32 GMT, Jorn Vernee wrote: > This patch rewrites the prologue and epilogue of panama upcalls, in order to > fix the test failure from the title. > > Previously, we did a call to potentially attach the current thread to the VM, > and then afterwar

Re: [jdk17] RFR: JDK-8269426: Move tests from test/jdk/java/lang/invoke/t8150782 to its parent directory

2021-06-28 Thread Jorn Vernee
On Mon, 28 Jun 2021 16:09:36 GMT, Mandy Chung wrote: > `test/jdk/java/lang/invoke/t8150782` is the only one using that convention. > There are several tests under `` directory. As the tests under > `test/jdk/java/lang/invoke/t8150782` are mostly unit tests for > `Lookup::accessClass` and `Loo

Re: [jdk17] RFR: 8268566: java/foreign/TestResourceScope.java timed out

2021-06-28 Thread Jorn Vernee
On Mon, 14 Jun 2021 15:42:03 GMT, Maurizio Cimadamore wrote: > This patch contains another minor tweak to TestResourceScope as we have seen > this test timing out at least once (on arm64). > > I realized that some of the logic recently introduced in the test could lead > to the test waiting f

Re: [jdk17] RFR: 8269096: Add java.util.Objects.newIdentity method [v4]

2021-06-28 Thread Jorn Vernee
On Wed, 23 Jun 2021 19:21:02 GMT, Roger Riggs wrote: >> Add java.util.Objects.newIdentity to supply a unique object with identity. >> This is a replacement code can be used today for the traditional new >> Object() idiom, which will be deprecated under Project Valhalla. >> Refer to [JEP 401: Pri

Re: [jdk17] RFR: 8269486: CallerAccessTest fails for non server variant [v2]

2021-06-28 Thread Jorn Vernee
On Mon, 28 Jun 2021 14:52:41 GMT, Christoph Göttschkes wrote: >> Hi, >> >> please review this small fix. The test case uses a custom launcher and >> before launching the JVM, it adds the "lib" and "lib/server" directories to >> the environment variable which controls the native library search

Re: [jdk17] RFR: JDK-8269426: Move tests from test/jdk/java/lang/invoke/t8150782 to its parent directory

2021-06-28 Thread Jorn Vernee
On Mon, 28 Jun 2021 18:56:24 GMT, Mandy Chung wrote: > That's a fair point. I personally prefer using a descriptive directory name > rather than bug ID since that can give the reader what the tests are intended > for. What about renaming t8150782 to accessClassAndFindClass? Me too! That sounds

Re: [jdk17] RFR: JDK-8269426: Rename test/jdk/java/lang/invoke/t8150782 to accessClassAndFindClass [v2]

2021-06-28 Thread Jorn Vernee
On Mon, 28 Jun 2021 19:13:45 GMT, Mandy Chung wrote: >> `test/jdk/java/lang/invoke/t8150782` is the only one using that convention. >> There are several tests under `` directory. As the tests under >> `test/jdk/java/lang/invoke/t8150782` are mostly unit tests for >> `Lookup::accessClass` and

Re: [jdk17] RFR: 8269096: Add java.util.Objects.newIdentity method [v5]

2021-06-28 Thread Jorn Vernee
On Mon, 28 Jun 2021 19:45:34 GMT, Roger Riggs wrote: >> Add java.util.Objects.newIdentity to supply a unique object with identity. >> This is a replacement code can be used today for the traditional new >> Object() idiom, which will be deprecated under Project Valhalla. >> Refer to [JEP 401: Pri

Re: [jdk17] RFR: 8270025: DynamicCallSiteDesc::withArgs doesn't throw NPE

2021-07-12 Thread Jorn Vernee
On Sat, 10 Jul 2021 19:03:36 GMT, Vicente Romero wrote: > Please review this PR that is fixing a mismatch between the implementation > for method `java.lang.constant.DynamicCallSiteDesc::withArgs` and its > implementation. I made a mistake while working on a recent CSR > [JDK-8224985](https://

Re: [jdk17] RFR: 8269281: java/foreign/Test{Down, Up}call.java time out

2021-07-12 Thread Jorn Vernee
On Fri, 9 Jul 2021 15:01:15 GMT, Maurizio Cimadamore wrote: > After some more investigation, I have been able to at least partially > reproduce on my Linux box. While I can't get to same slowdown as we're seeing > in test machines, I did notice that in fastdebug mode, TestUpcall is a lot > sl

Re: [jdk17] RFR: 8269240: java/foreign/stackwalk/TestAsyncStackWalk.java test failed with concurrent GC

2021-07-13 Thread Jorn Vernee
On Tue, 13 Jul 2021 13:52:18 GMT, Vladimir Ivanov wrote: >> This patch rewrites the prologue and epilogue of panama upcalls, in order to >> fix the test failure from the title. >> >> Previously, we did a call to potentially attach the current thread to the >> VM, and then afterwards did the sa

Re: [jdk17] RFR: 8269240: java/foreign/stackwalk/TestAsyncStackWalk.java test failed with concurrent GC [v2]

2021-07-13 Thread Jorn Vernee
he upcall around the call on the back-edge, which was > previously missing. Since the new code allocates a handle block as well, I've > added handling for those oops to frame & OptimizedUpcallBlob. > > Testing: local running of `jdk_foreign` on Windows and Linux (WSL). Tier 1-3

Re: [jdk17] RFR: 8269240: java/foreign/stackwalk/TestAsyncStackWalk.java test failed with concurrent GC [v2]

2021-07-15 Thread Jorn Vernee
On Wed, 14 Jul 2021 00:24:38 GMT, David Holmes wrote: >> Jorn Vernee has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Assert frame is correct type in frame_data_for_frame > > src/hotspot/share/prims/univ

Re: [jdk17] RFR: 8269240: java/foreign/stackwalk/TestAsyncStackWalk.java test failed with concurrent GC [v2]

2021-07-15 Thread Jorn Vernee
On Wed, 14 Jul 2021 00:50:44 GMT, David Holmes wrote: >> src/hotspot/share/runtime/safepoint.cpp line 931: >> >>> 929: // See if return type is an oop. >>> 930: bool return_oop = nm->method()->is_returning_oop(); >>> 931: HandleMark hm(self); >> >> I was seeing an `assert(_handle_ma

Re: [jdk17] RFR: 8269240: java/foreign/stackwalk/TestAsyncStackWalk.java test failed with concurrent GC [v2]

2021-07-15 Thread Jorn Vernee
On Wed, 14 Jul 2021 00:47:47 GMT, David Holmes wrote: >> Jorn Vernee has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Assert frame is correct type in frame_data_for_frame > > src/hotspot/share/prims/univ

Re: [jdk17] RFR: 8269240: java/foreign/stackwalk/TestAsyncStackWalk.java test failed with concurrent GC [v2]

2021-07-15 Thread Jorn Vernee
On Wed, 14 Jul 2021 00:58:38 GMT, David Holmes wrote: > The mapping to JavaCallWrapper seems reasonable but there are a few > differences that I'm now assuming stem from the fact upcalls start > _thread_in_native while JCW starts from _thread_in_vm? The main difference stems from the fact that

Re: [jdk17] RFR: 8269240: java/foreign/stackwalk/TestAsyncStackWalk.java test failed with concurrent GC [v2]

2021-07-15 Thread Jorn Vernee
On Thu, 15 Jul 2021 12:25:54 GMT, Jorn Vernee wrote: >> src/hotspot/share/prims/universalUpcallHandler.cpp line 76: >> >>> 74: >>> 75: // modelled after JavaCallWrapper::JavaCallWrapper >>> 76: Thread* >>> ProgrammableUpcallHandler:

Re: [jdk17] RFR: 8269240: java/foreign/stackwalk/TestAsyncStackWalk.java test failed with concurrent GC [v3]

2021-07-15 Thread Jorn Vernee
he upcall around the call on the back-edge, which was > previously missing. Since the new code allocates a handle block as well, I've > added handling for those oops to frame & OptimizedUpcallBlob. > > Testing: local running of `jdk_foreign` on Windows and Linux (WSL). Tier 1-3

Re: [jdk17] RFR: 8269240: java/foreign/stackwalk/TestAsyncStackWalk.java test failed with concurrent GC [v3]

2021-07-15 Thread Jorn Vernee
On Thu, 15 Jul 2021 15:54:50 GMT, Jorn Vernee wrote: >> This patch rewrites the prologue and epilogue of panama upcalls, in order to >> fix the test failure from the title. >> >> Previously, we did a call to potentially attach the current thread to the >> VM, an

Re: [jdk17] RFR: 8269240: java/foreign/stackwalk/TestAsyncStackWalk.java test failed with concurrent GC [v3]

2021-07-16 Thread Jorn Vernee
On Fri, 16 Jul 2021 02:12:20 GMT, David Holmes wrote: >> Jorn Vernee has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Address David's review comments > > src/hotspot/share/prims/universalUpcallHandler.c

Re: [jdk17] RFR: 8269240: java/foreign/stackwalk/TestAsyncStackWalk.java test failed with concurrent GC [v2]

2021-07-16 Thread Jorn Vernee
On Thu, 15 Jul 2021 23:43:38 GMT, Vladimir Kozlov wrote: >> Sorry, I sent the wrong godbolt link: https://godbolt.org/z/1665fWzff > > @JornVernee I have small correct to your comment. We use simple inheritance > for Thread subclasses. Their instances have **one** vtbl pointer at the same > offs

Re: [jdk17] RFR: 8269240: java/foreign/stackwalk/TestAsyncStackWalk.java test failed with concurrent GC [v4]

2021-07-16 Thread Jorn Vernee
he upcall around the call on the back-edge, which was > previously missing. Since the new code allocates a handle block as well, I've > added handling for those oops to frame & OptimizedUpcallBlob. > > Testing: local running of `jdk_foreign` on Windows and Linux (WSL). Tier 1-3

Re: [jdk17] RFR: 8269240: java/foreign/stackwalk/TestAsyncStackWalk.java test failed with concurrent GC [v3]

2021-07-16 Thread Jorn Vernee
On Thu, 15 Jul 2021 15:54:50 GMT, Jorn Vernee wrote: >> This patch rewrites the prologue and epilogue of panama upcalls, in order to >> fix the test failure from the title. >> >> Previously, we did a call to potentially attach the current thread to the >> VM, an

Re: RFR: 8273656: Improve java.lang.invoke.MethodType.parameterList() and its usage

2021-09-13 Thread Jorn Vernee
On Mon, 13 Sep 2021 11:06:15 GMT, Сергей Цыпанов wrote: > Currently the method is implemented like > > public List> parameterList() { > return Collections.unmodifiableList(Arrays.asList(ptypes.clone())); > } > > This seems to be excessive, as three objects are allocated here. Instead we > c

Re: RFR: 8273656: Improve java.lang.invoke.MethodType.parameterList() and its usage

2021-09-13 Thread Jorn Vernee
On Mon, 13 Sep 2021 11:06:15 GMT, Сергей Цыпанов wrote: > Currently the method is implemented like > > public List> parameterList() { > return Collections.unmodifiableList(Arrays.asList(ptypes.clone())); > } > > This seems to be excessive, as three objects are allocated here. Instead we > c

Re: RFR: 8273656: Improve java.lang.invoke.MethodType.parameterList() and its usage

2021-09-22 Thread Jorn Vernee
On Mon, 13 Sep 2021 11:06:15 GMT, Сергей Цыпанов wrote: > Currently the method is implemented like > > public List> parameterList() { > return Collections.unmodifiableList(Arrays.asList(ptypes.clone())); > } > > This seems to be excessive, as three objects are allocated here. Instead we > c

Re: RFR: 8273656: Improve java.lang.invoke.MethodType.parameterList() and its usage

2021-09-22 Thread Jorn Vernee
On Mon, 13 Sep 2021 11:06:15 GMT, Сергей Цыпанов wrote: > Currently the method is implemented like > > public List> parameterList() { > return Collections.unmodifiableList(Arrays.asList(ptypes.clone())); > } > > This seems to be excessive, as three objects are allocated here. Instead we > c

Re: RFR: JDK-8262944: Improve exception message when automatic module lists provider class not in JAR file

2021-09-23 Thread Jorn Vernee
On Thu, 16 Sep 2021 09:06:20 GMT, Christian Stein wrote: > This commit appends the name of the JAR file to the exception message for > when automatic module lists a non-existing provider class. Marked as reviewed by jvernee (Reviewer). - PR: https://git.openjdk.java.net/jdk/pull/5

Re: RFR: 8268129: LibraryLookup::ofDefault leaks symbols from loaded libraries [v7]

2021-10-12 Thread Jorn Vernee
On Thu, 3 Jun 2021 20:49:44 GMT, Maurizio Cimadamore wrote: >> This patch overhauls the library loading mechanism used by the Foreign >> Linker API. We realized that, while handy, the *default* lookup abstraction >> (`LibraryLookup::ofDefault`) was behaving inconsistentlt across platforms. >>

Re: RFR: 8275063: Implementation of Foreign Function & Memory API (Second incubator) [v12]

2021-11-02 Thread Jorn Vernee
On Mon, 1 Nov 2021 22:36:40 GMT, Maurizio Cimadamore wrote: >> This PR contains the API and implementation changes for JEP-419 [1]. A more >> detailed description of such changes, to avoid repetitions during the review >> process, is included as a separate comment. >> >> [1] - https://openjdk

Re: RFR: 8275063: Implementation of Foreign Function & Memory API (Second incubator) [v10]

2021-11-02 Thread Jorn Vernee
On Mon, 1 Nov 2021 12:05:32 GMT, Maurizio Cimadamore wrote: >> This PR contains the API and implementation changes for JEP-419 [1]. A more >> detailed description of such changes, to avoid repetitions during the review >> process, is included as a separate comment. >> >> [1] - https://openjdk

Re: RFR: 8275063: Implementation of Foreign Function & Memory API (Second incubator) [v10]

2021-11-02 Thread Jorn Vernee
On Mon, 1 Nov 2021 15:38:18 GMT, Jorn Vernee 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 17 commits: >> >> - Add cache for memory address var handles >> - Merg

Re: RFR: 8275063: Implementation of Foreign Function & Memory API (Second incubator) [v12]

2021-11-02 Thread Jorn Vernee
On Tue, 2 Nov 2021 19:02:51 GMT, Maurizio Cimadamore wrote: >> What is missing, I think, is a check (size > arenaSize) at the beginning of >> the method (we only check this in one of the paths). But we need to check >> before and after, I think, as it is possible to allocate a segment and then

Re: RFR: 8275063: Implementation of Foreign Function & Memory API (Second incubator) [v16]

2021-11-03 Thread Jorn Vernee
On Wed, 3 Nov 2021 13:08:55 GMT, Maurizio Cimadamore wrote: >> This PR contains the API and implementation changes for JEP-419 [1]. A more >> detailed description of such changes, to avoid repetitions during the review >> process, is included as a separate comment. >> >> [1] - https://openjdk

Re: RFR: 8275063: Implementation of Foreign Function & Memory API (Second incubator) [v18]

2021-11-05 Thread Jorn Vernee
On Fri, 5 Nov 2021 11:06:53 GMT, Maurizio Cimadamore wrote: >> This PR contains the API and implementation changes for JEP-419 [1]. A more >> detailed description of such changes, to avoid repetitions during the review >> process, is included as a separate comment. >> >> [1] - https://openjdk

Re: RFR: 8275063: Implementation of Foreign Function & Memory API (Second incubator) [v18]

2021-11-05 Thread Jorn Vernee
On Fri, 5 Nov 2021 14:33:44 GMT, Maurizio Cimadamore wrote: >> src/jdk.incubator.foreign/share/classes/jdk/incubator/foreign/CLinker.java >> line 134: >> >>> 132: * >>> 133: * Upcall stubs are generally safer to work with, as the linker >>> runtime can validate the type of the target metho

Re: RFR: 8277165: jdeps --multi-release --print-module-deps fails if module-info.class in different versioned directories

2021-11-23 Thread Jorn Vernee
On Tue, 23 Nov 2021 20:54:55 GMT, Mandy Chung wrote: > jdeps intends to report an error if there are multiple versions of the same > class being parsed. module-info.class should be excluded from such > detection. > > This patch also fixes a data race in `VersionHelper::set` and also unwraps

Re: RFR: 8277924: Small tweaks to foreign function and memory API

2021-11-29 Thread Jorn Vernee
On Mon, 29 Nov 2021 11:22:45 GMT, Maurizio Cimadamore wrote: > Following integration of the second incubator of the foreign function and > memory API [1], we detected few divergences between the contents of the jdk > repo and the panama repo: > > * the name of some of the `FunctionDescriptor`

Re: RFR: 8277924: Small tweaks to foreign function and memory API [v2]

2021-11-29 Thread Jorn Vernee
st incrementally with one > additional commit since the last revision: > > Update > src/jdk.incubator.foreign/share/classes/jdk/incubator/foreign/ValueLayout.java > > Co-authored-by: Jorn Vernee src/jdk.incubator.foreign/share/classes/jdk/incubator/fo

Re: RFR: 8278341: Liveness check for global scope is not as fast as it could be

2021-12-07 Thread Jorn Vernee
On Tue, 7 Dec 2021 13:12:13 GMT, Maurizio Cimadamore wrote: > When doing some unrelated performance measurements, I realized that segments > backed by global scope were still paying a relatively high cost for liveness > checks - that's because GlobalScopeImpl extends from SharedScopeImpl, and

Re: [jdk18] RFR: 8278897: Alignment of heap segments is not enforced correctly [v2]

2022-01-04 Thread Jorn Vernee
On Tue, 4 Jan 2022 11:39:08 GMT, Maurizio Cimadamore wrote: >> This PR fixes an issue with alignment constraints not being enforced >> correctly on on-heap segments dereference/copy operations. Alignment of >> on-heap segments cannot be computed exactly, as alignment of elements in >> arrays

Re: [jdk18] RFR: 8279527: Dereferencing segments backed by different scopes leads to pollution [v2]

2022-01-06 Thread Jorn Vernee
On Wed, 5 Jan 2022 18:08:01 GMT, Maurizio Cimadamore wrote: >> This patch fixes a performance issue when dereferencing memory segments >> backed by different kinds of scopes. When looking at inline traces, I found >> that one of our benchmark, namely `LoopOverPollutedSegment` was already >> h

Re: [jdk18] RFR: 8279527: Dereferencing segments backed by different scopes leads to pollution [v3]

2022-01-07 Thread Jorn Vernee
On Thu, 6 Jan 2022 12:36:52 GMT, Maurizio Cimadamore wrote: >> This patch fixes a performance issue when dereferencing memory segments >> backed by different kinds of scopes. When looking at inline traces, I found >> that one of our benchmark, namely `LoopOverPollutedSegment` was already >> h

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

2022-03-21 Thread Jorn Vernee
On Mon, 21 Mar 2022 10:45:27 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.jav

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

2022-03-24 Thread Jorn Vernee
On Wed, 23 Mar 2022 14:06:56 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://openjd

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

2022-03-24 Thread Jorn Vernee
On Thu, 24 Mar 2022 17:48:23 GMT, Maurizio Cimadamore wrote: >> make/test/BuildMicrobenchmark.gmk line 97: >> >>> 95: SRC := $(MICROBENCHMARK_SRC), \ >>> 96: BIN := $(MICROBENCHMARK_CLASSES), \ >>> 97: JAVAC_FLAGS := --add-exports >>> java.base/sun.security.util=ALL-UNNAMED --enabl

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

2022-03-24 Thread Jorn Vernee
On Thu, 24 Mar 2022 19:19:34 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://openjd

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

2022-03-24 Thread Jorn Vernee
On Thu, 24 Mar 2022 18:35:12 GMT, Jorn Vernee wrote: >> Sure, this is problematic - but at the same time I don't think there's a >> better way to deal with this? I'd prefer to defer this to a separate issue >> (and I think the build team is in a much better pos

Re: RFR: 8283060: RawNativeLibraries should allow multiple clients to load/unload the same library

2022-03-30 Thread Jorn Vernee
On Tue, 29 Mar 2022 20:05:50 GMT, Mandy Chung wrote: > A small improvement to `RawNativeLibraries`. `RawNativeLibraries::load` > returns the same `NativeLibrary` instance of a given path if it's called > multiple times. This means that multiple clients have to coordinate that the > last one

Re: RFR: 8283689: Update the foreign linker VM implementation [v3]

2022-04-12 Thread Jorn Vernee
300c5ffa16fed805b62ed9092120 > [6]: > https://github.com/openjdk/jdk/pull/7959/commits/08e22e1b468c5c8f0cfd7135c72849944068aa7a > [7]: > https://github.com/openjdk/jdk/pull/7959/commits/451cd9edf54016c182dab21a8b26bd8b609fc062 > [8]: > https://github.com/openjdk/jdk/pull/7959/commits/4c851d2795afafec3a3ab17f4142e

Re: RFR: 8285633: Take better advantage of generic MethodType cache

2022-04-26 Thread Jorn Vernee
On Tue, 26 Apr 2022 10:57:04 GMT, Claes Redestad wrote: > The `MethodType.genericMethodType` methods provide convenience methods for > certain common method types and also provide `@Stable` cache that allows for > constant folding. This patch enhances the more generic `methodType` methods > to

Re: RFR: 8285633: Take better advantage of generic MethodType cache

2022-04-26 Thread Jorn Vernee
On Tue, 26 Apr 2022 17:20:55 GMT, Claes Redestad wrote: >> test/micro/org/openjdk/bench/java/lang/invoke/MethodTypeAcquire.java line >> 104: >> >>> 102: @Benchmark >>> 103: public MethodType testMultiPType_ObjectOnly() { >>> 104: return MethodType.methodType(Object.class, Object

Re: RFR: 8283689: Update the foreign linker VM implementation [v4]

2022-05-07 Thread Jorn Vernee
300c5ffa16fed805b62ed9092120 > [6]: > https://github.com/openjdk/jdk/pull/7959/commits/08e22e1b468c5c8f0cfd7135c72849944068aa7a > [7]: > https://github.com/openjdk/jdk/pull/7959/commits/451cd9edf54016c182dab21a8b26bd8b609fc062 > [8]: > https://github.com/openjdk/jdk/pull/7959/commits/4c851d2795afafec3a3ab17f4142

Re: RFR: 8283689: Update the foreign linker VM implementation [v5]

2022-05-07 Thread Jorn Vernee
300c5ffa16fed805b62ed9092120 > [6]: > https://github.com/openjdk/jdk/pull/7959/commits/08e22e1b468c5c8f0cfd7135c72849944068aa7a > [7]: > https://github.com/openjdk/jdk/pull/7959/commits/451cd9edf54016c182dab21a8b26bd8b609fc062 > [8]: > https://github.com/openjdk/jdk/pull/7959/commits/4c851d2795afafec3a3ab17f4142e

Re: RFR: 8283689: Update the foreign linker VM implementation [v6]

2022-05-07 Thread Jorn Vernee
300c5ffa16fed805b62ed9092120 > [6]: > https://github.com/openjdk/jdk/pull/7959/commits/08e22e1b468c5c8f0cfd7135c72849944068aa7a > [7]: > https://github.com/openjdk/jdk/pull/7959/commits/451cd9edf54016c182dab21a8b26bd8b609fc062 > [8]: > https://github.com/openjdk/jdk/pull/7959/commits/4c851d2795afafec3a3ab17f4142e

Re: RFR: 8283689: Update the foreign linker VM implementation [v4]

2022-05-07 Thread Jorn Vernee
On Sat, 7 May 2022 12:51:12 GMT, Jorn Vernee wrote: >> Hi, >> >> This PR updates the VM implementation of the foreign linker, by bringing >> over commits from the panama-foreign repo. >> >> This is split off from the main JEP integration for 19, since we

Re: RFR: 8283689: Update the foreign linker VM implementation [v7]

2022-05-09 Thread Jorn Vernee
300c5ffa16fed805b62ed9092120 > [6]: > https://github.com/openjdk/jdk/pull/7959/commits/08e22e1b468c5c8f0cfd7135c72849944068aa7a > [7]: > https://github.com/openjdk/jdk/pull/7959/commits/451cd9edf54016c182dab21a8b26bd8b609fc062 > [8]: > https://github.com/openjdk/jdk/pull/7959/commits/4c851d2795afafec3a3ab17f4142

Re: RFR: 8283689: Update the foreign linker VM implementation [v7]

2022-05-11 Thread Jorn Vernee
On Tue, 10 May 2022 18:44:01 GMT, Vladimir Ivanov wrote: >> Jorn Vernee has updated the pull request with a new target base due to a >> merge or a rebase. The pull request now contains 21 commits: >> >> - Merge branch 'foreign-preview-m' into JEP

Re: RFR: 8283689: Update the foreign linker VM implementation [v7]

2022-05-11 Thread Jorn Vernee
On Tue, 10 May 2022 18:48:08 GMT, Vladimir Ivanov wrote: >> Jorn Vernee has updated the pull request with a new target base due to a >> merge or a rebase. The pull request now contains 21 commits: >> >> - Merge branch 'foreign-preview-m' into JEP

Re: RFR: 8283689: Update the foreign linker VM implementation [v7]

2022-05-11 Thread Jorn Vernee
On Tue, 10 May 2022 18:55:03 GMT, Vladimir Ivanov wrote: >> Jorn Vernee has updated the pull request with a new target base due to a >> merge or a rebase. The pull request now contains 21 commits: >> >> - Merge branch 'foreign-preview-m' into JEP

Re: RFR: 8283689: Update the foreign linker VM implementation [v7]

2022-05-11 Thread Jorn Vernee
On Tue, 10 May 2022 19:16:35 GMT, Vladimir Ivanov wrote: >> Jorn Vernee has updated the pull request with a new target base due to a >> merge or a rebase. The pull request now contains 21 commits: >> >> - Merge branch 'foreign-preview-m' into JEP

Re: RFR: 8283689: Update the foreign linker VM implementation [v7]

2022-05-11 Thread Jorn Vernee
On Tue, 10 May 2022 19:21:58 GMT, Vladimir Ivanov wrote: >> Jorn Vernee has updated the pull request with a new target base due to a >> merge or a rebase. The pull request now contains 21 commits: >> >> - Merge branch 'foreign-preview-m' into JEP

Re: RFR: 8283689: Update the foreign linker VM implementation [v7]

2022-05-11 Thread Jorn Vernee
On Tue, 10 May 2022 20:30:09 GMT, Vladimir Ivanov wrote: >> Jorn Vernee has updated the pull request with a new target base due to a >> merge or a rebase. The pull request now contains 21 commits: >> >> - Merge branch 'foreign-preview-m' into JEP

Re: RFR: 8283689: Update the foreign linker VM implementation [v7]

2022-05-11 Thread Jorn Vernee
On Tue, 10 May 2022 20:48:47 GMT, Vladimir Ivanov wrote: >> Jorn Vernee has updated the pull request with a new target base due to a >> merge or a rebase. The pull request now contains 21 commits: >> >> - Merge branch 'foreign-preview-m' into JEP

Re: RFR: 8283689: Update the foreign linker VM implementation [v7]

2022-05-11 Thread Jorn Vernee
On Tue, 10 May 2022 21:01:48 GMT, Vladimir Ivanov wrote: >> Jorn Vernee has updated the pull request with a new target base due to a >> merge or a rebase. The pull request now contains 21 commits: >> >> - Merge branch 'foreign-preview-m' into JEP

Re: RFR: 8283689: Update the foreign linker VM implementation [v7]

2022-05-11 Thread Jorn Vernee
On Wed, 11 May 2022 10:51:10 GMT, Jorn Vernee wrote: >> src/hotspot/cpu/x86/foreign_globals_x86.hpp line 30: >> >>> 28: #include "utilities/growableArray.hpp" >>> 29: >>> 30: class outputStream; >> >> Redundant declar

Re: RFR: 8283689: Update the foreign linker VM implementation [v7]

2022-05-11 Thread Jorn Vernee
On Tue, 10 May 2022 20:45:02 GMT, Vladimir Ivanov wrote: >> Jorn Vernee has updated the pull request with a new target base due to a >> merge or a rebase. The pull request now contains 21 commits: >> >> - Merge branch 'foreign-preview-m' into JEP

Re: RFR: 8283689: Update the foreign linker VM implementation [v7]

2022-05-11 Thread Jorn Vernee
On Tue, 10 May 2022 20:53:37 GMT, Vladimir Ivanov wrote: >> src/hotspot/share/utilities/growableArray.hpp line 151: >> >>> 149: return _data; >>> 150: } >>> 151: >> >> This accessor is added to be able to temporarily view a stable GrowableArray >> instance as a C-style array. It is used

Re: RFR: 8283689: Update the foreign linker VM implementation [v8]

2022-05-11 Thread Jorn Vernee
300c5ffa16fed805b62ed9092120 > [6]: > https://github.com/openjdk/jdk/pull/7959/commits/08e22e1b468c5c8f0cfd7135c72849944068aa7a > [7]: > https://github.com/openjdk/jdk/pull/7959/commits/451cd9edf54016c182dab21a8b26bd8b609fc062 > [8]: > https://github.com/openjdk/jdk/pull/7959/commits/4c851d2795afafec3a3ab17f4142ee

Re: RFR: 8283689: Update the foreign linker VM implementation [v7]

2022-05-11 Thread Jorn Vernee
On Tue, 10 May 2022 21:02:39 GMT, Vladimir Ivanov wrote: >> Jorn Vernee has updated the pull request with a new target base due to a >> merge or a rebase. The pull request now contains 21 commits: >> >> - Merge branch 'foreign-preview-m' into JEP

Re: RFR: 8283689: Update the foreign linker VM implementation [v7]

2022-05-11 Thread Jorn Vernee
On Wed, 11 May 2022 11:06:51 GMT, Jorn Vernee wrote: >> src/hotspot/share/opto/callGenerator.cpp line 1131: >> >>> 1129: >>> 1130: case vmIntrinsics::_linkToNative: >>> 1131: print_inlining_failure(C, callee, jvms->depth() - 1, jvms->bci(),

<    1   2   3   4   >