Re: RFR: 8349620: Add VMProps for static JDK [v3]

2025-02-18 Thread Alan Bateman
On Wed, 19 Feb 2025 06:50:33 GMT, Jaikiran Pai wrote: > This part however feels odd. Updating this (and other tests in future) to use > the `@requires !jdk.static` to identify the presence or absence of a specific > tool in the JDK installation doesn't seem right. Perhaps they should instead >

Re: RFR: 8350051: [JMH] Several tests fails NPE [v2]

2025-02-18 Thread SendaoYan
On Wed, 19 Feb 2025 05:05:17 GMT, Claes Redestad wrote: > If anyone changes these tests on the functional side we'd silently break. After this PR, if the dependency XML files been removed will make `make test-image` fails. So maybe we do not need a new unit test to guard it. > Perhaps needs a

Re: RFR: 8349620: Add VMProps for static JDK [v3]

2025-02-18 Thread Jaikiran Pai
On Tue, 18 Feb 2025 19:29:10 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

Re: RFR: 8349620: Add VMProps for static JDK [v3]

2025-02-18 Thread Jaikiran Pai
On Tue, 18 Feb 2025 19:29:10 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

Re: RFR: 8349860: Make Class.isArray(), Class.isInterface() and Class.isPrimitive() non-native

2025-02-18 Thread David Holmes
On Tue, 11 Feb 2025 20:56:39 GMT, Coleen Phillimore wrote: > Class.isInterface() can check modifier flags, Class.isArray() can check > whether component mirror is non-null and Class.isPrimitive() needs a new > final transient boolean in java.lang.Class that the JVM code initializes. > Tested wi

Re: RFR: 8350051: [JMH] Several tests fails NPE [v2]

2025-02-18 Thread Claes Redestad
On Wed, 19 Feb 2025 03:21:37 GMT, SendaoYan wrote: >> Hi all, >> >> Several JMH tests fails 'Cannot invoke "java.io.InputStream.available()" >> because "is" is null', because the file >> 'build/linux-x86_64-server-release/images/test/micro/benchmarks.jar' missing >> the required xml input fil

Re: RFR: 8349860: Make Class.isArray(), Class.isInterface() and Class.isPrimitive() non-native

2025-02-18 Thread Dean Long
On Tue, 11 Feb 2025 20:56:39 GMT, Coleen Phillimore wrote: > Class.isInterface() can check modifier flags, Class.isArray() can check > whether component mirror is non-null and Class.isPrimitive() needs a new > final transient boolean in java.lang.Class that the JVM code initializes. > Tested wi

Re: RFR: 8349860: Make Class.isArray(), Class.isInterface() and Class.isPrimitive() non-native

2025-02-18 Thread Dean Long
On Tue, 11 Feb 2025 20:56:39 GMT, Coleen Phillimore wrote: > Class.isInterface() can check modifier flags, Class.isArray() can check > whether component mirror is non-null and Class.isPrimitive() needs a new > final transient boolean in java.lang.Class that the JVM code initializes. > Tested wi

Re: RFR: 8350051: [JMH] Several tests fails NPE [v2]

2025-02-18 Thread SendaoYan
On Tue, 18 Feb 2025 20:18:12 GMT, Erik Joelsson wrote: >> SendaoYan has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Use SetupCopyFiles macro to copy the dependency files > > make/test/BuildMicrobenchmark.gmk line 127: > >> 125:

Re: RFR: 8350051: [JMH] Several tests fails NPE [v2]

2025-02-18 Thread SendaoYan
> Hi all, > > Several JMH tests fails 'Cannot invoke "java.io.InputStream.available()" > because "is" is null', because the file > 'build/linux-x86_64-server-release/images/test/micro/benchmarks.jar' missing > the required xml input file defined by > test/micro/org/openjdk/bench/javax/xml/Abst

Re: RFR: 8349860: Make Class.isArray(), Class.isInterface() and Class.isPrimitive() non-native

2025-02-18 Thread Chen Liang
On Wed, 19 Feb 2025 02:35:25 GMT, Dean Long wrote: >> The method is isPrimitive so I think I had to give the field isPrimitiveType >> as a name, so this is wrong. > > I don't know if we have a style guide that covers this, but I believe the > method and field could both be named `isPrimitive`.

Re: RFR: 8349860: Make Class.isArray(), Class.isInterface() and Class.isPrimitive() non-native

2025-02-18 Thread Dean Long
On Tue, 11 Feb 2025 20:56:39 GMT, Coleen Phillimore wrote: > Class.isInterface() can check modifier flags, Class.isArray() can check > whether component mirror is non-null and Class.isPrimitive() needs a new > final transient boolean in java.lang.Class that the JVM code initializes. > Tested wi

Re: RFR: 8349860: Make Class.isArray(), Class.isInterface() and Class.isPrimitive() non-native

2025-02-18 Thread Dean Long
On Wed, 12 Feb 2025 12:05:22 GMT, Coleen Phillimore wrote: >> src/java.base/share/classes/jdk/internal/reflect/Reflection.java line 59: >> >>> 57: Reflection.class, ALL_MEMBERS, >>> 58: AccessibleObject.class, ALL_MEMBERS, >>> 59: Class.class, Set.of("classLoa

Re: RFR: 8138614: (spec str) StringBuffer and StringBuilder methods improperly require "new" String to be returned [v2]

2025-02-18 Thread Stuart Marks
On Fri, 14 Feb 2025 15:30:16 GMT, Roger Riggs wrote: >> Stuart Marks has updated the pull request incrementally with one additional >> commit since the last revision: >> >> A tiny bit of wordsmithing. > > It should be pointed out (in the CSR) that this is aligning the spec with the > current

Re: RFR: 8350051: [JMH] Several tests fails NPE

2025-02-18 Thread SendaoYan
On Tue, 18 Feb 2025 20:23:05 GMT, Erik Joelsson wrote: > I'm not sure if this is the right way to solve this. I would really like > someone more familiar with the microbenchmarks to weigh in on how this was > originally meant to work. Hi, @cl4es, Could you take took this PR. - PR

Re: RFR: 8349699: XSL transform fails with certain UTF-8 characters on 1024 byte boundaries [v3]

2025-02-18 Thread Naoto Sato
On Wed, 19 Feb 2025 00:16:13 GMT, Joe Wang wrote: >> Fix an edge case in the patch for JDK-8207760. > > Joe Wang has updated the pull request incrementally with one additional > commit since the last revision: > > add tests verifying invalid sequence; also add tests to verify cases where > t

Re: RFR: 8349620: Add VMProps for static JDK [v2]

2025-02-18 Thread Jiangli Zhou
On Wed, 19 Feb 2025 00:06:52 GMT, Man Cao wrote: >> Jiangli Zhou has updated the pull request with a new target base due to a >> merge or a rebase. The incremental webrev excludes the unrelated changes >> brought in by the merge/rebase. The pull request contains two additional >> commits since

Re: RFR: 8349699: XSL transform fails with certain UTF-8 characters on 1024 byte boundaries [v3]

2025-02-18 Thread Joe Wang
> Fix an edge case in the patch for JDK-8207760. Joe Wang has updated the pull request incrementally with one additional commit since the last revision: add tests verifying invalid sequence; also add tests to verify cases where the pairs are at the edges or anywhere in the text -

Re: RFR: 8349699: XSL transform fails with certain UTF-8 characters on 1024 byte boundaries [v2]

2025-02-18 Thread Joe Wang
On Fri, 14 Feb 2025 19:55:05 GMT, Naoto Sato wrote: >> Joe Wang has updated the pull request incrementally with one additional >> commit since the last revision: >> >> un-needed property removed > > test/jaxp/javax/xml/jaxp/unittest/transform/JDK8207760.java line 112: > >> 110: public fi

Re: RFR: 8349620: Add VMProps for static JDK [v2]

2025-02-18 Thread Man Cao
On Tue, 18 Feb 2025 19:26:09 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

Re: RFR: 8349860: Make Class.isArray(), Class.isInterface() and Class.isPrimitive() non-native

2025-02-18 Thread Coleen Phillimore
On Wed, 12 Feb 2025 00:05:13 GMT, Chen Liang wrote: >> Class.isInterface() can check modifier flags, Class.isArray() can check >> whether component mirror is non-null and Class.isPrimitive() needs a new >> final transient boolean in java.lang.Class that the JVM code initializes. >> Tested with

Re: RFR: 8349860: Make Class.isArray(), Class.isInterface() and Class.isPrimitive() non-native

2025-02-18 Thread Claes Redestad
On Tue, 11 Feb 2025 20:56:39 GMT, Coleen Phillimore wrote: > Class.isInterface() can check modifier flags, Class.isArray() can check > whether component mirror is non-null and Class.isPrimitive() needs a new > final transient boolean in java.lang.Class that the JVM code initializes. > Tested wi

Re: RFR: 8349860: Make Class.isArray(), Class.isInterface() and Class.isPrimitive() non-native

2025-02-18 Thread Coleen Phillimore
On Tue, 11 Feb 2025 20:56:39 GMT, Coleen Phillimore wrote: > Class.isInterface() can check modifier flags, Class.isArray() can check > whether component mirror is non-null and Class.isPrimitive() needs a new > final transient boolean in java.lang.Class that the JVM code initializes. > Tested wi

RFR: 8349860: Make Class.isArray(), Class.isInterface() and Class.isPrimitive() non-native

2025-02-18 Thread Coleen Phillimore
Class.isInterface() can check modifier flags, Class.isArray() can check whether component mirror is non-null and Class.isPrimitive() needs a new final transient boolean in java.lang.Class that the JVM code initializes. Tested with tier1-4 and performance tests. - Commit messages: -

Re: RFR: 8349860: Make Class.isArray(), Class.isInterface() and Class.isPrimitive() non-native

2025-02-18 Thread Chen Liang
On Tue, 11 Feb 2025 20:56:39 GMT, Coleen Phillimore wrote: > Class.isInterface() can check modifier flags, Class.isArray() can check > whether component mirror is non-null and Class.isPrimitive() needs a new > final transient boolean in java.lang.Class that the JVM code initializes. > Tested wi

Re: RFR: 8348975: Broken links in the JDK 24 JavaDoc API documentation, build 33

2025-02-18 Thread Ian Myers
On Wed, 29 Jan 2025 23:15:08 GMT, Magnus Ihse Bursie wrote: >> Two groups of broken links appeared in the latest JDK docs, broken links to >> man pages and broken ietf links. >> >> - The windows tools markdown files were not being converted to HTML because >> they were placed under `windows/ma

Re: RFR: 8350041: Make libstringPlatformChars support static JDK

2025-02-18 Thread Jiangli Zhou
On Tue, 18 Feb 2025 17:05:06 GMT, Alan Bateman wrote: > I don't object to changing this test but it might be simpler to just skip > this test, once we can use `@requires !jdk.static`. Thanks, @AlanBateman. I think skipping this test for static JDK sounds reasonable to me, since this test seems

Re: RFR: 8350051: [JMH] Several tests fails NPE

2025-02-18 Thread Erik Joelsson
On Fri, 14 Feb 2025 07:21:27 GMT, SendaoYan wrote: > Hi all, > > Several JMH tests fails 'Cannot invoke "java.io.InputStream.available()" > because "is" is null', because the file > 'build/linux-x86_64-server-release/images/test/micro/benchmarks.jar' missing > the required xml input file defi

Re: RFR: 8349620: Add VMProps for static JDK [v3]

2025-02-18 Thread Jiangli Zhou
On Tue, 18 Feb 2025 19:29:10 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

Re: RFR: 8350041: Make libstringPlatformChars support static JDK

2025-02-18 Thread Alan Bateman
On Fri, 14 Feb 2025 18:31:52 GMT, Jiangli Zhou wrote: > Please review the fix to make > `java/lang/String/nativeEncoding/StringPlatformChars.java` jtreg test: > > - Lookup `JNU_GetStringPlatformChars`, `JNU_ClassString` and > `JNU_NewStringPlatform` dynamically > - Remove `#include "jni_util.

Re: RFR: 8349620: Add VMProps for static JDK [v3]

2025-02-18 Thread Jiangli Zhou
> 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 VMProps to > determine if it's static at runtime. > > `@re

Re: RFR: 8349620: Add VMProps for static JDK

2025-02-18 Thread Jiangli Zhou
On Tue, 11 Feb 2025 08:10:24 GMT, Alan Bateman wrote: >> I think this looks okay, I'm just wondering is one property is enough to >> cover all the configurations. > >> Thanks, @AlanBateman. >> >> > I'm just wondering is one property is enough to cover all the >> > configurations. >> >> +1 >>

Re: RFR: 8349620: Add VMProps for static JDK [v2]

2025-02-18 Thread Alan Bateman
On Tue, 18 Feb 2025 19:09:00 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

Re: RFR: 8349620: Add VMProps for static JDK [v2]

2025-02-18 Thread Jiangli Zhou
> 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 VMProps to > determine if it's static at runtime. > > `@re

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

2025-02-18 Thread Aleksey Shipilev
On Tue, 18 Feb 2025 11:01:51 GMT, Kim Barrett wrote: >> Aleksey Shipilev has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Revert waitForReferenceProcessing removals, see JDK-8305186 > > There are several changes here that I think are of i

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

2025-02-18 Thread Aleksey Shipilev
> DirectByteBuffers are still using old `jdk.internal.ref.Cleaner` > implementation. That implementation carries a doubly-linked list, and so > makes DBB suffer from the same issue fixed for generic > `java.lang.ref.Cleaner` users with > [JDK-8343704](https://bugs.openjdk.org/browse/JDK-8343704

Re: RFR: 8349206: j.u.l.Handler classes create deadlock risk via synchronized publish() method [v3]

2025-02-18 Thread David Beaumont
> 8349206: j.u.l.Handler classes create deadlock risk via synchronized > publish() method. > > 1. Remove synchronization of calls to publish() in Handlers in > java.util.logging package. > 2. Add explanatory comments to various affected methods. > 3. Add a test to ensure deadlocks no longer occu

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

2025-02-18 Thread Aleksey Shipilev
On Tue, 18 Feb 2025 10:54:13 GMT, Kim Barrett wrote: >> Aleksey Shipilev has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Revert waitForReferenceProcessing removals, see JDK-8305186 > > src/java.base/share/classes/java/nio/Bits.java line

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

2025-02-18 Thread Aleksey Shipilev
> DirectByteBuffers are still using old `jdk.internal.ref.Cleaner` > implementation. That implementation carries a doubly-linked list, and so > makes DBB suffer from the same issue fixed for generic > `java.lang.ref.Cleaner` users with > [JDK-8343704](https://bugs.openjdk.org/browse/JDK-8343704

Re: RFR: 8350075: Performance difference between SegmentAllocator methods

2025-02-18 Thread Per Minborg
On Fri, 14 Feb 2025 09:19:35 GMT, Per Minborg wrote: > This PR proposes to add `@ForceInline` to the `default` methods in > `SegmentAllocator` that do not already have it. There is [a microbenchmark from another PR](test/micro/org/openjdk/bench/java/lang/foreign/ArenaPoolFromBench.java) which

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

2025-02-18 Thread Kim Barrett
On Wed, 29 Jan 2025 19:56:00 GMT, Aleksey Shipilev wrote: >> DirectByteBuffers are still using old `jdk.internal.ref.Cleaner` >> implementation. That implementation carries a doubly-linked list, and so >> makes DBB suffer from the same issue fixed for generic >> `java.lang.ref.Cleaner` users w

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

2025-02-18 Thread Galder Zamarreño
On Tue, 18 Feb 2025 09:21:46 GMT, Galder Zamarreño wrote: > For the equivalent long tests I think I made a mistake in the id of the > disabled intrinsic, it should be _maxL and not _max. I will repeat the tests > and post if any similar differences observed. FYI Indeed a similar pattern is obs

Re: RFR: 8349206: j.u.l.Handler classes create deadlock risk via synchronized publish() method [v2]

2025-02-18 Thread David Beaumont
On Tue, 18 Feb 2025 02:08:58 GMT, Jason Mehrens wrote: >> The issue with a non-JDK stream handler subclass, is that it doesn't have >> the privilege of being able to do anything before the `super.publish(...)` >> call has finished and the handler instance is unlocked. >> >> Using a package pro

Re: RFR: 8350049: [JMH] Float16OperationsBenchmark fails java.lang.NoClassDefFoundError [v2]

2025-02-18 Thread SendaoYan
> Hi all, > > The newly added JMH tests > 'org.openjdk.bench.jdk.incubator.vector.VectorMultiplyOptBenchmark' fails > "java.lang.NoClassDefFoundError: jdk/incubator/vector/Float16" by below test > command: > > > make test MICRO="FORK=1;WARMUP_ITER=2" > TEST="micro:org.openjdk.bench.jdk.incub

Re: RFR: 8350049: [JMH] Float16OperationsBenchmark fails java.lang.NoClassDefFoundError [v2]

2025-02-18 Thread SendaoYan
On Tue, 18 Feb 2025 09:23:23 GMT, Andrey Turbanov wrote: >> SendaoYan has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Remove the extra whitespace > > test/micro/org/openjdk/bench/jdk/incubator/vector/Float16OperationsBenchmark.java > li

RFR: 8349547: Document jlink and jmods Supported Usage

2025-02-18 Thread Prajwal Kumaraswamy
Document supported usage of jlink with JDK jmod's The document will reflect the future work from JDK-8347831 - Commit messages: - 8349547: Document jlink and jmods Supported Usage Changes: https://git.openjdk.org/jdk/pull/23672/files Webrev: https://webrevs.openjdk.org/?repo=jdk&p

Re: RFR: 8350049: [JMH] Float16OperationsBenchmark fails java.lang.NoClassDefFoundError

2025-02-18 Thread Andrey Turbanov
On Fri, 14 Feb 2025 02:23:40 GMT, SendaoYan wrote: > Hi all, > > The newly added JMH tests > 'org.openjdk.bench.jdk.incubator.vector.VectorMultiplyOptBenchmark' fails > "java.lang.NoClassDefFoundError: jdk/incubator/vector/Float16" by below test > command: > > > make test MICRO="FORK=1;WARM

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

2025-02-18 Thread Galder Zamarreño
On Tue, 18 Feb 2025 08:43:38 GMT, Emanuel Peter wrote: > But let's discuss all of this in a call / offline :) Yup. > I ran the exact same test with longs and I don't see such an issue. The > performance is always the same either with the intrisinc or disabling it as > shown above. For the eq

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

2025-02-18 Thread Emanuel Peter
On Tue, 18 Feb 2025 08:17:59 GMT, Galder Zamarreño wrote: >>> I think we should be able to see the same issue here, actually. Yes. Here a >>> quick benchmark below: >> >> I observe the same: >> >> >> Warmup >> 7513bTestIntMax::test1 (27 bytes) >> Run >> Time: 360 550 158 >> Wa

Withdrawn: 8349763: Expose more ForkJoinPool parameters to configure virtual thread scheduler

2025-02-18 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: 8307513: C2: intrinsify Math.max(long,long) and Math.min(long,long) [v11]

2025-02-18 Thread Galder Zamarreño
On Mon, 17 Feb 2025 15:02:32 GMT, Roland Westrelin wrote: >> @rwestrel @galderz >> >>> It seems overall, we likely win more than we loose with this intrinsic, so >>> I would integrate this change as it is and file a bug to keep track of >>> remaining issues. >> >> I'm a little scared to just

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

2025-02-18 Thread Galder Zamarreño
On Mon, 17 Feb 2025 15:02:32 GMT, Roland Westrelin wrote: >> @rwestrel @galderz >> >>> It seems overall, we likely win more than we loose with this intrinsic, so >>> I would integrate this change as it is and file a bug to keep track of >>> remaining issues. >> >> I'm a little scared to just

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

2025-02-18 Thread Galder Zamarreño
On Fri, 7 Feb 2025 12:39:24 GMT, Galder Zamarreño wrote: >> This patch intrinsifies `Math.max(long, long)` and `Math.min(long, long)` in >> order to help improve vectorization performance. >> >> Currently vectorization does not kick in for loops containing either of >> these calls because of t