Withdrawn: 8330755: ProblemList files have entries referring to non-existent tests

2024-05-13 Thread Doug Simon
On Sun, 21 Apr 2024 22:00:52 GMT, Doug Simon wrote: > This PR adds a check for the format of ProblemList files and ensures they > only have entries referring to existing tests. > > The cleanups in the second commit of this PR were done based on the output of > `CheckProblemLis

Re: RFR: 8330755: ProblemList files have entries referring to non-existent tests [v2]

2024-05-13 Thread Doug Simon
On Wed, 24 Apr 2024 10:50:44 GMT, Doug Simon wrote: >> This PR adds a check for the format of ProblemList files and ensures they >> only have entries referring to existing tests. >> >> The cleanups in the second commit of this PR were done based on the output

Re: RFR: 8330755: ProblemList files have entries referring to non-existent tests [v2]

2024-04-24 Thread Doug Simon
On Wed, 24 Apr 2024 13:14:02 GMT, Ludvig Janiuk wrote: > While not a blocker IMO, I'm curious about the issues for the removed lines. > Taking the first one as an example, I see it's "unresolved" (JDK-8192647) but > the file was removed in JDK-8289764. I don't see any other mentions of >

Re: RFR: 8330755: ProblemList files have entries referring to non-existent tests

2024-04-24 Thread Doug Simon
On Sun, 21 Apr 2024 22:00:52 GMT, Doug Simon wrote: > This PR adds a check for the format of ProblemList files and ensures they > only have entries referring to existing tests. > > The cleanups in the second commit of this PR were done based on the output of > `CheckProblemLis

Re: RFR: 8330755: ProblemList files have entries referring to non-existent tests [v2]

2024-04-24 Thread Doug Simon
cibilityTest.java 000 generic-all > > /Users/dnsimon/dev/jdk-jdk/open/test/jdk/ProblemList.txt:516: > java/lang/management/MemoryMXBean/PendingAllGC.sh does not exist under any > test root > java/lang/management/MemoryMXBean/PendingAllGC.sh 8158837 > gener

Re: RFR: JDK-8329564: [JVMCI] TranslatedException::debugPrintStackTrace does not work in the libjvmci compiler. [v3]

2024-04-03 Thread Doug Simon
On Wed, 3 Apr 2024 19:57:21 GMT, Tomáš Zezula wrote: >> Problem: >> The debugging stack traces in `jdk.internal.vm.TranslatedException` do not >> work in libjvmci because they are enabled via the >> `jdk.internal.vm.TranslatedException.debug` system property. However, >> HotSpot system

Re: RFR: JDK-8329564: [JVMCI] TranslatedException::debugPrintStackTrace does not work in the libjvmci compiler. [v2]

2024-04-03 Thread Doug Simon
On Wed, 3 Apr 2024 13:58:23 GMT, Tomáš Zezula wrote: >> Problem: >> The debugging stack traces in `jdk.internal.vm.TranslatedException` do not >> work in libjvmci because they are enabled via the >> `jdk.internal.vm.TranslatedException.debug` system property. However, >> HotSpot system

Re: RFR: 8329331: Intrinsify Unsafe::setMemory [v2]

2024-04-02 Thread Doug Simon
On Mon, 1 Apr 2024 21:30:19 GMT, Scott Gibbons wrote: >> This code makes an intrinsic stub for `Unsafe::setMemory`. See [this >> PR](https://github.com/openjdk/jdk/pull/16760) for discussion around this >> change. >> >> Overall, making this an intrinsic improves overall performance of >>

Withdrawn: 8327176: UnreferencedExecutor.java can fail on libgraal with -Xcomp

2024-03-21 Thread Doug Simon
On Sun, 3 Mar 2024 17:01:53 GMT, Doug Simon wrote: > The `java/util/concurrent/Executors/UnreferencedExecutor.java` test can fail > when run on libgraal and `-Xcomp` is specified. The problem is that libgraal > in `-Xcomp` temporarily causes some extra memory pressure (probably due t

Re: RFR: 8327176: UnreferencedExecutor.java can fail on libgraal with -Xcomp

2024-03-21 Thread Doug Simon
On Sun, 3 Mar 2024 17:03:51 GMT, Doug Simon wrote: >> The `java/util/concurrent/Executors/UnreferencedExecutor.java` test can fail >> when run on libgraal and `-Xcomp` is specified. The problem is that libgraal >> in `-Xcomp` temporarily causes some extra memory pres

Re: RFR: 8327176: UnreferencedExecutor.java can fail on libgraal with -Xcomp

2024-03-19 Thread Doug Simon
On Sun, 3 Mar 2024 17:01:53 GMT, Doug Simon wrote: > The `java/util/concurrent/Executors/UnreferencedExecutor.java` test can fail > when run on libgraal and `-Xcomp` is specified. The problem is that libgraal > in `-Xcomp` temporarily causes some extra memory pressure (probably due t

RFR: 8327176: UnreferencedExecutor.java can fail on libgraal with -Xcomp

2024-03-19 Thread Doug Simon
The `java/util/concurrent/Executors/UnreferencedExecutor.java` test can fail when run on libgraal and `-Xcomp` is specified. The problem is that libgraal in `-Xcomp` temporarily causes some extra memory pressure (probably due to [JDK-8310218](https://bugs.openjdk.org/browse/JDK-8310218)) which

Withdrawn: 8323832: Load JVMCI with the platform class loader

2024-01-24 Thread Doug Simon
On Mon, 22 Jan 2024 17:34:16 GMT, Doug Simon wrote: > This PR changes `jdk.internal.vm.ci` such that it is loaded by the platform > class loader instead of the boot class loader. This allows Native Image to > load a version of JVMCI different than the version on top of which Native

Re: RFR: 8323832: Load JVMCI with the platform class loader [v2]

2024-01-24 Thread Doug Simon
On Tue, 23 Jan 2024 19:16:49 GMT, Doug Simon wrote: >> This PR changes `jdk.internal.vm.ci` such that it is loaded by the platform >> class loader instead of the boot class loader. This allows Native Image to >> load a version of JVMCI different than the version on t

Re: RFR: 8323832: Load JVMCI with the platform class loader [v2]

2024-01-24 Thread Doug Simon
On Wed, 24 Jan 2024 12:16:44 GMT, xxDark wrote: > You need to check if class is already loaded by trying findLoadedClass first. You're right. I had forgotten the intricacies of class loader delegation. The only hard constraint on loading a class in multiple loaders is that `java.*` classes

Re: RFR: 8323832: Load JVMCI with the platform class loader [v2]

2024-01-24 Thread Doug Simon
On Wed, 24 Jan 2024 06:11:30 GMT, David Holmes wrote: > I'm still puzzled by the need to do this as any non-delegating classloader > would have allowed this even if JVMCI were loaded by the bootloader. As far as I understand, even a non-delegating classloader cannot redefine a class loaded by

Re: RFR: 8323832: Load JVMCI with the platform class loader [v2]

2024-01-24 Thread Doug Simon
On Wed, 24 Jan 2024 06:07:55 GMT, David Holmes wrote: >> Doug Simon has updated the pull request incrementally with one additional >> commit since the last revision: >> >> use null to denote boot class loader as delegation parent > > tes

Re: RFR: 8323832: Load JVMCI with the platform class loader

2024-01-23 Thread Doug Simon
On Tue, 23 Jan 2024 17:00:20 GMT, xxDark wrote: > Passing `null` as parent class loader would suffice as boot loader just uses > `findBootstrapClassOrNull` in `JavaLangAccess` either way Thanks! I've simplified the test accordingly: 1642276ea22a5d789e01a5ecb1059d8c5c8be284 - PR

Re: RFR: 8323832: Load JVMCI with the platform class loader [v2]

2024-01-23 Thread Doug Simon
d and tested by > `LoadAlternativeJVMCI.java`. Doug Simon has updated the pull request incrementally with one additional commit since the last revision: use null to denote boot class loader as delegation parent - Changes: - all: https://git.openjdk.org/jdk/pull/17520/files

Re: RFR: 8323832: Load JVMCI with the platform class loader

2024-01-23 Thread Doug Simon
On Mon, 22 Jan 2024 17:34:16 GMT, Doug Simon wrote: > This PR changes `jdk.internal.vm.ci` such that it is loaded by the platform > class loader instead of the boot class loader. This allows Native Image to > load a version of JVMCI different than the version on top of which Native

RFR: 8323832: Load JVMCI with the platform class loader

2024-01-23 Thread Doug Simon
This PR changes `jdk.internal.vm.ci` such that it is loaded by the platform class loader instead of the boot class loader. This allows Native Image to load a version of JVMCI different than the version on top of which Native Image is running. This capability is demonstrated and tested by

Re: RFR: 8315680: java/lang/ref/ReachabilityFenceTest.java should run with -Xbatch

2023-11-07 Thread Doug Simon
On Tue, 3 Oct 2023 07:47:30 GMT, Gergö Barany wrote: > This test requires certain methods to be compiled, but without `-Xbatch` the > compiler races against the test code, which can lead to intermittent failures. @PaulSandoz do you see any problem with this change? Adding `-Xbatch` does not

Re: RFR: 8315680: java/lang/ref/ReachabilityFenceTest.java should run with -Xbatch

2023-11-06 Thread Doug Simon
On Tue, 3 Oct 2023 07:47:30 GMT, Gergö Barany wrote: > This test requires certain methods to be compiled, but without `-Xbatch` the > compiler races against the test code, which can lead to intermittent failures. Marked as reviewed by dnsimon (Reviewer). - PR Review:

Re: RFR: 8318586: Explicitly handle upcall stub allocation failure [v2]

2023-10-26 Thread Doug Simon
On Wed, 25 Oct 2023 10:10:57 GMT, Jorn Vernee wrote: >> Explicitly handle UpcallStub allocation failures by terminating. We >> currently might try to use the returned `nullptr` which would fail sooner or >> later. This patch just makes the termination explicit. > > Jorn Vernee has updated the

Integrated: 8318027: Support alternative name to jdk.internal.vm.compiler

2023-10-23 Thread Doug Simon
On Fri, 13 Oct 2023 16:28:19 GMT, Doug Simon wrote: > The Graal code base has > [renamed](https://github.com/oracle/graal/commit/1e41203d10db321f86723eac90f6cd0573b08b33) > its module to `jdk.compiler.graal` as part of preparations for Project > Galahad. Due to the way Java

Re: RFR: 8318027: Support alternative name to jdk.internal.vm.compiler [v4]

2023-10-23 Thread Doug Simon
On Sat, 21 Oct 2023 10:56:01 GMT, Doug Simon wrote: >> The Graal code base has >> [renamed](https://github.com/oracle/graal/commit/1e41203d10db321f86723eac90f6cd0573b08b33) >> its module to `jdk.compiler.graal` as part of preparations for Project >> Galahad. Due to t

Re: RFR: 8318027: Support alternative name to jdk.internal.vm.compiler [v4]

2023-10-21 Thread Doug Simon
On Sat, 21 Oct 2023 10:56:01 GMT, Doug Simon wrote: >> The Graal code base has >> [renamed](https://github.com/oracle/graal/commit/1e41203d10db321f86723eac90f6cd0573b08b33) >> its module to `jdk.compiler.graal` as part of preparations for Project >> Galahad. Due to t

Re: RFR: 8318027: Support alternative name to jdk.internal.vm.compiler [v4]

2023-10-21 Thread Doug Simon
b8eb/src/jdk.internal.vm.ci/share/classes/module-info.java#L28) > and so the binding fails for the new Graal module. To address this, this PR > reflects the Graal module rena ming, including adjusting the qualified export. Doug Simon has updated the pull request with a new target base due t

Re: RFR: 8318027: Support alternative name to jdk.internal.vm.compiler [v2]

2023-10-20 Thread Doug Simon
On Fri, 20 Oct 2023 15:32:55 GMT, Doug Simon wrote: >> The Graal code base has >> [renamed](https://github.com/oracle/graal/commit/1e41203d10db321f86723eac90f6cd0573b08b33) >> its module to `jdk.compiler.graal` as part of preparations for Project >> Galahad. Due to t

Re: RFR: 8318027: Support alternative name to jdk.internal.vm.compiler [v3]

2023-10-20 Thread Doug Simon
b8eb/src/jdk.internal.vm.ci/share/classes/module-info.java#L28) > and so the binding fails for the new Graal module. To address this, this PR > reflects the Graal module rena ming, including adjusting the qualified export. Doug Simon has updated the pull request incrementally with one additional

Re: RFR: 8318027: Support alternative name to jdk.internal.vm.compiler [v2]

2023-10-20 Thread Doug Simon
b8eb/src/jdk.internal.vm.ci/share/classes/module-info.java#L28) > and so the binding fails for the new Graal module. To address this, this PR > reflects the Graal module rena ming, including adjusting the qualified export. Doug Simon has updated the pull request incrementally with one additional

Re: RFR: 8318027: Support alternative name to jdk.internal.vm.compiler

2023-10-20 Thread Doug Simon
On Fri, 20 Oct 2023 14:27:43 GMT, Vladimir Kozlov wrote: > Why you replaced pair of copyright years with one year in module-info.Java > files? Instead of updating last year only. Why also update 'since' there? > Even if you changed location these files existed already. The files may be

RFR: 8318027: Support alternative name to jdk.internal.vm.compiler

2023-10-20 Thread Doug Simon
The Graal code base has [renamed](https://github.com/oracle/graal/commit/1e41203d10db321f86723eac90f6cd0573b08b33) its module to `jdk.compiler.graal` as part of preparations for Project Galahad. Due to the way Java modules work, this requires a JDK change. The core of the issue is that the

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

2023-09-28 Thread Doug Simon
On Tue, 17 May 2022 15:53:05 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 have >> limited resources to handle

Re: RFR: 8309191: Reduce JDK dependencies of cgroup support

2023-08-16 Thread Doug Simon
On Tue, 30 May 2023 13:03:27 GMT, Aleksandar Pejovic wrote: > The current code for cgroup support in the JDK has large and expensive > dependencies: it uses NIO, streams, and regular expressions. This leads to > unnecessary class loading and slows down startup, especially when the code is >

Re: RFR: 8309191: Reduce JDK dependencies of cgroup support

2023-08-16 Thread Doug Simon
On Thu, 1 Jun 2023 10:25:49 GMT, Severin Gehwolf wrote: > I'm concerned about the hard-coding of delimiter values and the added > accidential complexity in order to avoid the Regex engine. Note that this > test fails due to the delimiter hard-coding: > > ``` >

Re: RFR: 8313899: JVMCI exception Translation can fail in TranslatedException. [v2]

2023-08-10 Thread Doug Simon
On Thu, 10 Aug 2023 13:56:37 GMT, Doug Simon wrote: >> In a test that stresses metaspace (such as >> `vmTestbase/vm/mlvm/hiddenloader/stress/oome/metaspace/Test.java`) that also >> uses `-Xcomp -XX:-TieredCompilation`, we've seen a failure in >> `TranslatedExce

Integrated: 8313899: JVMCI exception Translation can fail in TranslatedException.

2023-08-10 Thread Doug Simon
On Tue, 8 Aug 2023 20:52:29 GMT, Doug Simon wrote: > In a test that stresses metaspace (such as > `vmTestbase/vm/mlvm/hiddenloader/stress/oome/metaspace/Test.java`) that also > uses `-Xcomp -XX:-TieredCompilation`, we've seen a failure in > `TranslatedException.` due to exhaust

Re: RFR: 8313899: JVMCI exception Translation can fail in TranslatedException. [v2]

2023-08-10 Thread Doug Simon
be tested in libgraal. The test itself is not included as > libgraal is not part of OpenJDK. Doug Simon has updated the pull request incrementally with two additional commits since the last revision: - guard test-only code with ASSERT instead of !PRODUCT - omit test-only code in product build

Re: RFR: 8313899: JVMCI exception Translation can fail in TranslatedException.

2023-08-10 Thread Doug Simon
On Tue, 8 Aug 2023 20:52:29 GMT, Doug Simon wrote: > In a test that stresses metaspace (such as > `vmTestbase/vm/mlvm/hiddenloader/stress/oome/metaspace/Test.java`) that also > uses `-Xcomp -XX:-TieredCompilation`, we've seen a failure in > `TranslatedException.` due to exhaust

RFR: 8313899: JVMCI exception Translation can fail in TranslatedException.

2023-08-09 Thread Doug Simon
In a test that stresses metaspace (such as `vmTestbase/vm/mlvm/hiddenloader/stress/oome/metaspace/Test.java`) that also uses `-Xcomp -XX:-TieredCompilation`, we've seen a failure in `TranslatedException.` due to exhausted metaspace: java.lang.OutOfMemoryError: Metaspace at

Integrated: 8309390: [JVMCI] improve copying system properties into libgraal

2023-06-13 Thread Doug Simon
On Fri, 2 Jun 2023 20:32:14 GMT, Doug Simon wrote: > This PR reduces the amount of code executed during libgraal initialization. > This not only improves VM startup overall but all fixes a number of JDK test > failures that are caused by Java code executing "too early". Fo

Re: RFR: 8309390: [JVMCI] improve copying system properties into libgraal [v5]

2023-06-13 Thread Doug Simon
On Mon, 12 Jun 2023 18:55:42 GMT, Doug Simon wrote: >> This PR reduces the amount of code executed during libgraal initialization. >> This not only improves VM startup overall but all fixes a number of JDK test >> failures that are caused by Java code executing "

Re: RFR: 8309390: [JVMCI] improve copying system properties into libgraal [v5]

2023-06-12 Thread Doug Simon
user 0.01 sys > 0.05 real 0.03 user 0.01 sys > 0.05 real 0.03 user 0.01 sys > 0.05 real 0.03 user 0.01 sys > 0.05 real 0.03 user 0.01 sys > > > (3) Eagerly initialize libgraal (

Re: RFR: 8309390: [JVMCI] improve copying system properties into libgraal [v3]

2023-06-12 Thread Doug Simon
On Mon, 12 Jun 2023 03:00:23 GMT, Tom Rodriguez wrote: >> Doug Simon has updated the pull request with a new target base due to a >> merge or a rebase. The pull request now contains one commit: >> >> copy system properties into libgraal more efficiently > >

Re: RFR: 8309390: [JVMCI] improve copying system properties into libgraal [v4]

2023-06-12 Thread Doug Simon
user 0.01 sys > 0.05 real 0.03 user 0.01 sys > 0.05 real 0.03 user 0.01 sys > 0.05 real 0.03 user 0.01 sys > 0.05 real 0.03 user 0.01 sys > > > (3) Eagerly initialize libgra

Re: RFR: 8309390: [JVMCI] improve copying system properties into libgraal [v3]

2023-06-11 Thread Doug Simon
01 sys > 0.08 real 0.07 user 0.01 sys > 0.10 real 0.07 user 0.01 sys > 0.08 real 0.06 user 0.01 sys > 0.10 real 0.07 user 0.01 sys > 0.08 real 0.07 user 0.01 sys >

Withdrawn: 8309390: [JVMCI] improve copying system properties into libgraal

2023-06-10 Thread Doug Simon
On Fri, 2 Jun 2023 20:32:14 GMT, Doug Simon wrote: > This PR improves the startup time for libgraal by speeding up how > `VM.savedProps` is copied into libgraal. This data structure is now > serialized to a native buffer directly from C++ and the native buffer is then > dire

Re: RFR: 8309303: jdk/internal/misc/VM/RuntimeArguments test ignores jdk/internal/vm/options

2023-06-08 Thread Doug Simon
On Thu, 8 Jun 2023 18:56:28 GMT, Mandy Chung wrote: > The `RuntimeArguments` test verifies the VM arguments returned by > `jdk.internal.misc.VM::getRuntimeArguments` as expected.This test fails > when running with GraalVM as it was created with `jlink --add-options` and > the application

Re: RFR: 8309303: jdk/internal/misc/VM/RuntimeArguments test ignores jdk/internal/vm/options

2023-06-08 Thread Doug Simon
On Thu, 8 Jun 2023 18:56:28 GMT, Mandy Chung wrote: > The `RuntimeArguments` test verifies the VM arguments returned by > `jdk.internal.misc.VM::getRuntimeArguments` as expected.This test fails > when running with GraalVM as it was created with `jlink --add-options` and > the application

Re: RFR: 8309390: [JVMCI] improve copying system properties into libgraal [v2]

2023-06-07 Thread Doug Simon
On Wed, 7 Jun 2023 22:51:48 GMT, Doug Simon wrote: >> This PR improves the startup time for libgraal by speeding up how >> `VM.savedProps` is copied into libgraal. This data structure is now >> serialized to a native buffer directly from C++ and the native buffer is >&g

Re: RFR: 8309390: [JVMCI] improve copying system properties into libgraal

2023-06-07 Thread Doug Simon
On Fri, 2 Jun 2023 20:32:14 GMT, Doug Simon wrote: > This PR improves the startup time for libgraal by speeding up how > `VM.savedProps` is copied into libgraal. This data structure is now > serialized to a native buffer directly from C++ and the native buffer is then > dire

Re: RFR: 8309390: [JVMCI] improve copying system properties into libgraal [v2]

2023-06-07 Thread Doug Simon
01 sys > 0.08 real 0.07 user 0.01 sys > 0.10 real 0.07 user 0.01 sys > 0.08 real 0.06 user 0.01 sys > 0.10 real 0.07 user 0.01 sys > 0.08 real 0.07 user 0.01 sys >

Re: RFR: 8309390: [JVMCI] improve copying system properties into libgraal

2023-06-06 Thread Doug Simon
On Mon, 5 Jun 2023 18:58:36 GMT, Tom Rodriguez wrote: > I don't really love the hard code parsing of the HashMap. What properties are > actually required for JVMCI? It seems to me that the contents of > Arguments::system_properties() should contain all the properties we want to > advertise to

Re: RFR: 8309501: Remove workaround in bin/idea.sh for non standard JVMCI file layout

2023-06-05 Thread Doug Simon
On Mon, 5 Jun 2023 19:12:52 GMT, Tom Rodriguez wrote: > This allows bin/idea.sh to properly see the JVMCI files again. Marked as reviewed by dnsimon (Committer). Finally ;-) - PR Review: https://git.openjdk.org/jdk/pull/14318#pullrequestreview-1463296723 PR Comment:

Re: RFR: 8309390: [JVMCI] improve copying system properties into libgraal

2023-06-03 Thread Doug Simon
On Fri, 2 Jun 2023 20:32:14 GMT, Doug Simon wrote: > This PR improves the startup time for libgraal by speeding up how > `VM.savedProps` is copied into libgraal. This data structure is now > serialized to a native buffer directly from C++ and the native buffer is then > dire

RFR: 8309390: [JVMCI] improve copying system properties into libgraal

2023-06-03 Thread Doug Simon
This PR improves the startup time for libgraal by speeding up how `VM.savedProps` is copied into libgraal. This data structure is now serialized to a native buffer directly from C++ and the native buffer is then directly decoded by libgraal. ## Times The basic benchmarking below shows that

Re: RFR: 8309241: ClassForNameLeak fails intermittently as the class loader hasn't been unloaded

2023-06-01 Thread Doug Simon
On Thu, 1 Jun 2023 18:19:14 GMT, Mandy Chung wrote: > Convert `ClassForNameLeak` test to use `jdk.test.lib.util.ForceGC` that would > be more reliable in waiting for the class loader to be unloaded. Marked as reviewed by dnsimon (Committer). - PR Review:

Re: RFR: 8307194: Enhance static-libs-image

2023-05-03 Thread Doug Simon
On Wed, 3 May 2023 13:34:12 GMT, Erik Joelsson wrote: > The current target user of the .a libraries is GraalVM, so we should check > with them that the changes to the contents of the `.a` files isn't impacting > them in a bad way. @dougxc what do you think? Thanks for the heads up - I've

Re: RFR: 8303431: [JVMCI] libgraal annotation API [v9]

2023-04-20 Thread Doug Simon
On Tue, 18 Apr 2023 07:27:47 GMT, Doug Simon wrote: >> This PR extends JVMCI with new API (`jdk.vm.ci.meta.Annotated`) for >> accessing annotations. The main differences from >> `java.lang.reflect.AnnotatedElement` are: >> * All methods in the `Annotated` interface expl

Integrated: 8303431: [JVMCI] libgraal annotation API

2023-04-19 Thread Doug Simon
On Wed, 1 Mar 2023 18:07:34 GMT, Doug Simon wrote: > This PR extends JVMCI with new API (`jdk.vm.ci.meta.Annotated`) for accessing > annotations. The main differences from `java.lang.reflect.AnnotatedElement` > are: > * All methods in the `Annotated` interface explicitly speci

Re: RFR: 8303431: [JVMCI] libgraal annotation API [v9]

2023-04-19 Thread Doug Simon
On Tue, 18 Apr 2023 07:27:47 GMT, Doug Simon wrote: >> This PR extends JVMCI with new API (`jdk.vm.ci.meta.Annotated`) for >> accessing annotations. The main differences from >> `java.lang.reflect.AnnotatedElement` are: >> * All methods in the `Annotated` interface expl

Re: RFR: 8303431: [JVMCI] libgraal annotation API [v7]

2023-04-18 Thread Doug Simon
On Tue, 18 Apr 2023 02:22:11 GMT, Joe Darcy wrote: > I think the code should reject it The `AnnotationData` constructor already has a check for unknown annotation element types so I think this concern is covered. > leaving some bread crumb comments to future maintainers of core reflection >

Re: RFR: 8303431: [JVMCI] libgraal annotation API [v9]

2023-04-18 Thread Doug Simon
gt; LoopExplosionKind.FULL_UNROLL; > case "FULL_UNROLL_UNTIL_RETURN" -> > LoopExplosionKind.FULL_UNROLL_UNTIL_RETURN; > ... > } > > > The implementation relies on new methods in `jdk.internal.vm.VMSupport` for > parsing annotations and serializing/deserializing to/from a byte arr

Re: RFR: 8303431: [JVMCI] libgraal annotation API [v7]

2023-04-18 Thread Doug Simon
On Tue, 18 Apr 2023 01:06:31 GMT, Joe Darcy wrote: >> Just above (line 228) you can see a call to this method where the argument >> comes from `Map.values()` whose type is `Collection` so I'd prefer to leave >> it as is rather than have to convert the argument to a `List`. > > In that case, I

Re: RFR: 8303431: [JVMCI] libgraal annotation API [v8]

2023-04-17 Thread Doug Simon
gt; LoopExplosionKind.FULL_UNROLL; > case "FULL_UNROLL_UNTIL_RETURN" -> > LoopExplosionKind.FULL_UNROLL_UNTIL_RETURN; > ... > } > > > The implementation relies on new methods in `jdk.internal.vm.VMSupport` for > parsing annotations and serializing/deserializing to/from a byte array.

Re: RFR: 8303431: [JVMCI] libgraal annotation API [v7]

2023-04-17 Thread Doug Simon
On Mon, 17 Apr 2023 16:50:47 GMT, Joe Darcy wrote: > the methods should phrase their operations in terms of these concepts... I think this is what you're suggesting: https://github.com/openjdk/jdk/pull/12810/commits/362738a61410cc8d60d8c4c4fc9e3e8ed0393aed - PR Comment:

Re: RFR: 8303431: [JVMCI] libgraal annotation API [v7]

2023-04-17 Thread Doug Simon
On Mon, 17 Apr 2023 16:50:47 GMT, Joe Darcy wrote: > From the long-term perspective, it is likely that the set of kinds of > elements that can occur in an annotation will be expanded, for example, > method references are a repeated request. Easing future maintenance to gives > more

Re: RFR: 8303431: [JVMCI] libgraal annotation API [v7]

2023-04-17 Thread Doug Simon
On Mon, 17 Apr 2023 20:33:26 GMT, Doug Simon wrote: >> src/java.base/share/classes/jdk/internal/vm/VMSupport.java line 234: >> >>> 232: * Encodes a list of annotations to a byte array. The byte array >>> can be decoded with {@link #decodeAnnotations(byte[]

Re: RFR: 8303431: [JVMCI] libgraal annotation API [v7]

2023-04-17 Thread Doug Simon
On Mon, 17 Apr 2023 15:32:56 GMT, Joe Darcy wrote: >> Doug Simon has updated the pull request incrementally with one additional >> commit since the last revision: >> >> [skip ci] formatting fixes > > src/java.base/share/classes/jdk/internal/vm/VMSu

Re: RFR: 8303431: [JVMCI] libgraal annotation API [v7]

2023-04-17 Thread Doug Simon
On Mon, 17 Apr 2023 15:48:53 GMT, Joe Darcy wrote: >> Doug Simon has updated the pull request incrementally with one additional >> commit since the last revision: >> >> [skip ci] formatting fixes > > src/java.base/share/classes/jdk/internal/vm/VMSu

Re: RFR: 8303431: [JVMCI] libgraal annotation API [v7]

2023-03-17 Thread Doug Simon
gt; LoopExplosionKind.FULL_UNROLL; > case "FULL_UNROLL_UNTIL_RETURN" -> > LoopExplosionKind.FULL_UNROLL_UNTIL_RETURN; > ... > } > > > The implementation relies on new methods in `jdk.internal.vm.VMSupport` for > parsing annotations and serializing/deserializing to/from a byte arr

Re: RFR: 8303431: [JVMCI] libgraal annotation API [v6]

2023-03-15 Thread Doug Simon
On Wed, 15 Mar 2023 19:23:52 GMT, Joe Darcy wrote: > I assume https://bugs.openjdk.org/browse/JDK-8303431 recounts the motivation > behind this change? Yes, it does. Thanks in advance. - PR: https://git.openjdk.org/jdk/pull/12810

Re: RFR: 8303431: [JVMCI] libgraal annotation API [v6]

2023-03-15 Thread Doug Simon
On Tue, 14 Mar 2023 16:06:06 GMT, Doug Simon wrote: >> This PR extends JVMCI with new API (`jdk.vm.ci.meta.Annotated`) for >> accessing annotations. The main differences from >> `java.lang.reflect.AnnotatedElement` are: >> * All methods in the `Annotated` interface expl

Re: RFR: 8303431: [JVMCI] libgraal annotation API [v6]

2023-03-14 Thread Doug Simon
gt; LoopExplosionKind.FULL_UNROLL; > case "FULL_UNROLL_UNTIL_RETURN" -> > LoopExplosionKind.FULL_UNROLL_UNTIL_RETURN; > ... > } > > > The implementation relies on new methods in `jdk.internal.vm.VMSupport` for > parsing annotations and serializing/deseriali

Re: RFR: 8303431: [JVMCI] libgraal annotation API [v5]

2023-03-14 Thread Doug Simon
On Tue, 14 Mar 2023 06:28:20 GMT, Tom Rodriguez wrote: >> Doug Simon has updated the pull request with a new target base due to a >> merge or a rebase. The pull request now contains seven commits: >> >> - Merge remote-tracking branch 'openjdk-jdk/master' into JDK-83034

Re: RFR: 8303431: [JVMCI] libgraal annotation API [v5]

2023-03-13 Thread Doug Simon
On Mon, 13 Mar 2023 19:23:39 GMT, Vladimir Kozlov wrote: >> Doug Simon has updated the pull request with a new target base due to a >> merge or a rebase. The pull request now contains seven commits: >> >> - Merge remote-tracking branch 'openjdk-jdk/master' into JD

Re: RFR: 8303431: [JVMCI] libgraal annotation API [v5]

2023-03-08 Thread Doug Simon
gt; LoopExplosionKind.FULL_UNROLL; > case "FULL_UNROLL_UNTIL_RETURN" -> > LoopExplosionKind.FULL_UNROLL_UNTIL_RETURN; > ... > } > > > The implementation relies on new methods in `jdk.internal.vm.VMSupport` for > parsing annotations and serializing/deseriali

Re: RFR: 8303431: [JVMCI] libgraal annotation API [v4]

2023-03-08 Thread Doug Simon
gt; LoopExplosionKind.FULL_UNROLL; > case "FULL_UNROLL_UNTIL_RETURN" -> > LoopExplosionKind.FULL_UNROLL_UNTIL_RETURN; > ... > } > > > The implementation relies on new methods in `jdk.internal.vm.VMSupport` for > parsing annotations and serializing/deseriali

Withdrawn: 8303431: [JVMCI] libgraal annotation API

2023-03-07 Thread Doug Simon
On Wed, 1 Mar 2023 18:07:34 GMT, Doug Simon wrote: > This PR extends JVMCI with new API (`jdk.vm.ci.meta.Annotated`) for accessing > annotations. The main differences from `java.lang.reflect.AnnotatedElement` > are: > * Each `Annotated` method explicitly specifies the annot

Re: RFR: 8303431: [JVMCI] libgraal annotation API [v3]

2023-03-07 Thread Doug Simon
On Sun, 5 Mar 2023 22:37:38 GMT, Doug Simon wrote: >> This PR extends JVMCI with new API (`jdk.vm.ci.meta.Annotated`) for >> accessing annotations. The main differences from >> `java.lang.reflect.AnnotatedElement` are: >> * Each `Annotated` method explicitly specifi

Integrated: 8303577: [JVMCI] OOME causes crash while translating exceptions

2023-03-06 Thread Doug Simon
The message from this sender included one or more files which could not be scanned for virus detection; do not open these files unless you are certain of the sender's intent. -- On Fri, 3 Mar 2023 15:40:01 GMT, Doug Simon wrote

Re: RFR: 8303577: [JVMCI] OOME causes crash while translating exceptions

2023-03-06 Thread Doug Simon
On Fri, 3 Mar 2023 18:05:51 GMT, Vladimir Kozlov wrote: >> JDK-8297431 added code for special handling of OutOfMemoryError when >> translating an exception between libjvmci and HotSpot[1]. >> Unfortunately, this code was deleted by JDK-8298099 when moving the >> exception translation mechanism

Re: RFR: 8303431: [JVMCI] libgraal annotation API [v3]

2023-03-05 Thread Doug Simon
gt; LoopExplosionKind.FULL_UNROLL; > case "FULL_UNROLL_UNTIL_RETURN" -> > LoopExplosionKind.FULL_UNROLL_UNTIL_RETURN; > ... > } > > > The implementation relies on new methods in `jdk.internal.vm.VMSupport` for > parsing annotations and serializing/deseriali

Re: RFR: 8303431: [JVMCI] libgraal annotation API [v2]

2023-03-05 Thread Doug Simon
gt; LoopExplosionKind.FULL_UNROLL; > case "FULL_UNROLL_UNTIL_RETURN" -> > LoopExplosionKind.FULL_UNROLL_UNTIL_RETURN; > ... > } > > > The implementation relies on new methods in `jdk.internal.vm.VMSupport` for > parsing annotations and serializing/deseriali

RFR: 8303577: [JVMCI] OOME causes crash while translating exceptions

2023-03-03 Thread Doug Simon
JDK-8297431 added code for special handling of OutOfMemoryError when translating an exception between libjvmci and HotSpot[1]. Unfortunately, this code was deleted by JDK-8298099 when moving the exception translation mechanism to VMSupport[2]. This causes the VM to crash when an OOME occurs

RFR: 8303431: [JVMCI] libgraal annotation API

2023-03-01 Thread Doug Simon
This PR extends JVMCI with new API (`jdk.vm.ci.meta.Annotated`) for accessing annotations. The main differences from `java.lang.reflect.AnnotatedElement` are: * Each `Annotated` method explicitly specifies the annotation type(s) for which it wants annotation data. That is, there is no direct

Re: RFR: 8302976: C2 intrinsification of Float.floatToFloat16 and Float.float16ToFloat yields different result than the interpreter

2023-02-22 Thread Doug Simon
On Wed, 22 Feb 2023 05:21:48 GMT, Joe Darcy wrote: > That said, I think it is reasonable on a given JVM invocation if > Float.floatToFloat16(f) gave the same result for input f regardless of in > what context it was called. Yes, I'm under the impression that for math API methods like this,

Re: RFR: JDK-8286666: JEP 429: Implementation of Scoped Values (Incubator) [v38]

2023-01-31 Thread Doug Simon
On Tue, 6 Dec 2022 21:14:07 GMT, Andrew Haley wrote: >> JEP 429 implementation. > > Andrew Haley has updated the pull request with a new target base due to a > merge or a rebase. The pull request now contains 71 commits: > > - Merge from JDK mainline > - Add comment > - Merge

Re: RFR: 8298099: [JVMCI] decouple libgraal from JVMCI module at runtime [v7]

2022-12-07 Thread Doug Simon
On Wed, 7 Dec 2022 19:49:47 GMT, Doug Simon wrote: >> Libgraal is compiled ahead of time and should not need any JVMCI Java code >> to be dynamically loaded at runtime. Prior to this PR, this is not the case >> due to: >> >> * Code to copy system pr

Integrated: 8298099: [JVMCI] decouple libgraal from JVMCI module at runtime

2022-12-07 Thread Doug Simon
On Mon, 5 Dec 2022 13:16:25 GMT, Doug Simon wrote: > Libgraal is compiled ahead of time and should not need any JVMCI Java code to > be dynamically loaded at runtime. Prior to this PR, this is not the case due > to: > > * Code to copy system properties from the HotSpot heap in

Re: RFR: 8298099: [JVMCI] decouple libgraal from JVMCI module at runtime [v7]

2022-12-07 Thread Doug Simon
raal but does not include > `jdk.internal.vm.ci` or `jdk.internal.vm.compiler`. This both reduces > footprint and better isolates the JAVMCI and the Graal compiler as accessing > these components from Java code is now impossible. Doug Simon has updated the pull request with a new target base due to a merge o

Re: RFR: 8298099: [JVMCI] decouple libgraal from JVMCI module at runtime [v6]

2022-12-07 Thread Doug Simon
On Wed, 7 Dec 2022 18:42:43 GMT, Alan Bateman wrote: >> Doug Simon has updated the pull request incrementally with four additional >> commits since the last revision: >> >> - formatting to avoid very long lines [skip ci] >> - removed debug code [skip ci] >

Re: RFR: 8298099: [JVMCI] decouple libgraal from JVMCI module at runtime [v5]

2022-12-06 Thread Doug Simon
On Tue, 6 Dec 2022 15:41:20 GMT, Doug Simon wrote: >> src/java.base/share/classes/jdk/internal/vm/VMSupport.java line 66: >> >>> 64: * only contains String keys and values. >>> 65: */ >>> 66: private static byte[] seri

Re: RFR: 8298099: [JVMCI] decouple libgraal from JVMCI module at runtime [v6]

2022-12-06 Thread Doug Simon
raal but does not include > `jdk.internal.vm.ci` or `jdk.internal.vm.compiler`. This both reduces > footprint and better isolates the JAVMCI and the Graal compiler as accessing > these components from Java code is now impossible. Doug Simon has updated the pull request incrementally with four additional commits s

Re: RFR: 8298099: [JVMCI] decouple libgraal from JVMCI module at runtime [v5]

2022-12-06 Thread Doug Simon
On Tue, 6 Dec 2022 13:02:40 GMT, Alan Bateman wrote: >> Doug Simon has updated the pull request incrementally with two additional >> commits since the last revision: >> >> - incorporate review feedback [skip ci] >> - removed hard-coded module name [skip ci] &

Re: RFR: 8298099: [JVMCI] decouple libgraal from JVMCI module at runtime [v5]

2022-12-06 Thread Doug Simon
raal but does not include > `jdk.internal.vm.ci` or `jdk.internal.vm.compiler`. This both reduces > footprint and better isolates the JAVMCI and the Graal compiler as accessing > these components from Java code is now impossible. Doug Simon has updated the pull request incrementally with two additional commits

Re: RFR: 8298099: [JVMCI] decouple libgraal from JVMCI module at runtime [v4]

2022-12-06 Thread Doug Simon
On Tue, 6 Dec 2022 05:28:24 GMT, David Holmes wrote: >> Doug Simon has updated the pull request incrementally with one additional >> commit since the last revision: >> >> renamed is_module_resolvable to is_module_observable > > src/hotspot/share/jvmci

Re: RFR: 8298099: [JVMCI] decouple libgraal from JVMCI module at runtime [v4]

2022-12-05 Thread Doug Simon
raal but does not include > `jdk.internal.vm.ci` or `jdk.internal.vm.compiler`. This both reduces > footprint and better isolates the JAVMCI and the Graal compiler as accessing > these components from Java code is now impossible. Doug Simon has updated the pull request incrementally with one additional commit

Re: RFR: 8298099: [JVMCI] decouple libgraal from JVMCI module at runtime [v2]

2022-12-05 Thread Doug Simon
On Mon, 5 Dec 2022 17:17:16 GMT, Doug Simon wrote: >> Assuming --limit-modules isn't used, it is testing if the module is >> "observable". > > I assume this function should therefore be named `is_module_observable`? How about this: // Determines if

  1   2   >