RFR: 8354242: VectorAPI: combine vector not operation with compare

2025-04-15 Thread erifan
This patch optimizes the following patterns: For integer types: (XorV (VectorMaskCmp src1 src2 cond) (Replicate -1)) => (VectorMaskCmp src1 src2 ncond) (XorVMask (VectorMaskCmp src1 src2 cond) (MaskAll m1)) => (VectorMaskCmp src1 src2 ncond) cond can be eq, ne, le, ge, lt, gt, ule, uge, u

Re: RFR: 8342486: Implement JEP 505: Structured Concurrency (Fifth Preview) [v8]

2025-04-15 Thread Alan Bateman
On Tue, 15 Apr 2025 21:45:10 GMT, Viktor Klang wrote: >> Alan Bateman has updated the pull request with a new target base due to a >> merge or a rebase. The pull request now contains 15 commits: >> >> - Add JEP number, update copyright headers >> - Merge branch 'master' into JDK-8342486 >> -

Re: RFR: 8342869: Errors related to unused code on Windows after 8339120 in awt

2025-04-15 Thread Julian Waters
On Wed, 23 Oct 2024 05:07:37 GMT, Julian Waters wrote: > After 8339120, gcc began catching many different instances of unused code in > the Windows specific codebase. Some of these seem to be bugs. I've taken the > effort to mark out all the relevant globals and locals that trigger the > unuse

Re: RFR: 8342486: Implement JEP 505: Structured Concurrency (Fifth Preview) [v8]

2025-04-15 Thread Alan Bateman
On Tue, 15 Apr 2025 13:25:41 GMT, Viktor Klang wrote: >> Alan Bateman has updated the pull request with a new target base due to a >> merge or a rebase. The pull request now contains 15 commits: >> >> - Add JEP number, update copyright headers >> - Merge branch 'master' into JDK-8342486 >> -

Re: RFR: 8342486: Implement JEP 505: Structured Concurrency (Fifth Preview) [v8]

2025-04-15 Thread Alan Bateman
On Tue, 15 Apr 2025 06:38:15 GMT, Chen Liang wrote: >> Alan Bateman has updated the pull request with a new target base due to a >> merge or a rebase. The pull request now contains 15 commits: >> >> - Add JEP number, update copyright headers >> - Merge branch 'master' into JDK-8342486 >> - S

Re: RFR: 8354300: Fields in String are not trusted

2025-04-15 Thread Chen Liang
On Wed, 16 Apr 2025 05:12:28 GMT, Rémi Forax wrote: >> src/java.base/share/classes/java/lang/String.java line 183: >> >>> 181: * us to avoid recalculating this. >>> 182: */ >>> 183: @Stable >> >> Suggestion: >> >> // Marking hashIsZero stable is meaningless, as a read of `0`

Re: RFR: 8354300: Fields in String are not trusted

2025-04-15 Thread Rémi Forax
On Wed, 16 Apr 2025 00:01:18 GMT, Chen Liang wrote: >> This PR proposes to add the `@Stable` annotation to `j.l.String.hash` and >> `j.l.String.hashIsZero`. This means the VM can trust these fields to never >> change which enables constant folding optimizations. >> >> This PR is tested in tier

Re: RFR: 8354273: Restore even more pointless unicode characters to ASCII [v2]

2025-04-15 Thread Phil Race
On Thu, 10 Apr 2025 10:36:31 GMT, Magnus Ihse Bursie wrote: >> As a follow-up to >> [JDK-8354213](https://bugs.openjdk.org/browse/JDK-8354213), I found some >> additional places where unicode characters are unnecessarily used instead of >> pure ASCII. > > Magnus Ihse Bursie has updated the pul

Re: RFR: 8354464: Additional cleanup setting up native.encoding [v2]

2025-04-15 Thread Stuart Marks
On Tue, 15 Apr 2025 17:12:18 GMT, Naoto Sato wrote: >> src/java.base/share/native/libjava/System.c line 151: >> >>> 149: /* basic encoding properties, always non-NULL */ >>> 150: PUTPROP(propArray, _native_encoding_NDX, sprops->encoding); >>> 151: PUTPROP(propArray, _sun_jnu_encoding

Re: RFR: 8354464: Additional cleanup setting up native.encoding [v2]

2025-04-15 Thread Stuart Marks
> Remove the #ifdef MACOSX from platform-independent System.c, which (on Mac) > sets native.encoding from sprops.encoding or (on non-Mac Unix and Windows) > sets native.encoding from sprops.sun_jnu_encoding. After this removal, the > native.encoding property will be set from sprops.encoding and

Re: RFR: 8353786: Migrate Vector API math library support to FFM API [v5]

2025-04-15 Thread Xiaohong Gong
On Fri, 11 Apr 2025 21:23:52 GMT, Vladimir Ivanov wrote: >> Migrate Vector API math library (SVML and SLEEF) linkage from native code >> (in JVM) to Java FFM API. >> >> Since FFM API doesn't support vector calling conventions yet, migration >> affects only symbol lookup for now. But it still e

Integrated: 8354565: jtreg failure handler GatherProcessInfoTimeoutHandler has a leftover call to System.loadLibrary

2025-04-15 Thread Jaikiran Pai
On Tue, 15 Apr 2025 05:50:03 GMT, Jaikiran Pai wrote: > Can I please get a review of this cleanup in the jtreg timeout handler > `GatherProcessInfoTimeoutHandler`? > > As noted in https://bugs.openjdk.org/browse/JDK-8354565, this is a leftover > after the change done in https://bugs.openjdk.ja

Re: RFR: 8354565: jtreg failure handler GatherProcessInfoTimeoutHandler has a leftover call to System.loadLibrary

2025-04-15 Thread Jaikiran Pai
On Tue, 15 Apr 2025 05:50:03 GMT, Jaikiran Pai wrote: > Can I please get a review of this cleanup in the jtreg timeout handler > `GatherProcessInfoTimeoutHandler`? > > As noted in https://bugs.openjdk.org/browse/JDK-8354565, this is a leftover > after the change done in https://bugs.openjdk.ja

Re: RFR: 8353786: Migrate Vector API math library support to FFM API [v5]

2025-04-15 Thread Xiaohong Gong
On Wed, 16 Apr 2025 00:20:07 GMT, Paul Sandoz wrote: >> Vladimir Ivanov 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 19 additional >> commits

Re: RFR: 8353786: Migrate Vector API math library support to FFM API [v5]

2025-04-15 Thread Xiaohong Gong
On Tue, 15 Apr 2025 17:43:52 GMT, Vladimir Ivanov wrote: >> src/jdk.incubator.vector/share/classes/jdk/incubator/vector/VectorMathLibrary.java >> line 198: >> >>> 196: if (vspecies.vectorBitSize() < 128) { >>> 197: return false; // 64-bit vectors are not supported >>

Re: RFR: 8352001: AOT cache should not contain classes injected into built-in class loaders [v2]

2025-04-15 Thread Ioi Lam
On Tue, 15 Apr 2025 21:54:56 GMT, Calvin Cheung wrote: >> Ioi Lam 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 >> sinc

Re: RFR: 8352001: AOT cache should not contain classes injected into built-in class loaders [v2]

2025-04-15 Thread Ioi Lam
On Tue, 15 Apr 2025 19:49:55 GMT, Matias Saavedra Silva wrote: >> Ioi Lam 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

Re: RFR: 8352001: AOT cache should not contain classes injected into built-in class loaders [v3]

2025-04-15 Thread Ioi Lam
> During an application's training run, it's possible to inject classes into > the built-in platform/app class loaders with reflection calls. > > - Before [JDK-8348426](https://bugs.openjdk.org/browse/JDK-8348426), only the > names of these classes were recorded in the AOT config file. When the

Re: RFR: 8354450: Using a File with a path containing a trailing space should fail when alternative data streams are disabled (win) [v2]

2025-04-15 Thread Brian Burkhalter
> In `java.io.WinNTFileSystem::isInvalid`, replace an insufficient test for > file path validity with a sufficient test for file path invalidity. Also, add > a new test. Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision: 8354450: A

Re: RFR: 8353786: Migrate Vector API math library support to FFM API [v5]

2025-04-15 Thread Paul Sandoz
On Fri, 11 Apr 2025 21:23:52 GMT, Vladimir Ivanov wrote: >> Migrate Vector API math library (SVML and SLEEF) linkage from native code >> (in JVM) to Java FFM API. >> >> Since FFM API doesn't support vector calling conventions yet, migration >> affects only symbol lookup for now. But it still e

Re: RFR: 8352504: RISC-V: implement and enable CMoveI/L [v8]

2025-04-15 Thread Fei Yang
On Fri, 11 Apr 2025 10:48:34 GMT, Hamlin Li wrote: >> Hi, >> Can you help to review this patch? >> On riscv, CMoveI/L already were implemented, but there are some gap: >> 1. CMoveI/L does not support comparison with float/double, corresponding >> tests are not turn on either. >> 2. Some optimiza

Re: RFR: 8354300: Fields in String are not trusted

2025-04-15 Thread Chen Liang
On Mon, 14 Apr 2025 14:47:59 GMT, Per Minborg wrote: > This PR proposes to add the `@Stable` annotation to `j.l.String.hash` and > `j.l.String.hashIsZero`. This means the VM can trust these fields to never > change which enables constant folding optimizations. > > This PR is tested in tier1, t

Re: RFR: 8354461: Update tests to disable streaming output for attach tools

2025-04-15 Thread Alex Menkov
On Tue, 15 Apr 2025 23:30:35 GMT, Alex Menkov wrote: > The change is a preparation step to enable attach streaming output by default. > The fix updates a number of tests which fail with timeout in tier1..tier7 > when attach streaming output is enabled. > Details in the first comment. > Testing:

RFR: 8354461: Update tests to disable streaming output for attach tools

2025-04-15 Thread Alex Menkov
The change is a preparation step to enable attach streaming output by default. The fix updates a number of tests which fail with timeout in tier1..tier7 when attach streaming output is enabled. Details in the first comment. Testing: tier1..7 with enabled attach streaming output - Com

Re: RFR: 8354522: Clones of DecimalFormat cause interferences when used concurrently [v6]

2025-04-15 Thread Naoto Sato
On Tue, 15 Apr 2025 22:21:31 GMT, Johannes Graham wrote: >> The `DigitList` class used in `DecimalFormat` does not reset the `data` >> array in its clone method. This can cause interference when clones are used >> concurrently. > > Johannes Graham has updated the pull request incrementally with

Re: RFR: 8301971: Make JDK source code UTF-8 [v3]

2025-04-15 Thread Sergey Bylokhov
On Mon, 14 Apr 2025 12:53:35 GMT, Magnus Ihse Bursie wrote: >> Most of the JDK code base has been transitioned to UTF-8, but not all. This >> has recently become an acute problem, since our mixing of iso-8859-1 and >> utf-8 in properties files confused the version of `sed` that is shipped with

Re: RFR: 8354522: Clones of DecimalFormat cause interferences when used concurrently [v6]

2025-04-15 Thread Johannes Graham
> The `DigitList` class used in `DecimalFormat` does not reset the `data` array > in its clone method. This can cause interference when clones are used > concurrently. Johannes Graham has updated the pull request incrementally with one additional commit since the last revision: break after m

Re: RFR: 8354522: Clones of DecimalFormat cause interferences when used concurrently [v4]

2025-04-15 Thread Naoto Sato
On Tue, 15 Apr 2025 21:47:49 GMT, Johannes Graham wrote: >> Ah, ok then. Thanks. > > Ok to leave as is? Or is the AtomicBoolean more clear? Ok to use it as a failure indicator (still I'd suggest breaking immediately after printing error) - PR Review Comment: https://git.openjdk.or

Re: [External] : Re: My experience using Java to do CLI Scripting

2025-04-15 Thread Roger Riggs
Hi, The cleanup of Process state is handled by the implementation. On Linux it waits for the exitStatus and when the process exits, it captures the status, drains any pending input into local buffers and closes the file descriptors. When the streams and Process implementation are GC'd any rem

Re: RFR: 8352001: AOT cache should not contain classes injected into built-in class loaders [v2]

2025-04-15 Thread Calvin Cheung
On Sat, 12 Apr 2025 18:37:18 GMT, Ioi Lam wrote: >> During an application's training run, it's possible to inject classes into >> the built-in platform/app class loaders with reflection calls. >> >> - Before [JDK-8348426](https://bugs.openjdk.org/browse/JDK-8348426), only >> the names of thes

Re: RFR: 8342486: Implement JEP 505: Structured Concurrency (Fifth Preview) [v8]

2025-04-15 Thread Viktor Klang
On Tue, 15 Apr 2025 13:38:21 GMT, Alan Bateman wrote: >> I'm not sure where we are on this topic. Clearly there's an edge between the >> pre-join and post-join phases. > > Yes, but it would be a topic for a different PR as we haven't changed > anything here. Agreed - PR Review Co

Re: RFR: 8342486: Implement JEP 505: Structured Concurrency (Fifth Preview) [v8]

2025-04-15 Thread Viktor Klang
On Tue, 15 Apr 2025 06:36:20 GMT, Alan Bateman wrote: >> Changes for [JEP 505: Structured Concurrency (Fifth >> Preview)](https://openjdk.org/jeps/8340343). The proposal is to re-preview >> the API with some changes, specifically: >> >> - A >> [StructuredTaskScope](https://download.java.net/j

Re: RFR: 8354522: Clones of DecimalFormat cause interferences when used concurrently [v4]

2025-04-15 Thread Johannes Graham
On Tue, 15 Apr 2025 21:40:56 GMT, Naoto Sato wrote: >> It would still need something to indicate that it had failed, as well as a >> way to signal other threads that they should terminate early. Worth changing >> to an AtomicBoolean? > > Ah, ok then. Thanks. Ok to leave as is? Or is the Atomic

Re: RFR: 8354522: Clones of DecimalFormat cause interferences when used concurrently [v5]

2025-04-15 Thread Johannes Graham
> The `DigitList` class used in `DecimalFormat` does not reset the `data` array > in its clone method. This can cause interference when clones are used > concurrently. Johannes Graham has updated the pull request incrementally with one additional commit since the last revision: throw on Inte

Re: RFR: 8354522: Clones of DecimalFormat cause interferences when used concurrently [v4]

2025-04-15 Thread Naoto Sato
On Tue, 15 Apr 2025 21:34:21 GMT, Johannes Graham wrote: >> test/jdk/java/text/Format/DecimalFormat/CloneTest.java line 77: >> >>> 75: String str = String.valueOf(value); >>> 76: if (!str.equals(dfString)) { >>> 77:

Re: RFR: 8354522: Clones of DecimalFormat cause interferences when used concurrently [v4]

2025-04-15 Thread Johannes Graham
On Tue, 15 Apr 2025 21:23:20 GMT, Naoto Sato wrote: >> Johannes Graham has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Terminate test early on failure > > test/jdk/java/text/Format/DecimalFormat/CloneTest.java line 77: > >> 75:

Re: RFR: 8354522: Clones of DecimalFormat cause interferences when used concurrently [v4]

2025-04-15 Thread Naoto Sato
On Tue, 15 Apr 2025 20:41:25 GMT, Johannes Graham wrote: >> The `DigitList` class used in `DecimalFormat` does not reset the `data` >> array in its clone method. This can cause interference when clones are used >> concurrently. > > Johannes Graham has updated the pull request incrementally with

Re: RFR: 8354522: Clones of DecimalFormat cause interferences when used concurrently [v2]

2025-04-15 Thread Johannes Graham
On Tue, 15 Apr 2025 20:21:40 GMT, Naoto Sato wrote: >> My thinking was that for a test pass, it would never hit the shortcut >> anyway, so it’s only an optimization for the failure case, which hopefully >> won’t happen anymore. Seeing the count of all collisions gives some >> reassurance that

Re: RFR: 8343110: Add getChars(int, int, char[], int) to CharSequence and CharBuffer [v5]

2025-04-15 Thread Roger Riggs
On Sun, 30 Mar 2025 12:34:06 GMT, Markus KARG wrote: >> This Pull Request proposes an implementation for >> [JDK-8343110](https://bugs.openjdk.org/browse/JDK-8343110): Adding the new >> method `public void getChars(int srcBegin, int srcEnd, char[] dst, int >> dstBegin)` to the `CharSequence` i

Re: RFR: 8354522: Clones of DecimalFormat cause interferences when used concurrently [v4]

2025-04-15 Thread Johannes Graham
> The `DigitList` class used in `DecimalFormat` does not reset the `data` array > in its clone method. This can cause interference when clones are used > concurrently. Johannes Graham has updated the pull request incrementally with one additional commit since the last revision: Terminate tes

Re: RFR: 8354522: Clones of DecimalFormat cause interferences when used concurrently [v2]

2025-04-15 Thread Naoto Sato
On Tue, 15 Apr 2025 20:07:09 GMT, Johannes Graham wrote: >> If a mismatch is found, I think we can stop there and report error > > My thinking was that for a test pass, it would never hit the shortcut anyway, > so it’s only an optimization for the failure case, which hopefully won’t > happen an

Re: RFR: 8354522: Clones of DecimalFormat cause interferences when used concurrently [v2]

2025-04-15 Thread Johannes Graham
On Tue, 15 Apr 2025 19:18:03 GMT, Naoto Sato wrote: >> For the original reproducer I wanted to be _really_ sure that it failed. >> I've reduced it to be more reasonable. With the current config it still gets >> 10-100 mismatches for me. I've limited the number of lines that get logged >> as we

Re: RFR: 8352001: AOT cache should not contain classes injected into built-in class loaders [v2]

2025-04-15 Thread Matias Saavedra Silva
On Sat, 12 Apr 2025 18:37:18 GMT, Ioi Lam wrote: >> During an application's training run, it's possible to inject classes into >> the built-in platform/app class loaders with reflection calls. >> >> - Before [JDK-8348426](https://bugs.openjdk.org/browse/JDK-8348426), only >> the names of thes

Re: RFR: 8354522: Clones of DecimalFormat cause interferences when used concurrently [v2]

2025-04-15 Thread Naoto Sato
On Tue, 15 Apr 2025 18:35:17 GMT, Johannes Graham wrote: >> test/jdk/java/text/Format/DecimalFormat/CloneTest.java line 54: >> >>> 52: DecimalFormat threadDf = (DecimalFormat) df.clone(); >>> 53: Runnable task = () -> { >>> 54: for (int j = 0;

Re: RFR: 8354522: Clones of DecimalFormat cause interferences when used concurrently [v2]

2025-04-15 Thread Johannes Graham
On Tue, 15 Apr 2025 16:49:57 GMT, Justin Lu wrote: >> Johannes Graham has updated the pull request incrementally with two >> additional commits since the last revision: >> >> - fix test summary >> - add test > > test/jdk/java/text/Format/DecimalFormat/CloneTest.java line 27: > >> 25: * @tes

Re: RFR: 8354522: Clones of DecimalFormat cause interferences when used concurrently [v3]

2025-04-15 Thread Johannes Graham
> The `DigitList` class used in `DecimalFormat` does not reset the `data` array > in its clone method. This can cause interference when clones are used > concurrently. Johannes Graham has updated the pull request incrementally with one additional commit since the last revision: Tune the test

Re: [External] : Re: My experience using Java to do CLI Scripting

2025-04-15 Thread Stuart Marks
On 4/15/25 5:30 AM, Ron Pressler wrote: On 15 Apr 2025, at 10:51, fo...@univ-mlv.fr wrote: >> +1 for readAllInputLines() and readInputString() on Process. Wouldn’t it make more sense to add these to BufferedReader? Yes. Process already has four Reader-based overloads: - inputReader() -

Re: [External] : Re: My experience using Java to do CLI Scripting

2025-04-15 Thread Stuart Marks
On 4/14/25 11:52 PM, Cay Horstmann wrote: * How exactly do I use getInputStream()/inputReader() with *extreme care*, as the API doc warns me? Ah. This is referring to the following note in the Process.getInputStream() method spec: API Note: Use getInputStream() and inputReader() with

Re: RFR: 8315130: java.lang.IllegalAccessError when processing classlist to create CDS archive [v8]

2025-04-15 Thread Calvin Cheung
On Mon, 14 Apr 2025 14:04:33 GMT, Timofei Pushkin wrote: >> If a base class is package-private then its subclasses should have the same >> package name and defining class loader, otherwise `IllegalAccessError` is >> thrown when linking a subclass. Currently when dumping a static archive >> sep

Re: RFR: 8353786: Migrate Vector API math library support to FFM API [v5]

2025-04-15 Thread Vladimir Ivanov
On Tue, 15 Apr 2025 09:29:32 GMT, Xiaohong Gong wrote: >> Vladimir Ivanov 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 19 additional >> commi

Re: [External] : Re: My experience using Java to do CLI Scripting

2025-04-15 Thread Ron Pressler
> On 14 Apr 2025, at 21:48, Remi Forax wrote: > > > Hi Ron, > i think you need to close the inputReader > > public static String output(String... args) { >ProcessBuilder processBuilder = new ProcessBuilder(args); >try { > Process process = processBuilder.start(); > try (Buf

Re: RFR: 8354464: Additional cleanup setting up native.encoding

2025-04-15 Thread Naoto Sato
On Tue, 15 Apr 2025 17:04:35 GMT, Naoto Sato wrote: >> Remove the #ifdef MACOSX from platform-independent System.c, which (on Mac) >> sets native.encoding from sprops.encoding or (on non-Mac Unix and Windows) >> sets native.encoding from sprops.sun_jnu_encoding. After this removal, the >> nati

Re: RFR: 8354522: Clones of DecimalFormat cause interferences when used concurrently [v2]

2025-04-15 Thread Justin Lu
On Tue, 15 Apr 2025 14:43:56 GMT, Johannes Graham wrote: >> The `DigitList` class used in `DecimalFormat` does not reset the `data` >> array in its clone method. This can cause interference when clones are used >> concurrently. > > Johannes Graham has updated the pull request incrementally with

Re: RFR: 8354464: Additional cleanup setting up native.encoding

2025-04-15 Thread Naoto Sato
On Sat, 12 Apr 2025 02:19:35 GMT, Stuart Marks wrote: > Remove the #ifdef MACOSX from platform-independent System.c, which (on Mac) > sets native.encoding from sprops.encoding or (on non-Mac Unix and Windows) > sets native.encoding from sprops.sun_jnu_encoding. After this removal, the > native

RFR: 8354629: Test tools/jlink/ClassFileInMetaInfo.java fails on builds with configure option --enable-linkable-runtime

2025-04-15 Thread Severin Gehwolf
Please review this trivial test-only fix. A new test introduced with [JDK-8353267](https://bugs.openjdk.org/browse/JDK-8353267) runs `jlink` using the `ToolProvider` API in-process. This is problematic for JEP 493 enabled builds which don't allow to be run on a patched JDK. Note that JTREG patch

Re: RFR: 8354450: Using a File with a path containing a trailing space should fail when alternative data streams are disabled (win)

2025-04-15 Thread Alan Bateman
On Mon, 14 Apr 2025 20:57:17 GMT, Brian Burkhalter wrote: > In `java.io.WinNTFileSystem::isInvalid`, replace an insufficient test for > file path validity with a sufficient test for file path invalidity. Also, add > a new test. I don't think we can't couple these too, meaning the ADS configura

Re: RFR: 8354629: Test tools/jlink/ClassFileInMetaInfo.java fails on builds with configure option --enable-linkable-runtime

2025-04-15 Thread Alan Bateman
On Tue, 15 Apr 2025 13:09:31 GMT, Severin Gehwolf wrote: > Please review this trivial test-only fix. A new test introduced with > [JDK-8353267](https://bugs.openjdk.org/browse/JDK-8353267) runs `jlink` using > the `ToolProvider` API in-process. This is problematic for JEP 493 enabled > builds

Re: RFR: 8354084: Streamline XPath API's extension function control [v3]

2025-04-15 Thread Joe Wang
> Streamline the extension function control in the XPath API by relying solely > on > [XPathFunctionResolver](https://docs.oracle.com/en/java/javase/24/docs/api/java.xml/javax/xml/xpath/XPathFunctionResolver.html), > which provides a secure and developer-defined mechanism. Remove the feature >

Re: RFR: 8346230: [perf] scalability issue for the specjvm2008::xml.transform workload [v6]

2025-04-15 Thread Jatin Bhateja
On Mon, 14 Apr 2025 15:22:21 GMT, Vladimir Ivanov wrote: >> The HashMap for caching was deleted. Now it use only ThreadLocal variable >> without synchronization. >> According to the specjvm2008::xml.transform workload the performance for low >> threads counts was not affected and improved for h

Re: RFR: 8346230: [perf] scalability issue for the specjvm2008::xml.transform workload [v6]

2025-04-15 Thread Vladimir Ivanov
> The HashMap for caching was deleted. Now it use only ThreadLocal variable > without synchronization. > According to the specjvm2008::xml.transform workload the performance for low > threads counts was not affected and improved for high threads counts. > For the 2 socket server based on Xeon 67

Re: RFR: 8342486: Implement JEP 505: Structured Concurrency (Fifth Preview) [v8]

2025-04-15 Thread Chen Liang
On Tue, 15 Apr 2025 06:36:20 GMT, Alan Bateman wrote: >> Changes for [JEP 505: Structured Concurrency (Fifth >> Preview)](https://openjdk.org/jeps/8340343). The proposal is to re-preview >> the API with some changes, specifically: >> >> - A >> [StructuredTaskScope](https://download.java.net/j

Re: RFR: 8348986: Improve coverage of enhanced exception messages [v6]

2025-04-15 Thread Daniel Fuchs
On Tue, 15 Apr 2025 14:35:28 GMT, Michael McMahon wrote: >> Hi, >> >> Enhanced exception messages are designed to hide sensitive information such >> as hostnames, IP >> addresses from exception message strings, unless the enhanced mode for the >> specific category >> has been explicitly enab

Re: RFR: 8354522: Clones of DecimalFormat cause interferences when used concurrently

2025-04-15 Thread Johannes Graham
On Fri, 11 Apr 2025 17:31:08 GMT, Johannes Graham wrote: > The `DigitList` class used in `DecimalFormat` does not reset the `data` array > in its clone method. This can cause interference when clones are used > concurrently. Reproducing code example: public class DecimalFormatTest { stat

Re: RFR: 8354084: Streamline XPath API's extension function control [v3]

2025-04-15 Thread Naoto Sato
On Mon, 14 Apr 2025 21:00:22 GMT, Joe Wang wrote: >> Streamline the extension function control in the XPath API by relying solely >> on >> [XPathFunctionResolver](https://docs.oracle.com/en/java/javase/24/docs/api/java.xml/javax/xml/xpath/XPathFunctionResolver.html), >> which provides a secure

Integrated: 8354320: Changes to jpackage.md cause pandoc warning

2025-04-15 Thread Alexey Semenyuk
On Thu, 10 Apr 2025 21:50:10 GMT, Alexey Semenyuk wrote: > Escape the dollar sign. This pull request has now been integrated. Changeset: fc146472 Author:Alexey Semenyuk URL: https://git.openjdk.org/jdk/commit/fc1464727f95508935cfc65d689b74e1709d3649 Stats: 10 lines in 2 files ch

Re: RFR: 8354522: Clones of DecimalFormat cause interferences when used concurrently

2025-04-15 Thread Alan Bateman
On Fri, 11 Apr 2025 17:31:08 GMT, Johannes Graham wrote: > The `DigitList` class used in `DecimalFormat` does not reset the `data` array > in its clone method. This can cause interference when clones are used > concurrently. Are you going to turn the reproducer into a test? I don't know if we

Re: RFR: 8342486: Implement JEP 505: Structured Concurrency (Fifth Preview) [v8]

2025-04-15 Thread Alan Bateman
On Tue, 15 Apr 2025 13:15:25 GMT, Viktor Klang wrote: >> src/java.base/share/classes/java/util/concurrent/StructuredTaskScope.java >> line 337: >> >>> 335: * >> href="{@docRoot}/java.base/java/util/concurrent/package-summary.html#MemoryVisibility"> >>> 336: * happen-before any actions taken b

Integrated: 8343157: Examine large files for character encoding/decoding

2025-04-15 Thread Naoto Sato
On Fri, 11 Apr 2025 17:02:13 GMT, Naoto Sato wrote: > Removing old charset test cases that verify new charset implementations (as > of JDK7). Removed tests/files are actual charset implementations used in > pre-JDK7, which have been used for comparing the results. Since those "new" > implement

RFR: 8354513: Bug in j.u.l.Handler deadlock test allows null pointer during race condition

2025-04-15 Thread David Beaumont
Add null pointer guard in test formatter (since it can be called with a log record without parameters). - Commit messages: - Adding null check for test formatter. Changes: https://git.openjdk.org/jdk/pull/24619/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=24619&range=00

Re: RFR: 8354300: Fields in String are not trusted

2025-04-15 Thread Chen Liang
On Mon, 14 Apr 2025 14:47:59 GMT, Per Minborg wrote: > This PR proposes to add the `@Stable` annotation to `j.l.String.hash` and > `j.l.String.hashIsZero`. This means the VM can trust these fields to never > change which enables constant folding optimizations. > > This PR is tested in tier1, t

Re: RFR: 8352504: RISC-V: implement and enable CMoveI/L [v8]

2025-04-15 Thread Hamlin Li
On Mon, 14 Apr 2025 03:24:18 GMT, Feilong Jiang wrote: >> Hamlin Li has updated the pull request incrementally with one additional >> commit since the last revision: >> >> minors > > Looks good. Thanks! Thank you @feilongjiang @RealFYang ! - PR Comment: https://git.openjdk.org/

Re: RFR: 8354513: Bug in j.u.l.Handler deadlock test allows null pointer during race condition

2025-04-15 Thread Daniel Fuchs
On Mon, 14 Apr 2025 10:56:45 GMT, David Beaumont wrote: > Add null pointer guard in test formatter (since it can be called with a log > record without parameters). Trivial fix. Looks like the right thing to do. - Marked as reviewed by dfuchs (Reviewer). PR Review: https://git.ope

Re: RFR: 8354450: Using a File with a path containing a trailing space should fail when alternative data streams are disabled (win)

2025-04-15 Thread Brian Burkhalter
On Tue, 15 Apr 2025 13:03:03 GMT, Alan Bateman wrote: > I don't think we should couple these two, meaning the ADS configuration > shouldn't influence whether trailing spaces are allowed. I think we can still > fat path when the input doesn't contain a space, just might need a slower > path whe

Re: RFR: 8342486: Implement JEP 505: Structured Concurrency (Fifth Preview) [v8]

2025-04-15 Thread Alan Bateman
On Tue, 15 Apr 2025 06:35:53 GMT, Chen Liang wrote: > 1. Should we add the other exceptions as suppressed to the first? It's a good question and one that we mulled over when creating STS.ShutdownOnFailure. We're not proposing to change it in this update as it doesn't scale when many subtasks f

Re: RFR: 8354522: Clones of DecimalFormat cause interferences when used concurrently [v2]

2025-04-15 Thread Johannes Graham
On Tue, 15 Apr 2025 14:43:56 GMT, Johannes Graham wrote: >> The `DigitList` class used in `DecimalFormat` does not reset the `data` >> array in its clone method. This can cause interference when clones are used >> concurrently. > > Johannes Graham has updated the pull request incrementally with

Re: RFR: 8354522: Clones of DecimalFormat cause interferences when used concurrently [v2]

2025-04-15 Thread Johannes Graham
> The `DigitList` class used in `DecimalFormat` does not reset the `data` array > in its clone method. This can cause interference when clones are used > concurrently. Johannes Graham has updated the pull request incrementally with two additional commits since the last revision: - fix test su

Re: RFR: 8348986: Improve coverage of enhanced exception messages [v6]

2025-04-15 Thread Michael McMahon
> Hi, > > Enhanced exception messages are designed to hide sensitive information such > as hostnames, IP > addresses from exception message strings, unless the enhanced mode for the > specific category > has been explicitly enabled. Enhanced exceptions were first introduced in > 8204233 in JD

RFR: 8354522: Clones of DecimalFormat cause interferences when used concurrently

2025-04-15 Thread Johannes Graham
The `DigitList` class used in `DecimalFormat` does not reset the `data` array in its clone method. This can cause interference when clones are used concurrently. - Commit messages: - reset "data" field in clone Changes: https://git.openjdk.org/jdk/pull/24598/files Webrev: https:

Re: RFR: 8342486: Implement JEP 505: Structured Concurrency (Fifth Preview) [v8]

2025-04-15 Thread Viktor Klang
On Thu, 7 Nov 2024 10:51:15 GMT, Alan Bateman wrote: >> Alan Bateman has updated the pull request with a new target base due to a >> merge or a rebase. The pull request now contains 15 commits: >> >> - Add JEP number, update copyright headers >> - Merge branch 'master' into JDK-8342486 >> -

Re: [External] : Re: My experience using Java to do CLI Scripting

2025-04-15 Thread Ron Pressler
> On 15 Apr 2025, at 10:51, fo...@univ-mlv.fr wrote: > > - Original Message - >> From: "Stuart Marks" >> To: "Remi Forax" , "Ron Pressler" >> , "David Alayachew" >> >> Cc: "cay horstmann" , "core-libs-dev" >> >> Sent: Tuesday, April 15, 2025 12:10:54 AM >> Subject: Re: My experience

Re: RFR: 8315130: java.lang.IllegalAccessError when processing classlist to create CDS archive [v6]

2025-04-15 Thread Timofei Pushkin
On Tue, 15 Apr 2025 00:58:19 GMT, Ioi Lam wrote: >> This case will work, I've added the test, however I found another case which >> won't be handled correctly, neither before nor after this change. >> >> This is the case you've suggested, it works fine both before and after the >> change. >>

Re: RFR: 8348986: Improve coverage of enhanced exception messages [v5]

2025-04-15 Thread Michael McMahon
On Mon, 14 Apr 2025 14:20:39 GMT, Daniel Fuchs wrote: >> Michael McMahon has updated the pull request incrementally with one >> additional commit since the last revision: >> >> update to minimise code changes > > test/jdk/java/net/URI/Test.java line 29: > >> 27: * 7171415 6339649 69338

RFR: 8354565: jtreg failure handler GatherProcessInfoTimeoutHandler has a leftover call to System.loadLibrary

2025-04-15 Thread Jaikiran Pai
Can I please get a review of this cleanup in the jtreg timeout handler `GatherProcessInfoTimeoutHandler`? As noted in https://bugs.openjdk.org/browse/JDK-8354565, this is a leftover after the change done in https://bugs.openjdk.java.net/browse/JDK-8268626. The `timeoutHandler` native test libra

Re: RFR: 8348986: Improve coverage of enhanced exception messages [v5]

2025-04-15 Thread Michael McMahon
On Mon, 14 Apr 2025 13:51:30 GMT, Daniel Fuchs wrote: >> Michael McMahon has updated the pull request incrementally with one >> additional commit since the last revision: >> >> update to minimise code changes > > src/java.base/share/classes/java/net/Proxy.java line 102: > >> 100:

Integrated: 8353185: Introduce the concept of upgradeable files in context of JEP 493

2025-04-15 Thread Severin Gehwolf
On Wed, 2 Apr 2025 18:39:57 GMT, Severin Gehwolf wrote: > For JEP 493-enabled builds there are no JMODs. Certain files come from the > installed JDK image when a user creates a custom run-time from it. This is > problematic for example for files that often come from a different package > (e.g.

Re: RFR: 8354111: JavaDoc states that Iterator.remove() is linear in the LinkedBlockingDeque

2025-04-15 Thread Chen Liang
On Tue, 8 Apr 2025 08:50:37 GMT, kabutz wrote: > One of the features of the LinkedBlockingDeque is that it is a doubly-linked > node queue, with pointers in each node to "prev" and "next", which allows > remove() in the Iterator to remove the node in constant time. However, in the > JavaDoc of

Re: My experience using Java to do CLI Scripting

2025-04-15 Thread forax
- Original Message - > From: "Stuart Marks" > To: "Remi Forax" , "Ron Pressler" > , "David Alayachew" > > Cc: "cay horstmann" , "core-libs-dev" > > Sent: Tuesday, April 15, 2025 12:10:54 AM > Subject: Re: My experience using Java to do CLI Scripting > On 4/14/25 1:48 PM, Remi Forax wr

Re: [External] : Re: My experience using Java to do CLI Scripting

2025-04-15 Thread Ron Pressler
> On 15 Apr 2025, at 07:52, Cay Horstmann wrote: > > > > Il 14/04/25 23:46, Ron Pressler ha scritto: >>> On 14 Apr 2025, at 21:48, Remi Forax wrote: >>> >>> >>> Hi Ron, >>> i think you need to close the inputReader >>> >>> public static String output(String... args) { >>>ProcessBuild

Re: [External] : Re: My experience using Java to do CLI Scripting

2025-04-15 Thread forax
- Original Message - > From: "Ron Pressler" > To: "Remi Forax" > Cc: "cay horstmann" , "core-libs-dev" > , "David Alayachew" > > Sent: Monday, April 14, 2025 11:46:25 PM > Subject: Re: [External] : Re: My experience using Java to do CLI Scripting >> On 14 Apr 2025, at 21:48, Remi Forax

Re: RFR: 8353786: Migrate Vector API math library support to FFM API [v5]

2025-04-15 Thread Xiaohong Gong
On Fri, 11 Apr 2025 21:23:52 GMT, Vladimir Ivanov wrote: >> Migrate Vector API math library (SVML and SLEEF) linkage from native code >> (in JVM) to Java FFM API. >> >> Since FFM API doesn't support vector calling conventions yet, migration >> affects only symbol lookup for now. But it still e

Re: [External] : Re: My experience using Java to do CLI Scripting

2025-04-15 Thread Cay Horstmann
Il 14/04/25 23:46, Ron Pressler ha scritto: On 14 Apr 2025, at 21:48, Remi Forax wrote: Hi Ron, i think you need to close the inputReader public static String output(String... args) { ProcessBuilder processBuilder = new ProcessBuilder(args); try { Process process = proce

Re: RFR: 8342486: Implement JEP 505: Structured Concurrency (Fifth Preview) [v7]

2025-04-15 Thread Alan Bateman
On Fri, 11 Apr 2025 08:14:52 GMT, Alan Bateman wrote: >> Changes for [JEP 505: Structured Concurrency (Fifth >> Preview)](https://openjdk.org/jeps/8340343). The proposal is to re-preview >> the API with some changes, specifically: >> >> - A >> [StructuredTaskScope](https://download.java.net/j

Re: [External] : Re: My experience using Java to do CLI Scripting

2025-04-15 Thread Bernd
You need to drain those streams in two dedicated threats - or in some cases use the redirect feature to pipe it to the stdout of the parent (good option for automation scripting)I think without a helper ProcessBuilder is hard to use for such cases -- https://bernd.eckenfels.netFrom: core-libs-dev