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

2025-02-20 Thread Alan Bateman
On Thu, 20 Feb 2025 22:17:36 GMT, Brian Burkhalter wrote: >> That would be okay too, just need to avoid circular initialization. > > So changed in a3b7977. Thanks, that is better replace for this. In time it may be a good candidate to be a stable value. - PR Review Comment: https:

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

2025-02-20 Thread Alan Bateman
On Thu, 20 Feb 2025 22:20:04 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 req

Re: RFR: 8349944: [JMH] sun.misc.UnsafeOps cannot access class jdk.internal.misc.Unsafe [v2]

2025-02-20 Thread Nicole Xu
On Fri, 21 Feb 2025 07:10:16 GMT, Alan Bateman wrote: > Thanks for restoring, this micro was specifically for sun.misc.Unsafe. I'm > not wondering about the FFM micros that were also changed by JDK-8332744. > Might not matter there but I think the original motive was to compare against > sun.m

Re: RFR: 8349944: [JMH] sun.misc.UnsafeOps cannot access class jdk.internal.misc.Unsafe [v2]

2025-02-20 Thread Alan Bateman
On Fri, 21 Feb 2025 07:01:42 GMT, Nicole Xu wrote: >> The UnsafeOps JMH benchmark fails with the following error: >> >> java.lang.IllegalAccessError: class >> org.openjdk.bench.sun.misc.UnsafeOps (in unnamed module @0x520a3426) cannot >> access class jdk.internal.misc.Unsafe (in module j

Re: RFR: 8349944: [JMH] sun.misc.UnsafeOps cannot access class jdk.internal.misc.Unsafe [v2]

2025-02-20 Thread Nicole Xu
> The UnsafeOps JMH benchmark fails with the following error: > > java.lang.IllegalAccessError: class > org.openjdk.bench.sun.misc.UnsafeOps (in unnamed module @0x520a3426) cannot > access class jdk.internal.misc.Unsafe (in module java.base) because module > java.base does not export jdk.

Re: RFR: 8350041: Make libstringPlatformChars support static JDK

2025-02-20 Thread Alan Bateman
On Thu, 20 Feb 2025 23:44:44 GMT, Jiangli Zhou wrote: > Updated to skipping > `java/lang/String/nativeEncoding/StringPlatformChars.java` on static JDK. Thanks. If you can bump the copyright header date then I think we are done with this one. - PR Comment: https://git.openjdk.org/

Re: Integrated: 8344011: Remove usage of security manager from Class and reflective APIs

2025-02-20 Thread Alan Bateman
On 21/02/2025 01:08, James Perkins wrote: Please forgive me if this is the wrong medium to report this. I've found an issue with the change in the ServiceLoader. Specifically, the getConstructor()[1] method. Previously, the method caught Throwable and then fail which would throw a java.util.S

Re: RFR: 8287788: Implement a better allocator for downcalls [v18]

2025-02-20 Thread Jorn Vernee
On Sat, 1 Feb 2025 11:18:18 GMT, Matthias Ernst wrote: >> Matthias Ernst has updated the pull request incrementally with one >> additional commit since the last revision: >> >> fix test under VThread factory > > Tried for a few hours to repro with various approaches, to no avail. @mernst-git

Re: RFR: 8349959: Test CR6740048.java passes unexpectedly missing CR6740048.xsd

2025-02-20 Thread SendaoYan
On Thu, 20 Feb 2025 17:32:06 GMT, Joe Wang wrote: > Yes, that would do. Thanks, PR has been updated. - PR Comment: https://git.openjdk.org/jdk/pull/23627#issuecomment-2673138446

Re: RFR: 8349959: Test CR6740048.java passes unexpectedly missing CR6740048.xsd [v2]

2025-02-20 Thread SendaoYan
> Hi all, > > Test test/jaxp/javax/xml/jaxp/unittest/validation/CR6740048.java run passes > unexpectedly when missing the depentdent file > test/jaxp/javax/xml/jaxp/unittest/validation/CR6740048.xsd. This PR add a > NULL check after call `getResourceAsStream("CR6740048.xsd")`. > > This PR do n

Re: Integrated: 8344011: Remove usage of security manager from Class and reflective APIs

2025-02-20 Thread James Perkins
Please forgive me if this is the wrong medium to report this. I've found an issue with the change in the ServiceLoader. Specifically, the getConstructor()[1] method. Previously, the method caught Throwable and then fail which would throw a java.util.ServiceConfigurationError exception. With the ch

RFR: 8350118: Simplify the layout access VarHandle

2025-02-20 Thread Chen Liang
Simplify the layout access var handles to be direct in some common cases. Also made `VarHandle::isAccessModeSupported` report if an access mode is supported for a VH. Reduces the instructions to execute this code in a simple main by 47%: long[] arr = new long[8]; var ms = MemorySegment.ofArray(

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

2025-02-20 Thread Coleen Phillimore
On Thu, 20 Feb 2025 20:19:15 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. >> Teste

Re: RFR: 8350041: Make libstringPlatformChars support static JDK

2025-02-20 Thread Jiangli Zhou
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: 8350041: Make libstringPlatformChars support static JDK [v2]

2025-02-20 Thread Jiangli Zhou
> 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.h"` and don't link `libstringPlatformChars.so` > with `

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

2025-02-20 Thread Chen Liang
On Thu, 20 Feb 2025 20:19:15 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. >> Teste

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

2025-02-20 Thread Coleen Phillimore
On Wed, 19 Feb 2025 21:16:51 GMT, Dean Long wrote: >> This is a good question. The heapwalker walks through dead mirrors so I >> can't assert that a null klass field matches our boolean setting but I don't >> know why this never asserts (can't find any instances in the bug database) >> but it

Re: RFR: 8319447: Improve performance of delayed task handling

2025-02-20 Thread Sunmisc Unsafe
On Wed, 19 Feb 2025 16:07:56 GMT, Doug Lea wrote: > (Copied from https://bugs.openjdk.org/browse/JDK-8319447) > > The problems addressed by this CR/PR are that ScheduledThreadPoolExecutor is > both ill-suited for many (if not most) of its applications, and is a > performance bottleneck (as see

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

2025-02-20 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: 8024695: new File("").exists() returns false whereas it is the current working directory [v7]

2025-02-20 Thread Brian Burkhalter
> 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 request with a new target base due to a merge or a rebase. The pull

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

2025-02-20 Thread Brian Burkhalter
On Thu, 20 Feb 2025 07:51:44 GMT, Alan Bateman wrote: >> Brian Burkhalter has updated the pull request incrementally with one >> additional commit since the last revision: >> >> 8024695: Extend and clean up test > > test/jdk/java/io/File/EmptyPath.java line 260: > >> 258: assertFalse

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

2025-02-20 Thread Brian Burkhalter
On Thu, 20 Feb 2025 16:21:16 GMT, Brian Burkhalter wrote: >> test/jdk/java/io/File/EmptyPath.java line 67: >> >>> 65: >>> 66: @Test >>> 67: @Order(1) >> >> What is the reason for use `@Order` in these tests, is there a dependency? >> Asking because we've usually avoided need to do thi

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

2025-02-20 Thread Brian Burkhalter
On Thu, 20 Feb 2025 17:21:53 GMT, Alan Bateman wrote: >> Why not just down into `FileSystem`? It's not OS-dependent. > > That would be okay too, just need to avoid circular initialization. So changed in a3b7977. - PR Review Comment: https://git.openjdk.org/jdk/pull/22821#discussion

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

2025-02-20 Thread Vladimir Ivanov
On Thu, 20 Feb 2025 20:19:15 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. >> Teste

RFR: 8261669: Add lint warning for widening primitive conversions that lose information

2025-02-20 Thread Archie Cobbs
This PR is a prototype to stimulate discussion of [JDK-8261669](https://bugs.openjdk.org/browse/JDK-8261669), which seeks to add more warnings when an implicit cast of a primitive value might lose information. This can possibly happen when converting an `int` to `float`, or when converting a `l

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

2025-02-20 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. Coleen Phillimore has upda

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

2025-02-20 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. Coleen Phillimore has upda

Integrated: 8350151: Support requires property to filter tests incompatible with --enable-preview

2025-02-20 Thread Leonid Mesnik
On Sat, 15 Feb 2025 19:43:39 GMT, Leonid Mesnik wrote: > It might be useful to be able to run testing with --enable-preview for > feature development. The tests incompatible with this mode must be filtered > out. > > I chose name 'java.enablePreview' , because it is more java property than vm

Re: RFR: 8343191: Cgroup v1 subsystem fails to set subsystem path [v13]

2025-02-20 Thread Sergey Chernyshev
> Cgroup V1 subsustem fails to initialize mounted controllers properly in > certain cases, that may lead to controllers left undetected/inactive. We > observed the behavior in CloudFoundry deployments, it affects also host > systems. > > The relevant /proc/self/mountinfo line is > > > 2207 21

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

2025-02-20 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: 8319447: Improve performance of delayed task handling

2025-02-20 Thread Alan Bateman
On Wed, 19 Feb 2025 16:07:56 GMT, Doug Lea wrote: > (Copied from https://bugs.openjdk.org/browse/JDK-8319447) > > The problems addressed by this CR/PR are that ScheduledThreadPoolExecutor is > both ill-suited for many (if not most) of its applications, and is a > performance bottleneck (as see

Re: RFR: 8343191: Cgroup v1 subsystem fails to set subsystem path [v11]

2025-02-20 Thread Sergey Chernyshev
On Mon, 17 Feb 2025 11:09:12 GMT, Severin Gehwolf wrote: >> Sergey Chernyshev has updated the pull request incrementally with one >> additional commit since the last revision: >> >> added details in the log message > > src/java.base/linux/classes/jdk/internal/platform/cgroupv1/CgroupV1Subsyst

Re: RFR: 8349959: Test CR6740048.java passes unexpectedly missing CR6740048.xsd

2025-02-20 Thread Joe Wang
On Fri, 14 Feb 2025 07:44:26 GMT, SendaoYan wrote: > Hi all, > > Test test/jaxp/javax/xml/jaxp/unittest/validation/CR6740048.java run passes > unexpectedly when missing the depentdent file > test/jaxp/javax/xml/jaxp/unittest/validation/CR6740048.xsd. This PR add a > NULL check after call `get

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

2025-02-20 Thread Brian Burkhalter
On Thu, 20 Feb 2025 07:54:28 GMT, Alan Bateman wrote: >> Brian Burkhalter has updated the pull request incrementally with one >> additional commit since the last revision: >> >> 8024695: Extend and clean up test > > src/java.base/share/classes/java/io/File.java line 254: > >> 252: static

Re: RFR: 8343191: Cgroup v1 subsystem fails to set subsystem path [v12]

2025-02-20 Thread Sergey Chernyshev
> Cgroup V1 subsustem fails to initialize mounted controllers properly in > certain cases, that may lead to controllers left undetected/inactive. We > observed the behavior in CloudFoundry deployments, it affects also host > systems. > > The relevant /proc/self/mountinfo line is > > > 2207 21

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

2025-02-20 Thread Alan Bateman
On Thu, 20 Feb 2025 17:19:56 GMT, Brian Burkhalter wrote: >> src/java.base/share/classes/java/io/File.java line 254: >> >>> 252: static File getCWD() { >>> 253: return CWD; >>> 254: } >> >> This is a bit icky, have you looked at pushing this down to a holder class >> in UnixFil

Re: RFR: 8343191: Cgroup v1 subsystem fails to set subsystem path [v11]

2025-02-20 Thread Sergey Chernyshev
On Mon, 17 Feb 2025 15:48:51 GMT, Matthias Baesken wrote: >> Sergey Chernyshev has updated the pull request incrementally with one >> additional commit since the last revision: >> >> added details in the log message > > src/java.base/linux/classes/jdk/internal/platform/cgroupv2/CgroupV2Subsys

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

2025-02-20 Thread Brian Burkhalter
On Thu, 20 Feb 2025 07:52:43 GMT, Alan Bateman wrote: >> Brian Burkhalter has updated the pull request incrementally with one >> additional commit since the last revision: >> >> 8024695: Extend and clean up test > > test/jdk/java/io/File/EmptyPath.java line 67: > >> 65: >> 66: @Test >>

Integrated: 8349620: Add VMProps for static JDK

2025-02-20 Thread Jiangli Zhou
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

Re: RFR: 8319447: Improve performance of delayed task handling

2025-02-20 Thread Alan Bateman
On Wed, 19 Feb 2025 16:07:56 GMT, Doug Lea wrote: > (Copied from https://bugs.openjdk.org/browse/JDK-8319447) > > The problems addressed by this CR/PR are that ScheduledThreadPoolExecutor is > both ill-suited for many (if not most) of its applications, and is a > performance bottleneck (as see

Re: RFR: 8350151: Support requires property to filter tests incompatible with --enable-preview [v2]

2025-02-20 Thread Roger Riggs
On Wed, 19 Feb 2025 17:49:57 GMT, Leonid Mesnik wrote: >> It might be useful to be able to run testing with --enable-preview for >> feature development. The tests incompatible with this mode must be filtered >> out. >> >> I chose name 'java.enablePreview' , because it is more java property tha

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

2025-02-20 Thread Magnus Ihse Bursie
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: 8319447: Improve performance of delayed task handling

2025-02-20 Thread Alan Bateman
On Wed, 19 Feb 2025 16:07:56 GMT, Doug Lea wrote: > (Copied from https://bugs.openjdk.org/browse/JDK-8319447) > > The problems addressed by this CR/PR are that ScheduledThreadPoolExecutor is > both ill-suited for many (if not most) of its applications, and is a > performance bottleneck (as see

Re: RFR: 8350151: Support requires property to filter tests incompatible with --enable-preview [v2]

2025-02-20 Thread Roger Riggs
On Thu, 20 Feb 2025 15:13:47 GMT, Roger Riggs wrote: >> For me it fails with >> --System.err:(18/917)-- >> stdout: []; >> stderr: [Error: Unable to initialize main class SecurityManagerWarnings >> Caused by: java.lang.NoClassDefFoundError: >> jdk/test/lib/process/OutputAnalyzer

Re: RFR: 8350151: Support requires property to filter tests incompatible with --enable-preview [v2]

2025-02-20 Thread Roger Riggs
On Wed, 19 Feb 2025 20:32:56 GMT, Leonid Mesnik wrote: >> It ran ok for me, once I got the command line flags correct. >> It ran ok if I added `@enablePreview`. >> >> It also ran ok with an explicit @run command: (it does not currently have >> an @run command). >> >> * @run main/othervm --en

Re: RFR: 8336881: [Linux] Support for hierarchical limits for Metrics [v16]

2025-02-20 Thread Severin Gehwolf
> Please review this fix for cgroups-based metrics reporting in the > `jdk.internal.platform` package. This fix is supposed to address wrong > reporting of certain limits if the limits aren't set at the leaf nodes. > > For example, on cg v2, the memory limit interface file is `memory.max`. > Co

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

2025-02-20 Thread Coleen Phillimore
On Thu, 20 Feb 2025 04:29:04 GMT, Chen Liang wrote: >> src/java.base/share/classes/java/lang/Class.java line 1297: >> >>> 1295: // The componentType field's null value is the sole indication >>> that the class is an array, >>> 1296: // see isArray(). >>> 1297: private transient fina

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

2025-02-20 Thread Jatin Bhateja
On Tue, 18 Feb 2025 02:36:13 GMT, Julian Waters wrote: > Is anyone else getting compile failures after this was integrated? This > weirdly seems to only happen on Linux > > ``` > * For target hotspot_variant-server_libjvm_objs_mulnode.o: > /home/runner/work/jdk/jdk/src/hotspot/share/opto/mulnod

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

2025-02-20 Thread Galder Zamarreño
On Tue, 18 Feb 2025 08:43:38 GMT, Emanuel Peter wrote: >> To make it more explicit: implementing long min/max in ad files as cmp will >> likely remove all the 100% regressions that are observed here. I'm going to >> repeat the same MinMaxVector int min/max reduction test above with the ad >> c

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

2025-02-20 Thread Galder Zamarreño
On Thu, 20 Feb 2025 06:50:07 GMT, Galder Zamarreño wrote: > There is something very intriguing happening here, which I don't know it's > due to min itself or int vs long. Benchmark (probability) (size) Mode Cnt -min/-max +min/+max Units MinMaxVector.intRed

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

2025-02-20 Thread Jatin Bhateja
On Tue, 18 Feb 2025 03:50:19 GMT, Nicole Xu wrote: > Sure. Since I am very new to openJDK, I asked my teammate for help to file > the follow-up RFE. > > Here is the https://bugs.openjdk.org/browse/JDK-8350215 with description of > the discussed issues. Hi @xyyNicole , I have modified the be