Re: RFR: 8316879: RegionMatches1Tests fails if CompactStrings are disabled after JDK-8302163

2023-09-25 Thread Alan Bateman
On Mon, 25 Sep 2023 15:52:12 GMT, Aleksei Voitylov wrote: > test java.lang.String.RegionMatches1Tests fails on all platforms with > -XX:-CompactStrings option and on ARM32 where Compact Strings is disabled by > default. The fix is to return true immediately if len is negative, since for >

RFR: 8316927: JFR: Move shouldCommit check earlier for socket events

2023-09-25 Thread Erik Gahlin
Hi, The events for socket read and socket write retrieves the remote address even in cases where the event didn't exceed the threshold. By moving the shouldCommit check earlier, it can be avoided. Testing: jdk/jdk/jfr Thanks Erik - Commit messages: - Socket write event -

Re: RFR: 8316879: RegionMatches1Tests fails if CompactStrings are disabled after JDK-8302163

2023-09-25 Thread Logan Abernathy
On Mon, 25 Sep 2023 15:52:12 GMT, Aleksei Voitylov wrote: > test java.lang.String.RegionMatches1Tests fails on all platforms with > -XX:-CompactStrings option and on ARM32 where Compact Strings is disabled by > default. The fix is to return true immediately if len is negative, since for >

Re: RFR: 8316000: File.setExecutable silently fails if file does not exist [v6]

2023-09-25 Thread Brian Burkhalter
> On Windows, do not return `true` from the `java.io.File` methods > `setReadable(boolean, boolean)` and `setExecutable(boolean, boolean)` if the > file does not exist. Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision: 8316000:

Re: RFR: 8316879: RegionMatches1Tests fails if CompactStrings are disabled after JDK-8302163

2023-09-25 Thread Volker Simonis
On Mon, 25 Sep 2023 15:52:12 GMT, Aleksei Voitylov wrote: > test java.lang.String.RegionMatches1Tests fails on all platforms with > -XX:-CompactStrings option and on ARM32 where Compact Strings is disabled by > default. The fix is to return true immediately if len is negative, since for >

Re: RFR: 8316879: RegionMatches1Tests fails if CompactStrings are disabled after JDK-8302163

2023-09-25 Thread Volker Simonis
On Mon, 25 Sep 2023 15:52:12 GMT, Aleksei Voitylov wrote: > test java.lang.String.RegionMatches1Tests fails on all platforms with > -XX:-CompactStrings option and on ARM32 where Compact Strings is disabled by > default. The fix is to return true immediately if len is negative, since for >

Integrated: 8310631: test/jdk/sun/nio/cs/TestCharsetMapping.java is spuriously passing

2023-09-25 Thread Naoto Sato
On Tue, 19 Sep 2023 01:01:14 GMT, Naoto Sato wrote: > Fixed the failing (well, false-positive) test case. Made the following > changes to the test: > > - Corrected the path to the mapping files directory > - Made sure to fail if the directory path is incorrect > - Took care of `GB18030` alias,

Re: RFR: 8315532: Compiler Implementation for Unnamed Variables and Patterns

2023-09-25 Thread Jan Lahoda
On Sat, 9 Sep 2023 00:02:20 GMT, Aggelos Biboudis wrote: > This PR finalizes the feature of unnamed variables and patterns. > > - > ### Progress > - [ ] Change must be properly reviewed (1 review required, with at least 1 > [Reviewer](https://openjdk.org/bylaws#reviewer)) > - [x]

Re: RFR: 8316879: RegionMatches1Tests fails if CompactStrings are disabled after JDK-8302163

2023-09-25 Thread Volker Simonis
On Mon, 25 Sep 2023 15:52:12 GMT, Aleksei Voitylov wrote: > test java.lang.String.RegionMatches1Tests fails on all platforms with > -XX:-CompactStrings option and on ARM32 where Compact Strings is disabled by > default. The fix is to return true immediately if len is negative, since for >

Re: RFR: 8309130: x86_64 AVX512 intrinsics for Arrays.sort methods (int, long, float and double arrays) [v30]

2023-09-25 Thread Sandhya Viswanathan
On Wed, 30 Aug 2023 02:01:38 GMT, Vladimir Kozlov wrote: >> Srinivas Vamsi Parasa has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Clean up parameters passed to arrayPartition; update the check to load >> library > > Good. Thank you.

Re: RFR: 8312522: Implementation of Foreign Function & Memory API [v27]

2023-09-25 Thread Jorn Vernee
> This patch contains the implementation of the foreign linker & memory API JEP > for Java 22. The initial patch is composed of commits brought over directly > from the [panama-foreign repo](https://github.com/openjdk/panama-foreign). > The main changes found in this patch come from the

Re: RFR: 8312522: Implementation of Foreign Function & Memory API [v26]

2023-09-25 Thread Maurizio Cimadamore
On Mon, 25 Sep 2023 16:44:01 GMT, Maurizio Cimadamore wrote: >> Jorn Vernee has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Tweak support for restricted methods >> >> Reviewed-by: jvernee, pminborg > >

Re: RFR: 8312522: Implementation of Foreign Function & Memory API [v26]

2023-09-25 Thread Maurizio Cimadamore
On Mon, 25 Sep 2023 15:09:09 GMT, Jorn Vernee wrote: >> This patch contains the implementation of the foreign linker & memory API >> JEP for Java 22. The initial patch is composed of commits brought over >> directly from the [panama-foreign >> repo](https://github.com/openjdk/panama-foreign).

Integrated: 8271268: Fix Javadoc links for Stream.mapMulti

2023-09-25 Thread Mourad Abbay
On Mon, 18 Sep 2023 18:09:57 GMT, Mourad Abbay wrote: > Fix Javadoc links for Stream.mapMulti, Stream.MapMultiInt, > Stream.mapMultiToInt, Stream.mapMultiToLong and Stream.mapMultiToDouble. This pull request has now been integrated. Changeset: afa48333 Author:Mourad Abbay Committer: Paul

Re: RFR: 8316851: Add @sealedGraph to Executable

2023-09-25 Thread Joe Darcy
On Mon, 25 Sep 2023 08:11:48 GMT, Per Minborg wrote: > This PR proposes to add the @sealedGraph tag to > `java.lang.reflect.Executable`. Please update the copyright year before pushing. - Marked as reviewed by darcy (Reviewer). PR Review:

RFR: 8316879: RegionMatches1Tests fails if CompactStrings are disabled after JDK-8302163

2023-09-25 Thread Aleksei Voitylov
test java.lang.String.RegionMatches1Tests fails on all platforms with -XX:-CompactStrings option and on ARM32 where Compact Strings is disabled by default. The fix is to return true immediately if len is negative, since for negative length this condition will never be satisfied. Testing: JCK,

Re: RFR: 8311906: Race condition in String constructor

2023-09-25 Thread Chen Liang
On Mon, 25 Sep 2023 12:28:40 GMT, Chen Liang wrote: > In the constructor of String, many locations the user-supplied byte or char > arrays are read multiple times with a plain memory access; if a user > previously wrote to one of such locations out of happens-before order, > distinct plain

Re: RFR: 8288899: java/util/concurrent/ExecutorService/CloseTest.java failed with "InterruptedException: sleep interrupted" [v38]

2023-09-25 Thread Doug Lea
> Addresses Jdk 8288899 : java/util/concurrent/ExecutorService/CloseTest.java > failed with "InterruptedException: sleep interrupted" and related issues. > > This is a major ForkJoin update (and hard to review -- sorry) that finally > addresses incompatibilities between ExecutorService and

Re: RFR: 8312522: Implementation of Foreign Function & Memory API [v26]

2023-09-25 Thread Jorn Vernee
> This patch contains the implementation of the foreign linker & memory API JEP > for Java 22. The initial patch is composed of commits brought over directly > from the [panama-foreign repo](https://github.com/openjdk/panama-foreign). > The main changes found in this patch come from the

Re: RFR: 8288899: java/util/concurrent/ExecutorService/CloseTest.java failed with "InterruptedException: sleep interrupted" [v37]

2023-09-25 Thread Doug Lea
> Addresses Jdk 8288899 : java/util/concurrent/ExecutorService/CloseTest.java > failed with "InterruptedException: sleep interrupted" and related issues. > > This is a major ForkJoin update (and hard to review -- sorry) that finally > addresses incompatibilities between ExecutorService and

Re: RFR: 8312522: Implementation of Foreign Function & Memory API [v22]

2023-09-25 Thread Jorn Vernee
On Fri, 22 Sep 2023 16:58:05 GMT, Maurizio Cimadamore wrote: >> Here you go: >> https://cr.openjdk.org/~jvernee/FFM_22_PR_v1/java.base/java/lang/foreign/SegmentAllocator.html#allocateFrom(java.lang.foreign.ValueLayout,java.lang.foreign.MemorySegment,java.lang.foreign.ValueLayout,long,long) > >

Re: RFR: 8312522: Implementation of Foreign Function & Memory API [v25]

2023-09-25 Thread Jorn Vernee
> This patch contains the implementation of the foreign linker & memory API JEP > for Java 22. The initial patch is composed of commits brought over directly > from the [panama-foreign repo](https://github.com/openjdk/panama-foreign). > The main changes found in this patch come from the

RFR: 8315532: Compiler Implementation for Unnamed Variables and Patterns

2023-09-25 Thread Aggelos Biboudis
8315532: Compiler Implementation for Unnamed Variables and Patterns - Commit messages: - 8315532: Compiler Implementation for Unnamed Variables and Patterns Changes: https://git.openjdk.org/jdk/pull/15649/files Webrev: https://webrevs.openjdk.org/?repo=jdk=15649=00 Issue:

Re: RFR: 8316704: Regex-free parsing of Formatter and FormatProcessor specifiers [v10]

2023-09-25 Thread 温绍锦
> @cl4es made performance optimizations for the simple specifiers of > String.format in PR https://github.com/openjdk/jdk/pull/2830. Based on the > same idea, I continued to make improvements. I made patterns like %2d %02d > also be optimized. > > The following are the test results based on

Re: RFR: 8316150: Refactor get chars and string size [v21]

2023-09-25 Thread Roger Riggs
On Sun, 24 Sep 2023 02:46:38 GMT, 温绍锦 wrote: >> 1. Reduce duplicate stringSize code >> 2. Move java.lang.StringLatin1.getChars to >> jdk.internal.util.DecimalDigits::getCharLatin1,not only java.lang, other >> packages also need to use this method > > 温绍锦 has updated the pull request

Re: RFR: 8311906: Race condition in String constructor

2023-09-25 Thread Chen Liang
On Mon, 25 Sep 2023 12:28:40 GMT, Chen Liang wrote: > In the constructor of String, many locations the user-supplied byte or char > arrays are read multiple times with a plain memory access; if a user > previously wrote to one of such locations out of happens-before order, > distinct plain

Re: RFR: 8316704: Regex-free parsing of Formatter and FormatProcessor specifiers [v7]

2023-09-25 Thread 温绍锦
On Mon, 25 Sep 2023 12:28:06 GMT, Claes Redestad wrote: >> 温绍锦 has updated the pull request incrementally with one additional commit >> since the last revision: >> >> fix logic error > > src/java.base/share/classes/java/util/Formatter.java line 2949: > >> 2947: }

Re: RFR: 8316704: Regex-free parsing of Formatter and FormatProcessor specifiers [v9]

2023-09-25 Thread 温绍锦
> @cl4es made performance optimizations for the simple specifiers of > String.format in PR https://github.com/openjdk/jdk/pull/2830. Based on the > same idea, I continued to make improvements. I made patterns like %2d %02d > also be optimized. > > The following are the test results based on

RFR: 8303374: Compiler Implementation for Primitive types in patterns, instanceof, and switch (Preview)

2023-09-25 Thread Aggelos Biboudis
This is the first draft of a patch for Primitive types in patterns, instanceof, and switch (Preview). Draft spec here: https://cr.openjdk.org/~abimpoudis/instanceof/instanceof-20230913/specs/instanceof-jls.html - Commit messages: - 8303374: Compiler Implementation for Primitive

Re: RFR: 8311906: Race condition in String constructor

2023-09-25 Thread Roger Riggs
On Mon, 25 Sep 2023 12:28:40 GMT, Chen Liang wrote: > In the constructor of String, many locations the user-supplied byte or char > arrays are read multiple times with a plain memory access; if a user > previously wrote to one of such locations out of happens-before order, > distinct plain

Re: RFR: 8316704: Regex-free parsing of Formatter and FormatProcessor specifiers [v7]

2023-09-25 Thread Claes Redestad
On Sun, 24 Sep 2023 20:27:53 GMT, 温绍锦 wrote: >> @cl4es made performance optimizations for the simple specifiers of >> String.format in PR https://github.com/openjdk/jdk/pull/2830. Based on the >> same idea, I continued to make improvements. I made patterns like %2d %02d >> also be optimized.

Re: RFR: 8316704: Regex-free parsing of Formatter and FormatProcessor specifiers [v8]

2023-09-25 Thread Claes Redestad
On Mon, 25 Sep 2023 12:06:52 GMT, 温绍锦 wrote: >> @cl4es made performance optimizations for the simple specifiers of >> String.format in PR https://github.com/openjdk/jdk/pull/2830. Based on the >> same idea, I continued to make improvements. I made patterns like %2d %02d >> also be optimized.

Re: RFR: 8311906: Race condition in String constructor

2023-09-25 Thread Alan Bateman
On Mon, 25 Sep 2023 12:28:40 GMT, Chen Liang wrote: > In the constructor of String, many locations the user-supplied byte or char > arrays are read multiple times with a plain memory access; if a user > previously wrote to one of such locations out of happens-before order, > distinct plain

RFR: 8311906: Race condition in String constructor

2023-09-25 Thread Chen Liang
In the constructor of String, many locations the user-supplied byte or char arrays are read multiple times with a plain memory access; if a user previously wrote to one of such locations out of happens-before order, distinct plain memory reads may result in different unanticipated values. The

Re: RFR: 8316704: Regex-free parsing of Formatter and FormatProcessor specifiers [v7]

2023-09-25 Thread 温绍锦
On Mon, 25 Sep 2023 11:46:36 GMT, Claes Redestad wrote: > > The reason why I split it into multiple small methods is to avoid a single > > method codeSize > 325. After merging small methods, the performance will > > decrease. > > Yes, I can refactor to keep the same structure and verify

Re: RFR: 8288899: java/util/concurrent/ExecutorService/CloseTest.java failed with "InterruptedException: sleep interrupted" [v36]

2023-09-25 Thread Doug Lea
> Addresses Jdk 8288899 : java/util/concurrent/ExecutorService/CloseTest.java > failed with "InterruptedException: sleep interrupted" and related issues. > > This is a major ForkJoin update (and hard to review -- sorry) that finally > addresses incompatibilities between ExecutorService and

Re: RFR: 8316704: Regex-free parsing of Formatter and FormatProcessor specifiers [v8]

2023-09-25 Thread 温绍锦
> @cl4es made performance optimizations for the simple specifiers of > String.format in PR https://github.com/openjdk/jdk/pull/2830. Based on the > same idea, I continued to make improvements. I made patterns like %2d %02d > also be optimized. > > The following are the test results based on

Re: RFR: 8316000: File.setExecutable silently fails if file does not exist [v5]

2023-09-25 Thread Alan Bateman
On Fri, 22 Sep 2023 22:46:43 GMT, Brian Burkhalter wrote: >> On Windows, do not return `true` from the `java.io.File` methods >> `setReadable(boolean, boolean)` and `setExecutable(boolean, boolean)` if the >> file does not exist. > > Brian Burkhalter has updated the pull request incrementally

Re: RFR: 8314438: NMT: Performance benchmarks are needed to have a baseline for comparison of improvements [v2]

2023-09-25 Thread Afshin Zafari
On Mon, 25 Sep 2023 07:41:24 GMT, Alan Bateman wrote: >> Afshin Zafari has updated the pull request incrementally with one additional >> commit since the last revision: >> >> new benchmark moved to vm/runtime folder. > > test/micro/org/openjdk/bench/java/util/NMTBenchmark.java line 24: > >>

Re: RFR: 8314438: NMT: Performance benchmarks are needed to have a baseline for comparison of improvements [v2]

2023-09-25 Thread Afshin Zafari
> A new benchmark for measuring the NMT overhead in `summary` and `detail` > modes. > The tests are run using: > > make CONF=debug test TEST="micro:java.util.NMTBenchmark" > MICRO="RESULTS_FORMAT=json" > > The results are written to a JSON file that can be visualized using [JMH >

Re: RFR: 8316704: Regex-free parsing of Formatter and FormatProcessor specifiers [v7]

2023-09-25 Thread Claes Redestad
On Mon, 25 Sep 2023 11:36:10 GMT, 温绍锦 wrote: > The reason why I split it into multiple small methods is to avoid a single > method codeSize > 325. After merging small methods, the performance will > decrease. Yes, I can refactor to keep the same structure and verify performance is neutral or

Re: RFR: 8316704: Regex-free parsing of Formatter and FormatProcessor specifiers [v7]

2023-09-25 Thread 温绍锦
On Sun, 24 Sep 2023 20:27:53 GMT, 温绍锦 wrote: >> @cl4es made performance optimizations for the simple specifiers of >> String.format in PR https://github.com/openjdk/jdk/pull/2830. Based on the >> same idea, I continued to make improvements. I made patterns like %2d %02d >> also be optimized.

Re: RFR: 8316557: Make fields final in 'sun.util' package

2023-09-25 Thread Alan Bateman
On Mon, 25 Sep 2023 10:04:13 GMT, Chen Liang wrote: >>> UTF8 decoder does not perform any internal state mutation during decoding; >> >> Are you sure? I think `CharsetDecoder::decode` will modify the `status` >> field. > > right, it does have a `state` field. CharsetDecoder is specified to

Re: RFR: 8316557: Make fields final in 'sun.util' package

2023-09-25 Thread Chen Liang
On Mon, 25 Sep 2023 09:53:47 GMT, Glavo wrote: >> UTF8 decoder does not perform any internal state mutation during decoding; >> in addition, if this field is static final, the decoder's error actions are >> published when the class is initialized, while publishing in a final field >> does not

Re: RFR: 8316704: Regex-free parsing of Formatter and FormatProcessor specifiers [v7]

2023-09-25 Thread Claes Redestad
On Sun, 24 Sep 2023 20:27:53 GMT, 温绍锦 wrote: >> @cl4es made performance optimizations for the simple specifiers of >> String.format in PR https://github.com/openjdk/jdk/pull/2830. Based on the >> same idea, I continued to make improvements. I made patterns like %2d %02d >> also be optimized.

Re: RFR: 8316557: Make fields final in 'sun.util' package

2023-09-25 Thread Glavo
On Mon, 25 Sep 2023 09:47:15 GMT, Chen Liang wrote: > UTF8 decoder does not perform any internal state mutation during decoding; Are you sure? I think `CharsetDecoder::decode` will modify the `status` field. - PR Review Comment:

Re: RFR: 8316557: Make fields final in 'sun.util' package

2023-09-25 Thread Chen Liang
On Mon, 25 Sep 2023 09:40:00 GMT, Andrey Turbanov wrote: >> src/java.base/share/classes/sun/util/PropertyResourceBundleCharset.java line >> 71: >> >>> 69: private final class PropertiesFileDecoder extends CharsetDecoder { >>> 70: >>> 71: private final CharsetDecoder cdUTF_8 = >>>

Re: RFR: 8316557: Make fields final in 'sun.util' package

2023-09-25 Thread Andrey Turbanov
On Mon, 18 Sep 2023 14:41:14 GMT, Chen Liang wrote: >> A few classes in `sun.util` package have non-final fields which could easily >> be marked `final`. > > src/java.base/share/classes/sun/util/PropertyResourceBundleCharset.java line > 71: > >> 69: private final class

RFR: 8316851: Add @sealedGraph to Executable

2023-09-25 Thread Per Minborg
This PR proposes to add the @sealedGraph tag to `java.lang.reflect.Executable`. - Commit messages: - Add @SealedGraph to Executable Changes: https://git.openjdk.org/jdk/pull/15897/files Webrev: https://webrevs.openjdk.org/?repo=jdk=15897=00 Issue:

Re: RFR: 8314438: NMT: Performance benchmarks are needed to have a baseline for comparison of improvements

2023-09-25 Thread Alan Bateman
On Tue, 5 Sep 2023 07:53:36 GMT, Afshin Zafari wrote: > A new benchmark for measuring the NMT overhead in `summary` and `detail` > modes. > The tests are run using: > > make CONF=debug test TEST="micro:java.util.NMTBenchmark" > MICRO="RESULTS_FORMAT=json" > > The results are written to a

RFR: 8314438: NMT: Performance benchmarks are needed to have a baseline for comparison of improvements

2023-09-25 Thread Afshin Zafari
A new benchmark for measuring the NMT overhead in `summary` and `detail` modes. The tests are run using: make CONF=debug test TEST="micro:java.util.NMTBenchmark" MICRO="RESULTS_FORMAT=json" The results are written to a JSON file that can be visualized using [JMH

Re: RFR: 8314438: NMT: Performance benchmarks are needed to have a baseline for comparison of improvements

2023-09-25 Thread Gerard Ziemski
On Tue, 5 Sep 2023 07:53:36 GMT, Afshin Zafari wrote: > A new benchmark for measuring the NMT overhead in `summary` and `detail` > modes. > The tests are run using: > > make CONF=debug test TEST="micro:java.util.NMTBenchmark" > MICRO="RESULTS_FORMAT=json" > > The results are written to a

Re: RFR: 8314438: NMT: Performance benchmarks are needed to have a baseline for comparison of improvements

2023-09-25 Thread Afshin Zafari
On Wed, 6 Sep 2023 19:56:10 GMT, Gerard Ziemski wrote: > The test will not compile for me unless I add: > > `import java.util.concurrent.TimeUnit;` Sorry, it was removed mistakenly before pushing the code. Now fixed. > You said `The JSON file can be used for visualising the results.` Can you

Re: RFR: 8310631: test/jdk/sun/nio/cs/TestCharsetMapping.java is spuriously passing [v2]

2023-09-25 Thread Alan Bateman
On Tue, 19 Sep 2023 20:03:51 GMT, Naoto Sato wrote: >> Fixed the failing (well, false-positive) test case. Made the following >> changes to the test: >> >> - Corrected the path to the mapping files directory >> - Made sure to fail if the directory path is incorrect >> - Took care of `GB18030`