Re: RFR: 8349624: Validation for slot missing in CodeBuilder local variable instructions

2025-02-10 Thread Adam Sotona
On Fri, 7 Feb 2025 19:40:44 GMT, Chen Liang wrote: > In CodeBuilder, validation for a slot was missing due to concurrent patches, > and the original patch did not add effective tests for CodeBuilder because of > the complex exceptional behaviors. Now the bug is fixed with renames to > prevent

Re: RFR: 8349689: Several virtual thread tests missing /native keyword [v2]

2025-02-10 Thread SendaoYan
> H all, > > This PR add `/native` keyword in the test header for virtual thread tests. > The `/native` keyword will make run the related tests by jtreg standalone > more friendly. > > I runed all the tests without -nativepath argument and find the fail tests. > This will find all the virtual

Re: RFR: 8349763: Expose more ForkJoinPool parameters to configure virtual thread scheduler

2025-02-10 Thread Jiawei Tang
On Tue, 11 Feb 2025 02:36:14 GMT, Jiawei Tang wrote: > Since the parameters `-Djdk.virtualThreadScheduler.parallelism=N` , > `-Djdk.virtualThreadScheduler.maxPoolSize=M`, > `-Djdk.virtualThreadScheduler.minimumRunnable=Y` have already been made > available, it would be worth considering openin

Re: RFR: 8349689: Several virtual thread tests missing /native keyword [v2]

2025-02-10 Thread SendaoYan
On Tue, 11 Feb 2025 07:26:04 GMT, Alan Bateman wrote: >> SendaoYan has updated the pull request incrementally with one additional >> commit since the last revision: >> >> add --enable-native-access=ALL-UNNAMED for >> test/jdk/java/lang/management/ThreadMXBean/VirtualThreads.java#default > >

Re: RFR: 8349763: Expose more ForkJoinPool parameters to configure virtual thread scheduler

2025-02-10 Thread Alan Bateman
On Tue, 11 Feb 2025 02:36:14 GMT, Jiawei Tang wrote: > Since the parameters `-Djdk.virtualThreadScheduler.parallelism=N` , > `-Djdk.virtualThreadScheduler.maxPoolSize=M`, > `-Djdk.virtualThreadScheduler.minimumRunnable=Y` have already been made > available, it would be worth considering openin

Re: RFR: 8349689: Several virtual thread tests missing /native keyword

2025-02-10 Thread Alan Bateman
On Tue, 11 Feb 2025 02:45:11 GMT, SendaoYan wrote: > H all, > > This PR add `/native` keyword in the test header for virtual thread tests. > The `/native` keyword will make run the related tests by jtreg standalone > more friendly. > > I runed all the tests without -nativepath argument and fi

Re: RFR: 8349763: Expose more ForkJoinPool parameters to configure virtual thread scheduler

2025-02-10 Thread Jiawei Tang
On Tue, 11 Feb 2025 06:43:52 GMT, Alan Bateman wrote: > Can you bring the issue to loom-dev to discuss? It might be that some > additional configuration knobs may be useful to expose but I think important > to explain + discuss the issues first. I open a new pr in loom for discussion: https://

Re: RFR: 8349689: Several virtual thread tests missing /native keyword

2025-02-10 Thread Alan Bateman
On Tue, 11 Feb 2025 02:45:11 GMT, SendaoYan wrote: > H all, > > This PR add `/native` keyword in the test header for virtual thread tests. > The `/native` keyword will make run the related tests by jtreg standalone > more friendly. > > I runed all the tests without -nativepath argument and fi

Re: RFR: 8349763: Expose more ForkJoinPool parameters for virtual thread scheduler to reduce startup jitter and improve stability

2025-02-10 Thread Alan Bateman
On Tue, 11 Feb 2025 02:36:14 GMT, Jiawei Tang wrote: > Since the parameters `-Djdk.virtualThreadScheduler.parallelism=N` , > `-Djdk.virtualThreadScheduler.maxPoolSize=M`, > `-Djdk.virtualThreadScheduler.minimumRunnable=Y` have already been made > available, it would be worth considering openin

Re: RFR: 8342103: C2 compiler support for Float16 type and associated scalar operations [v17]

2025-02-10 Thread Jatin Bhateja
On Mon, 10 Feb 2025 20:43:19 GMT, Paul Sandoz wrote: >> Jatin Bhateja has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Fixing typos > > test/jdk/jdk/incubator/vector/ScalarFloat16OperationsTest.java line 44: > >> 42: import static jdk.in

Re: RFR: 8342103: C2 compiler support for Float16 type and associated scalar operations [v18]

2025-02-10 Thread Jatin Bhateja
> Hi All, > > This patch adds C2 compiler support for various Float16 operations added by > [PR#22128](https://github.com/openjdk/jdk/pull/22128) > > Following is the summary of changes included with this patch:- > > 1. Detection of various Float16 operations through inline expansion or > patt

Re: RFR: 8347491: IllegalArgumentationException thrown by ThreadPoolExecutor doesn't have a useful message

2025-02-10 Thread kerr
On Sat, 11 Jan 2025 07:10:53 GMT, He-Pin(kerr) wrote: > Motivation: > When a user passes a wrong parameter, the current implementation throws an > IllegalArgumentException with an error message `null`, which is not helpful. > > Modification: > Add detail error messages. > > Result: > Helpful m

RFR: 8349763: Expose more ForkJoinPool parameters for virtual thread scheduler to reduce startup jitter and improve stability

2025-02-10 Thread Jiawei Tang
Since the parameters `-Djdk.virtualThreadScheduler.parallelism=N` , `-Djdk.virtualThreadScheduler.maxPoolSize=M`, `-Djdk.virtualThreadScheduler.minimumRunnable=Y` have already been made available, it would be worth considering opening up additional ForkJoinPool-related parameters: `-Djdk.virtua

RFR: 8347472: Correct Attribute traversal and writing for Code attributes

2025-02-10 Thread Chen Liang
Make UnknownAttribute and CustomAttribute delivered in code traversal, and make sure stack maps update the label references after a code transform when it is reused. Other code-bound attributes are not updated as they cannot be supplied to a CodeBuilder. Tested the 2 cases in the new Attributes

Re: RFR: 8346954: [JMH] jdk.incubator.vector.MaskedLogicOpts fails due to IndexOutOfBoundsException

2025-02-10 Thread Xiaohong Gong
On Wed, 8 Jan 2025 09:04:47 GMT, Nicole Xu wrote: > Suite MaskedLogicOpts.maskedLogicOperationsLong512() failed on both x86 and > AArch64 with the following error: > > > java.lang.IndexOutOfBoundsException: Index 252 out of bounds for length 249 > > > The variable `long256_arr_idx` is misuse

RFR: 8349689: Several virtual thread tests missing /native keyword

2025-02-10 Thread SendaoYan
H all, This PR add `/native` keyword in the test header for virtual thread tests. The `/native` keyword will make run the related tests by jtreg standalone more friendly. I runed all the tests without -nativepath argument and find the fail tests. This will find all the virtual thread tests whi

RFR: 8342206: Convenience method to check if a constant pool entry matches nominal descriptors

2025-02-10 Thread Chen Liang
The ClassFile API promotes usage of constant nominal descriptors over literal strings. However, for `class` file parsing, currently the efficient way to check if a constant pool entry matches a desired descriptor is via unrolling them back to strings. However, string unrolling is ugly, and often

Re: RFR: 8349620: Add VMProps for static JDK

2025-02-10 Thread Jiangli Zhou
On Mon, 10 Feb 2025 08:21:21 GMT, Alan Bateman wrote: >> Please review this change that adds the `jdk.static` VMProps. It can be used >> to skip tests not for running on static JDK. >> >> This also adds a new WhiteBox native method, >> `jdk.test.whitebox.WhiteBox.isStatic()`, which is used by

Re: RFR: 8344168: Change Unsafe base offset from int to long [v7]

2025-02-10 Thread Doug Simon
On Mon, 10 Feb 2025 18:54:26 GMT, Chen Liang wrote: >> Shaojin Wen has updated the pull request incrementally with one additional >> commit since the last revision: >> >> copyright > > Re dougxc: This migration is specific to the Java language. I am not so sure > about the C++ counterparts,

Re: RFR: 8342103: C2 compiler support for Float16 type and associated scalar operations [v17]

2025-02-10 Thread Paul Sandoz
On Tue, 4 Feb 2025 10:05:09 GMT, Jatin Bhateja wrote: >> Hi All, >> >> This patch adds C2 compiler support for various Float16 operations added by >> [PR#22128](https://github.com/openjdk/jdk/pull/22128) >> >> Following is the summary of changes included with this patch:- >> >> 1. Detection o

Integrated: 8349284: Make libExplicitAttach work on static JDK

2025-02-10 Thread Jiangli Zhou
On Thu, 6 Feb 2025 20:14:36 GMT, Jiangli Zhou wrote: > This is similar to https://github.com/openjdk/jdk/pull/23431 change. It > removes libjvm.so as a recorded dependency for libExplicitAttach.so by not > explicitly link libExplicitAttach.so with libjvm.so at build time. To do > that, it also

Re: RFR: 8349284: Make libExplicitAttach work on static JDK [v5]

2025-02-10 Thread Alan Bateman
On Mon, 10 Feb 2025 17:41:55 GMT, Jiangli Zhou wrote: >> This is similar to https://github.com/openjdk/jdk/pull/23431 change. It >> removes libjvm.so as a recorded dependency for libExplicitAttach.so by not >> explicitly link libExplicitAttach.so with libjvm.so at build time. To do >> that, it

Re: RFR: 8344168: Change Unsafe base offset from int to long [v7]

2025-02-10 Thread Chen Liang
On Thu, 30 Jan 2025 00:37:16 GMT, Shaojin Wen wrote: >> The type of the Unsafe base offset constant is int, which may cause overflow >> when adding int offsets, such as 8343925 (PR #22012). 8343984 (PR #22027) >> fixes most of the offset overflows in JDK, but ArraysSupport and CRC32C are >> st

Re: RFR: 8341402: BigDecimal's square root optimization [v31]

2025-02-10 Thread fabioromano1
On Mon, 10 Feb 2025 09:17:51 GMT, Per Minborg wrote: >> fabioromano1 has updated the pull request incrementally with one additional >> commit since the last revision: >> >> An optimization > > This PR seems to be targeting performance, yet no benchmarks are provided > comparing the current v

Re: RFR: 8349284: Make libExplicitAttach work on static JDK [v4]

2025-02-10 Thread Jiangli Zhou
On Mon, 10 Feb 2025 04:00:44 GMT, Jiangli Zhou wrote: >> This is similar to https://github.com/openjdk/jdk/pull/23431 change. It >> removes libjvm.so as a recorded dependency for libExplicitAttach.so by not >> explicitly link libExplicitAttach.so with libjvm.so at build time. To do >> that, it

Re: RFR: 8349284: Make libExplicitAttach work on static JDK [v5]

2025-02-10 Thread Jiangli Zhou
> This is similar to https://github.com/openjdk/jdk/pull/23431 change. It > removes libjvm.so as a recorded dependency for libExplicitAttach.so by not > explicitly link libExplicitAttach.so with libjvm.so at build time. To do > that, it also changes libExplicitAttach.c to dynamically lookup the

Re: RFR: 8349284: Make libExplicitAttach work on static JDK [v4]

2025-02-10 Thread Jiangli Zhou
On Mon, 10 Feb 2025 07:26:00 GMT, Alan Bateman wrote: > Can you bump the copyright header date on libExplicitAttach.c before you > integrate. Done. @AlanBateman @dholmes-ora Thanks for the review! - PR Comment: https://git.openjdk.org/jdk/pull/23500#issuecomment-2648775523

Re: RFR: 8337143: (fc, fs) Move filesystem-related native objects from libnio to libjava [v11]

2025-02-10 Thread Brian Burkhalter
On Thu, 5 Dec 2024 18:44:06 GMT, Brian Burkhalter wrote: >> This proposed change would move the native objects required for NIO file >> interaction from the libnio native library to the libjava native library on >> Linux, macOS, and Windows. > > Brian Burkhalter has updated the pull request wit

Re: RFR: 8344168: Change Unsafe base offset from int to long [v7]

2025-02-10 Thread Doug Simon
On Thu, 30 Jan 2025 00:37:16 GMT, Shaojin Wen wrote: >> The type of the Unsafe base offset constant is int, which may cause overflow >> when adding int offsets, such as 8343925 (PR #22012). 8343984 (PR #22027) >> fixes most of the offset overflows in JDK, but ArraysSupport and CRC32C are >> st

Re: RFR: 8024695: new File("").exists() returns false whereas it is the current working directory [v5]

2025-02-10 Thread Brian Burkhalter
On Fri, 7 Feb 2025 20:17:47 GMT, Brian Burkhalter wrote: >> Update the specification of `java.io.File.exists()` to match its behavior, >> which seems correct in the context of how the empty abstract pathname is >> documented elsewhere in the class. > > Brian Burkhalter has updated the pull requ

Re: RFR: 8347408: Create an internal method handle adapter for system calls with errno [v4]

2025-02-10 Thread Per Minborg
> Going forward, converting older JDK code to use the relatively new FFM API > requires system calls that can provide `errno` and the likes to explicitly > allocate a `MemorySegment` to capture potential error states. This can lead > to negative performance implications if not designed carefully

Re: RFR: 8347491: IllegalArgumentationException thrown by ThreadPoolExecutor doesn't have a useful message

2025-02-10 Thread Viktor Klang
On Sat, 18 Jan 2025 11:35:28 GMT, He-Pin(kerr) wrote: >> Motivation: >> When a user passes a wrong parameter, the current implementation throws an >> IllegalArgumentException with an error message `null`, which is not helpful. >> >> Modification: >> Add detail error messages. >> >> Result: >>

Re: RFR: 8349145: Make Class.getProtectionDomain() non-native [v7]

2025-02-10 Thread Coleen Phillimore
On Tue, 4 Feb 2025 16:56:53 GMT, Coleen Phillimore wrote: >> Aside from JVMTI (CFLH for example), is there anything left in the VM that >> needs this? The last param to JVM_DefineClassWithSource has the location >> from the code source if available. > > The VM doesn't need this but it carries i

Re: RFR: 8349145: Make Class.getProtectionDomain() non-native [v4]

2025-02-10 Thread Coleen Phillimore
On Mon, 10 Feb 2025 10:09:59 GMT, David Holmes wrote: >> Because the field is final, it has to be initialized in the constructor in >> Java code. My initial patch for modifiers chose to initialize to zero but >> that's not quite correct. The constructor cannot be called nor can it be >> made

Re: RFR: 8349145: Make Class.getProtectionDomain() non-native [v7]

2025-02-10 Thread Coleen Phillimore
> This change removes the native call and injected field for ProtectionDomain > in the java.lang.Class instance, and moves the field to be declared in Java. > Tested with tier1-4. Coleen Phillimore has updated the pull request with a new target base due to a merge or a rebase. The pull request n

Re: RFR: 8346567: Make Class.getModifiers() non-native [v7]

2025-02-10 Thread Coleen Phillimore
On Fri, 7 Feb 2025 12:34:40 GMT, Coleen Phillimore wrote: >> The Class.getModifiers() method is implemented as a native method in >> java.lang.Class to access a field that we've calculated when creating the >> mirror. The field is final after that point. The VM doesn't need it >> anymore, so

Integrated: 8346567: Make Class.getModifiers() non-native

2025-02-10 Thread Coleen Phillimore
On Mon, 9 Dec 2024 19:26:53 GMT, Coleen Phillimore wrote: > The Class.getModifiers() method is implemented as a native method in > java.lang.Class to access a field that we've calculated when creating the > mirror. The field is final after that point. The VM doesn't need it anymore, > so ther

Integrated: 8343074: test/jdk/com/sun/net/httpserver/docs/test1/largefile.txt could be generated

2025-02-10 Thread Volkan Yazici
On Fri, 31 Jan 2025 19:42:55 GMT, Volkan Yazici wrote: > Adds `test.lib.Utils::createTempFileOfSize` to generate > `test/jdk/com/sun/net/httpserver/docs` contents at runtime. This directory > contains `largefile.txt` of size 2.6MiB showing up as the 4th largest file > tracked by git: > > > $

Re: RFR: 8347408: Create an internal method handle adapter for system calls with errno [v3]

2025-02-10 Thread Per Minborg
> Going forward, converting older JDK code to use the relatively new FFM API > requires system calls that can provide `errno` and the likes to explicitly > allocate a `MemorySegment` to capture potential error states. This can lead > to negative performance implications if not designed carefully

Re: RFR: 8349284: Make libExplicitAttach work on static JDK [v4]

2025-02-10 Thread David Holmes
On Mon, 10 Feb 2025 04:00:44 GMT, Jiangli Zhou wrote: >> This is similar to https://github.com/openjdk/jdk/pull/23431 change. It >> removes libjvm.so as a recorded dependency for libExplicitAttach.so by not >> explicitly link libExplicitAttach.so with libjvm.so at build time. To do >> that, it

Re: RFR: 8346567: Make Class.getModifiers() non-native [v7]

2025-02-10 Thread Yudi Zheng
On Fri, 7 Feb 2025 12:34:40 GMT, Coleen Phillimore wrote: >> The Class.getModifiers() method is implemented as a native method in >> java.lang.Class to access a field that we've calculated when creating the >> mirror. The field is final after that point. The VM doesn't need it >> anymore, so

Re: RFR: 8150442: Enforce Supported Platforms in Packager for MSI bundles

2025-02-10 Thread Christian Stein
On Wed, 5 Feb 2025 20:11:36 GMT, Alexey Semenyuk wrote: > Enable MSI installers to block installation if the version of Windows is too > old. > > jpackage will read major and minor OS versions from PE headers of the main > launcher and `java.dll` in the app image. The combined version is the m

Re: RFR: 8349145: Make Class.getProtectionDomain() non-native [v4]

2025-02-10 Thread David Holmes
On Thu, 6 Feb 2025 12:12:59 GMT, Coleen Phillimore wrote: >> I am still missing what can actually set a PD here, sorry. ?? > > Because the field is final, it has to be initialized in the constructor in > Java code. My initial patch for modifiers chose to initialize to zero but > that's not qui

Re: RFR: 8344332: (bf) Migrate DirectByteBuffer to use java.lang.ref.Cleaner [v11]

2025-02-10 Thread Aleksey Shipilev
On Thu, 30 Jan 2025 16:25:30 GMT, Kim Barrett wrote: >> @kimbarrett Do you have a change coming to allow waitForPendingReferences be >> used by WB? I assume this will at least add a comment to the method (or >> whatever it changes to) to make it clear that it's for testing. > > @AlanBateman I'v

Re: RFR: 8307513: C2: intrinsify Math.max(long,long) and Math.min(long,long) [v11]

2025-02-10 Thread Galder ZamarreƱo
On Fri, 7 Feb 2025 12:27:42 GMT, Galder ZamarreƱo wrote: > At 100% probability baseline fails to vectorize because it observes a control > flow. This control flow is not the one you see in min/max implementations, > but this is one added by HotSpot as a result of the JIT profiling. It > observ

Re: RFR: 8341402: BigDecimal's square root optimization [v31]

2025-02-10 Thread Per Minborg
On Wed, 4 Dec 2024 14:56:02 GMT, fabioromano1 wrote: >> After changing `BigInteger.sqrt()` algorithm, this can be also used to speed >> up `BigDecimal.sqrt()` implementation. Here is how I made it. >> >> The main steps of the algorithm are as follows: >> first argument reduce the value to an in

Re: RFR: 8347408: Create an internal method handle adapter for system calls with errno [v2]

2025-02-10 Thread Per Minborg
> Going forward, converting older JDK code to use the relatively new FFM API > requires system calls that can provide `errno` and the likes to explicitly > allocate a `MemorySegment` to capture potential error states. This can lead > to negative performance implications if not designed carefully

Re: RFR: 8349543: LinkedBlockingDeque does not immediately throw InterrruptedException in put/take

2025-02-10 Thread Alan Bateman
On Wed, 5 Feb 2025 15:36:15 GMT, kabutz wrote: > The LinkedBlockingDeque does not behave consistently with other concurrency > components. If we call putFirst(), putLast(), takeFirst(), or takeLast() with > a thread that is interrupted, it does not immediately throw an > InterruptedException,

Re: RFR: 8349620: Add VMProps for static JDK

2025-02-10 Thread Alan Bateman
On Fri, 7 Feb 2025 23:51:41 GMT, Jiangli Zhou wrote: > Please review this change that adds the `jdk.static` VMProps. It can be used > to skip tests not for running on static JDK. > > This also adds a new WhiteBox native method, > `jdk.test.whitebox.WhiteBox.isStatic()`, which is used by VMProp