Re: RFR: JDK-8316559: Refactor some util/Calendar tests to JUnit

2023-09-21 Thread Andrey Turbanov
On Wed, 20 Sep 2023 23:20:43 GMT, Justin Lu wrote: > Please review this PR which converts some tests under _Calendar_ to use > JUnit. These tests either previously used the internal _IntlTest_, or used no > framework at all. > > Any files named BugXXX.java will be renamed after review. t

Re: RFR: 8316540: StoreReproducibilityTest fails on some locales [v3]

2023-09-21 Thread Alan Bateman
On Thu, 21 Sep 2023 18:51:50 GMT, Naoto Sato wrote: >> Fixing a test case that fails in some time zones. Making sure the test is >> run in `UTC` zone will fix the issue. Confirmed the fix by manually setting >> machine's time zone to Europe/Dublin. > > Naoto Sato has updated the pull request in

Re: RFR: 8316540: StoreReproducibilityTest fails on some locales [v2]

2023-09-21 Thread Alan Bateman
On Thu, 21 Sep 2023 18:35:57 GMT, Naoto Sato wrote: > But yes, it is appropriate to replace the invocation. Replaced them all. Thanks - PR Review Comment: https://git.openjdk.org/jdk/pull/15829#discussion_r1333926851

RFR: JDK-8316708: Augment WorstCaseTests with more cases

2023-09-21 Thread Joe Darcy
A new paper "Accuracy of Mathematical Functions in Single, Double, Double Extended, and Quadruple Precision" by Brian Gladman, Vincenzo Innocente and Paul Zimmermann https://members.loria.fr/PZimmermann/papers/accuracy.pdf details the inputs with generate the worst-case observed errors in diffe

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

2023-09-21 Thread Chen Liang
On Fri, 22 Sep 2023 04:10:26 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 with a new

Re: RFR: JDK-8316708: Augment WorstCaseTests with more cases

2023-09-21 Thread Joe Darcy
On Fri, 22 Sep 2023 05:36:02 GMT, Joe Darcy wrote: > A new paper > > "Accuracy of Mathematical Functions in Single, Double, Double Extended, and > Quadruple Precision" > by Brian Gladman, Vincenzo Innocente and Paul Zimmermann > https://members.loria.fr/PZimmermann/papers/accuracy.pdf > > det

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

2023-09-21 Thread 温绍锦
On Fri, 22 Sep 2023 04:46:36 GMT, Chen Liang wrote: > Do Octal and Hex digits need int versions of getChars and stringSize? Since DecimalDigits made this change, for consistency, Octal and Hex digits also do the same thing. - PR Comment: https://git.openjdk.org/jdk/pull/15699#issu

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

2023-09-21 Thread Chen Liang
On Fri, 22 Sep 2023 04:10:26 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 with a new

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

2023-09-21 Thread 温绍锦
> 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 with a new target base due to a merge or a rebase. The pull requ

Re: RFR: 8316641: VarHandle template classes can share code in the base class [v2]

2023-09-21 Thread Chen Liang
On Thu, 21 Sep 2023 08:50:00 GMT, Chen Liang wrote: >> VarHandle implementations have many static fields and methods that can be >> pulled to the common superclass to avoid repeated initialization and code >> duplication. >> >> In addition, the Unsafe-based Buffer field access are replaced by

Re: RFR: 8316641: VarHandle template classes can share code in the base class [v3]

2023-09-21 Thread Chen Liang
> VarHandle implementations have many static fields and methods that can be > pulled to the common superclass to avoid repeated initialization and code > duplication. > > In addition, the Unsafe-based Buffer field access are replaced by usage of > public methods or JavaNioAccess. Chen Liang ha

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

2023-09-21 Thread 温绍锦
On Mon, 18 Sep 2023 00:48:26 GMT, 温绍锦 wrote: >> src/java.base/share/classes/java/util/Formatter.java line 3420: >> >>> 3418: && fmt.a instanceof StringBuilder sb >>> 3419: ) { >>> 3420: sb.append(value); >> >> There's a lot of `if`s here, and this

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

2023-09-21 Thread 温绍锦
On Sun, 17 Sep 2023 22:16:08 GMT, Claes Redestad 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 o

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

2023-09-21 Thread Claes Redestad
On Mon, 18 Sep 2023 02:59:06 GMT, 温绍锦 wrote: >> The change code of print fast-path has been deleted, and parse fast-path has >> added support for the pattern "%8.3f". >> >> Where to draw the line of parse fast-path? I have seen patterns that cause >> performance problems, and they can be easil

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

2023-09-21 Thread Claes Redestad
On Sun, 17 Sep 2023 16:01:33 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. > >

RFR: 8316704: Regex-free parsing of Formatter and FormatProcessor specifiers

2023-09-21 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 MacBookPro M1 P

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

2023-09-21 Thread 温绍锦
On Sun, 17 Sep 2023 16:01:33 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: 8309130: x86_64 AVX512 intrinsics for Arrays.sort methods (int, long, float and double arrays) [v40]

2023-09-21 Thread Srinivas Vamsi Parasa
On Thu, 21 Sep 2023 16:44:52 GMT, Paul Sandoz wrote: >> Srinivas Vamsi Parasa has updated the pull request incrementally with one >> additional commit since the last revision: >> >> change variable names of indexPivot* to pivotIndex* > > test/jdk/java/util/Arrays/Sorting.java line 30: > >> 2

Re: RFR: 8316305: Initial buffer size of StackWalker is too small caused by JDK-8285447 [v3]

2023-09-21 Thread Mandy Chung
> A trivial fix. [JDK-8285447](https://bugs.openjdk.org/browse/JDK-8285447) > intends to change the initial batch size only for a stack walker with an > estimated stack depth. For stack walkers without user-supplied estimated > stack depth, the initial batch size is changed to 3 which is a bug

Re: RFR: JDK-8266431: Dual-Pivot Quicksort improvements (Radix sort) [v9]

2023-09-21 Thread Srinivas Vamsi Parasa
On Thu, 21 Sep 2023 07:43:47 GMT, iaroslavski wrote: >> Laurent Bourgès has updated the pull request incrementally with one >> additional commit since the last revision: >> >> updated comments (v23.08) > >> Hi Vladimir, >> >> Just trying to understand: is there a reason to use >> `DualPivot

Re: RFR: 8316305: Initial buffer size of StackWalker is too small caused by JDK-8285447 [v2]

2023-09-21 Thread Mandy Chung
> A trivial fix. [JDK-8285447](https://bugs.openjdk.org/browse/JDK-8285447) > intends to change the initial batch size only for a stack walker with an > estimated stack depth. For stack walkers without user-supplied estimated > stack depth, the initial batch size is changed to 3 which is a bug

Integrated: 8316456: StackWalker may skip Continuation::yield0 frame mistakenly

2023-09-21 Thread Mandy Chung
On Mon, 18 Sep 2023 23:00:09 GMT, Mandy Chung wrote: > `JVM_MoreStackWalk` has a bug that always assumes that the Java frame > stream is currently at the frame decoded in the last patch and so always > advances to the next frame before filling in the new batch of stack frame. > However `JVM_MoreS

Re: RFR: 8316456: StackWalker may skip Continuation::yield0 frame mistakenly [v3]

2023-09-21 Thread Mandy Chung
> `JVM_MoreStackWalk` has a bug that always assumes that the Java frame > stream is currently at the frame decoded in the last patch and so always > advances to the next frame before filling in the new batch of stack frame. > However `JVM_MoreStackWalk` may return 0. The library will set > the co

Re: Integrated: 8316582: Minor startup regression in 22-b15 due JDK-8310929

2023-09-21 Thread Claes Redestad
On Wed, 20 Sep 2023 09:12:48 GMT, Claes Redestad wrote: > This patch reverts the use of `ByteArrayLittleEndian` in `StringLatin1`. > > This use is the cause of a small (~1.5ms) startup regression in 22-b15. While > a manageable startup regression in and of itself, the use of `VarHandles` in >

Re: Integrated: 8316582: Minor startup regression in 22-b15 due JDK-8310929

2023-09-21 Thread 温绍锦
On Wed, 20 Sep 2023 09:12:48 GMT, Claes Redestad wrote: > This patch reverts the use of `ByteArrayLittleEndian` in `StringLatin1`. > > This use is the cause of a small (~1.5ms) startup regression in 22-b15. While > a manageable startup regression in and of itself, the use of `VarHandles` in >

Re: RFR: JDK-8316559: Refactor some util/Calendar tests to JUnit

2023-09-21 Thread Naoto Sato
On Wed, 20 Sep 2023 23:20:43 GMT, Justin Lu wrote: > Please review this PR which converts some tests under _Calendar_ to use > JUnit. These tests either previously used the internal _IntlTest_, or used no > framework at all. > > Any files named BugXXX.java will be renamed after review. t

Re: RFR: 8316662: Remove one allocation per conversion in Double.toString(double) and Float.toString(float)

2023-09-21 Thread ExE Boss
On Thu, 21 Sep 2023 12:51:56 GMT, Raffaello Giulietti wrote: > By correctly sizing an intermediate `byte[]` and making use of the internal > `newStringNoRepl()` method, one allocation per conversion can be avoided when > the runtime uses compact strings. These constant names should be in uppe

Integrated: JDK-8316629: j.text.DateFormatSymbols setZoneStrings() exception is unhelpful

2023-09-21 Thread Justin Lu
On Wed, 20 Sep 2023 22:10:16 GMT, Justin Lu wrote: > Please review this PR, which updates the exception message for > java.text.DateFormatSymbols.setZoneStrings > > `setZoneStrings()` takes a multi dimensional array as input. If any row does > not have a length of at least 5, an _IllegalArgume

Integrated: JDK-8316435: sun.util.calendar.CalendarSystem subclassing should be restricted

2023-09-21 Thread Justin Lu
On Mon, 18 Sep 2023 22:42:09 GMT, Justin Lu wrote: > Please review this PR which restricts sub-classing of the internal calendar > system in sun.util.calendar to only the existing implementations. Drive by > cleanup included. > > As the implementation is long-standing and complete with no inte

Re: RFR: JDK-8316688: Widen allowable error bound of Math.hypot

2023-09-21 Thread Raffaello Giulietti
On Thu, 21 Sep 2023 19:19:34 GMT, Joe Darcy wrote: > The Math.hypot method claims its error bound is one ulp. > > The paper > > "Accuracy of Mathematical Functions in Single, Double, Double > Extended, and Quadruple Precision" > Brian Gladman, Vincenzo Innocente and Paul Zimmermann > September

Re: RFR: 8316456: StackWalker may skip Continuation::yield0 frame mistakenly [v2]

2023-09-21 Thread Mandy Chung
On Thu, 21 Sep 2023 19:29:30 GMT, Patricio Chilano Mateo wrote: >> Mandy Chung 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 three additional

Re: RFR: JDK-8316688: Widen allowable error bound of Math.hypot

2023-09-21 Thread Brian Burkhalter
On Thu, 21 Sep 2023 19:19:34 GMT, Joe Darcy wrote: > The Math.hypot method claims its error bound is one ulp. > > The paper > > "Accuracy of Mathematical Functions in Single, Double, Double > Extended, and Quadruple Precision" > Brian Gladman, Vincenzo Innocente and Paul Zimmermann > September

Re: RFR: 8316456: StackWalker may skip Continuation::yield0 frame mistakenly [v2]

2023-09-21 Thread Patricio Chilano Mateo
On Thu, 21 Sep 2023 18:20:36 GMT, Mandy Chung wrote: >> `JVM_MoreStackWalk` has a bug that always assumes that the Java frame >> stream is currently at the frame decoded in the last patch and so always >> advances to the next frame before filling in the new batch of stack frame. >> However `JVM_M

Re: RFR: 8316587: Use ArraysSupport.vectorizedHashCode in Utf8EntryImpl [v2]

2023-09-21 Thread Claes Redestad
On Thu, 21 Sep 2023 13:55:18 GMT, Chen Liang wrote: >> src/java.base/share/classes/jdk/internal/classfile/impl/AbstractPoolEntry.java >> line 236: >> >>> 234: private void inflate() { >>> 235: int singleBytes = JLA.countPositives(rawBytes, offset, >>> rawLen); >>> 236:

Re: RFR: 8316587: Use ArraysSupport.vectorizedHashCode in Utf8EntryImpl [v2]

2023-09-21 Thread Claes Redestad
On Thu, 21 Sep 2023 02:38:08 GMT, Chen Liang wrote: >> Like #12077, this uses JDK's internal utilities to speed up ASCII reading in >> Class files, where most identifiers, from conventions to attribute names, >> are ASCII. See the JBS issue for more in-depth explanations. >> >> Before: (Master

RFR: JDK-8316688: Widen allowable error bound of Math.hypot

2023-09-21 Thread Joe Darcy
The Math.hypot method claims its error bound is one ulp. The paper "Accuracy of Mathematical Functions in Single, Double, Double Extended, and Quadruple Precision" Brian Gladman, Vincenzo Innocente and Paul Zimmermann September 21, 2023 https://members.loria.fr/PZimmermann/papers/accuracy.pdf li

Re: RFR: JDK-8316688: Widen allowable error bound of Math.hypot

2023-09-21 Thread Joe Darcy
On Thu, 21 Sep 2023 19:19:34 GMT, Joe Darcy wrote: > The Math.hypot method claims its error bound is one ulp. > > The paper > > "Accuracy of Mathematical Functions in Single, Double, Double > Extended, and Quadruple Precision" > Brian Gladman, Vincenzo Innocente and Paul Zimmermann > September

Integrated: 8316383: NullPointerException in AbstractSAXParser after JDK-8306632

2023-09-21 Thread Joe Wang
On Tue, 19 Sep 2023 21:10:41 GMT, Joe Wang wrote: > Fix a NPE. The DTD patch (JDK-8306632) moved initialization to factories, for > example, for SAXParser, the SecurityManagers are created in the > SAXParserFactory impl and passed on to instances of SAXParsers. The > (deprecated) XMLReaderFact

Re: RFR: 8316383: NullPointerException in AbstractSAXParser after JDK-8306632 [v2]

2023-09-21 Thread Joe Wang
> Fix a NPE. The DTD patch (JDK-8306632) moved initialization to factories, for > example, for SAXParser, the SecurityManagers are created in the > SAXParserFactory impl and passed on to instances of SAXParsers. The > (deprecated) XMLReaderFactory however, instantiates SAXParsers directly, thus

Re: RFR: 8316587: Use ArraysSupport.vectorizedHashCode in Utf8EntryImpl [v2]

2023-09-21 Thread Adam Sotona
On Thu, 21 Sep 2023 02:38:08 GMT, Chen Liang wrote: >> Like #12077, this uses JDK's internal utilities to speed up ASCII reading in >> Class files, where most identifiers, from conventions to attribute names, >> are ASCII. See the JBS issue for more in-depth explanations. >> >> Before: (Master

Re: RFR: 8316540: StoreReproducibilityTest fails on some locales [v3]

2023-09-21 Thread Naoto Sato
> Fixing a test case that fails in some time zones. Making sure the test is run > in `UTC` zone will fix the issue. Confirmed the fix by manually setting > machine's time zone to Europe/Dublin. Naoto Sato has updated the pull request incrementally with one additional commit since the last revis

Re: RFR: 8316540: StoreReproducibilityTest fails on some locales [v2]

2023-09-21 Thread Naoto Sato
On Thu, 21 Sep 2023 07:17:43 GMT, Alan Bateman wrote: >> Naoto Sato has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Reflects review comments > > test/jdk/java/util/Properties/StoreReproducibilityTest.java line 137: > >> 135:

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

2023-09-21 Thread Srinivas Vamsi Parasa
On Thu, 21 Sep 2023 09:32:18 GMT, Magnus Ihse Bursie wrote: >> Srinivas Vamsi Parasa has updated the pull request incrementally with one >> additional commit since the last revision: >> >> change variable names of indexPivot* to pivotIndex* > > make/modules/java.base/Lib.gmk line 240: > >> 2

Re: RFR: 8316456: StackWalker may skip Continuation::yield0 frame mistakenly [v2]

2023-09-21 Thread Mandy Chung
> `JVM_MoreStackWalk` has a bug that always assumes that the Java frame > stream is currently at the frame decoded in the last patch and so always > advances to the next frame before filling in the new batch of stack frame. > However `JVM_MoreStackWalk` may return 0. The library will set > the co

Re: RFR: 8316456: StackWalker may skip Continuation::yield0 frame mistakenly

2023-09-21 Thread Mandy Chung
On Thu, 21 Sep 2023 05:15:26 GMT, Patricio Chilano Mateo wrote: >> `JVM_MoreStackWalk` has a bug that always assumes that the Java frame >> stream is currently at the frame decoded in the last patch and so always >> advances to the next frame before filling in the new batch of stack frame. >> Ho

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

2023-09-21 Thread Paul Sandoz
On Wed, 20 Sep 2023 17:19:42 GMT, Srinivas Vamsi Parasa wrote: >> The goal is to develop faster sort routines for x86_64 CPUs by taking >> advantage of AVX512 instructions. This enhancement provides an order of >> magnitude speedup for Arrays.sort() using int, long, float and double arrays. >>

Re: RFR: 8315960: test/jdk/java/io/File/TempDirDoesNotExist.java leaves test files behind [v9]

2023-09-21 Thread Lance Andersen
On Thu, 21 Sep 2023 15:35:16 GMT, Brian Burkhalter wrote: >> Add a `finally` block to delete the created files. > > Brian Burkhalter has updated the pull request incrementally with one > additional commit since the last revision: > > 8315960: Use assertEquals Marked as reviewed by lancea (Re

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

2023-09-21 Thread Paul Sandoz
On Wed, 20 Sep 2023 17:19:42 GMT, Srinivas Vamsi Parasa wrote: >> The goal is to develop faster sort routines for x86_64 CPUs by taking >> advantage of AVX512 instructions. This enhancement provides an order of >> magnitude speedup for Arrays.sort() using int, long, float and double arrays. >>

Re: RFR: 8316493: Make immutable maps @ValueBased [v3]

2023-09-21 Thread Per Minborg
> This PR outlines a solution for making immutable maps `@ValueBased` by > removing cacheing of certain values in `AbstractMap`. > > By removing these caching fields in `AbstractMap`, we can make the immutable > maps `@ValueBased` and at the same time, performance is likely improved > because t

Re: RFR: 8316383: NullPointerException in AbstractSAXParser after JDK-8306632

2023-09-21 Thread Naoto Sato
On Tue, 19 Sep 2023 21:10:41 GMT, Joe Wang wrote: > Fix a NPE. The DTD patch (JDK-8306632) moved initialization to factories, for > example, for SAXParser, the SecurityManagers are created in the > SAXParserFactory impl and passed on to instances of SAXParsers. The > (deprecated) XMLReaderFact

Re: RFR: 8315960: test/jdk/java/io/File/TempDirDoesNotExist.java leaves test files behind [v9]

2023-09-21 Thread Daniel Jeliński
On Thu, 21 Sep 2023 15:35:16 GMT, Brian Burkhalter wrote: >> Add a `finally` block to delete the created files. > > Brian Burkhalter has updated the pull request incrementally with one > additional commit since the last revision: > > 8315960: Use assertEquals LGTM. Thanks! - Ma

Re: RFR: 8315960: test/jdk/java/io/File/TempDirDoesNotExist.java leaves test files behind [v9]

2023-09-21 Thread Brian Burkhalter
On Thu, 21 Sep 2023 16:30:15 GMT, Daniel Jeliński wrote: > LGTM. Thanks! Thanks (to everyone) for the constructive comments! - PR Comment: https://git.openjdk.org/jdk/pull/15757#issuecomment-1729921947

Re: RFR: 8316383: NullPointerException in AbstractSAXParser after JDK-8306632

2023-09-21 Thread Lance Andersen
On Tue, 19 Sep 2023 21:10:41 GMT, Joe Wang wrote: > Fix a NPE. The DTD patch (JDK-8306632) moved initialization to factories, for > example, for SAXParser, the SecurityManagers are created in the > SAXParserFactory impl and passed on to instances of SAXParsers. The > (deprecated) XMLReaderFact

Re: RFR: 8315960: test/jdk/java/io/File/TempDirDoesNotExist.java leaves test files behind [v8]

2023-09-21 Thread Brian Burkhalter
On Thu, 21 Sep 2023 05:26:38 GMT, Daniel Jeliński wrote: >> Brian Burkhalter has updated the pull request incrementally with one >> additional commit since the last revision: >> >> 8315960: Address additional reviewer comments > > test/jdk/java/io/File/TempDirDoesNotExist.java line 142: > >>

Re: RFR: 8315960: test/jdk/java/io/File/TempDirDoesNotExist.java leaves test files behind [v9]

2023-09-21 Thread Brian Burkhalter
> Add a `finally` block to delete the created files. Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision: 8315960: Use assertEquals - Changes: - all: https://git.openjdk.org/jdk/pull/15757/files - new: https://git.ope

Re: RFR: 8310843: Reimplement ByteArray and ByteArrayLittleEndian with Unsafe [v11]

2023-09-21 Thread Glavo
> `ByteArray` and `ByteArrayLittleEndian` are very useful tool classes that can > be used in many places to performance tuning. > > Currently they are implemented by `VarHandle`, so using them may have some > impact on startup time. > > This PR reimplements them using `Unsafe`, which reduces th

Re: RFR: 8310837: Use ByteArrayLittleEndian in java.util.zip [v4]

2023-09-21 Thread Glavo
> Using `ByteArrayLittleEndian` is simpler and faster. > > `make test TEST="micro:java.util.zip.ZipFileOpen"`: > > > Benchmark (size) Mode Cnt Score Error Units > - ZipFileOpen.openCloseZipFile 512 avgt 15 39052.832 ± 107.496 ns/op > + ZipFileOpen.ope

Re: RFR: 8316587: Use ArraysSupport.vectorizedHashCode in Utf8EntryImpl [v2]

2023-09-21 Thread Chen Liang
On Thu, 21 Sep 2023 13:43:30 GMT, Adam Sotona wrote: >> Chen Liang has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Fix logical bug with char array filling > > src/java.base/share/classes/jdk/internal/classfile/impl/AbstractPoolEntry.java

Re: RFR: 8316641: VarHandle template classes can share code in the base class [v2]

2023-09-21 Thread Jorn Vernee
On Thu, 21 Sep 2023 08:50:00 GMT, Chen Liang wrote: >> VarHandle implementations have many static fields and methods that can be >> pulled to the common superclass to avoid repeated initialization and code >> duplication. >> >> In addition, the Unsafe-based Buffer field access are replaced by

Re: RFR: 8316587: Use ArraysSupport.vectorizedHashCode in Utf8EntryImpl [v2]

2023-09-21 Thread Adam Sotona
On Thu, 21 Sep 2023 02:38:08 GMT, Chen Liang wrote: >> Like #12077, this uses JDK's internal utilities to speed up ASCII reading in >> Class files, where most identifiers, from conventions to attribute names, >> are ASCII. See the JBS issue for more in-depth explanations. >> >> Before: (Master

Re: Should we build jrt-fs.jar again with the "Build JDK" ?

2023-09-21 Thread Andrew Leonard
Thanks Magnus, yeah it is still doing as it says on the "tin", so I think i'm just being paranoid! I'll put a PR together for review, cheers On Thu, Sep 21, 2023 at 10:49 AM Magnus Ihse Bursie < magnus.ihse.bur...@oracle.com> wrote: > On 2023-09-21 10:59, Andrew Leonard wrote: > > My only concern

Re: RFR: 8316662: Remove one allocation per conversion in Double.toString(double) and Float.toString(float)

2023-09-21 Thread Raffaello Giulietti
On Thu, 21 Sep 2023 12:51:56 GMT, Raffaello Giulietti wrote: > By correctly sizing an intermediate `byte[]` and making use of the internal > `newStringNoRepl()` method, one allocation per conversion can be avoided when > the runtime uses compact strings. On my platform, conversions are never

RFR: 8316662: Remove one allocation per conversion in Double.toString(double) and Float.toString(float)

2023-09-21 Thread Raffaello Giulietti
By correctly sizing an intermediate `byte[]` and making use of the internal `newStringNoRepl()` method, one allocation per conversion can be avoided when the runtime uses compact strings. - Commit messages: - 8316662: Remove one allocation per conversion in Double.toString(double)

Re: RFR: 8316662: Remove one allocation per conversion in Double.toString(double) and Float.toString(float)

2023-09-21 Thread Andriy Plokhotnyuk
On Thu, 21 Sep 2023 12:51:56 GMT, Raffaello Giulietti wrote: > By correctly sizing an intermediate `byte[]` and making use of the internal > `newStringNoRepl()` method, one allocation per conversion can be avoided when > the runtime uses compact strings. I bet that `decNumberOfTrailingZeros`

Re: RFR: 8316421: libjava should load shell32.dll eagerly [v3]

2023-09-21 Thread Daniel Jeliński
On Thu, 21 Sep 2023 06:08:27 GMT, Daniel Jeliński wrote: >> Please review this patch that makes java.dll load shell32.dll earlier. >> Delay-loading requires some additional code (delayimp.lib), and offers no >> benefits since we always load shell32 during JVM startup. >> >> Other than removing

Integrated: 8316421: libjava should load shell32.dll eagerly

2023-09-21 Thread Daniel Jeliński
On Mon, 18 Sep 2023 14:44:13 GMT, Daniel Jeliński wrote: > Please review this patch that makes java.dll load shell32.dll earlier. > Delay-loading requires some additional code (delayimp.lib), and offers no > benefits since we always load shell32 during JVM startup. > > Other than removing the

Re: RFR: 8316421: libjava should load shell32.dll eagerly [v3]

2023-09-21 Thread Jorn Vernee
On Thu, 21 Sep 2023 06:08:27 GMT, Daniel Jeliński wrote: >> Please review this patch that makes java.dll load shell32.dll earlier. >> Delay-loading requires some additional code (delayimp.lib), and offers no >> benefits since we always load shell32 during JVM startup. >> >> Other than removing

Re: RFR: 8316587: Use ArraysSupport.vectorizedHashCode in Utf8EntryImpl [v2]

2023-09-21 Thread Claes Redestad
On Thu, 21 Sep 2023 02:38:08 GMT, Chen Liang wrote: >> Like #12077, this uses JDK's internal utilities to speed up ASCII reading in >> Class files, where most identifiers, from conventions to attribute names, >> are ASCII. See the JBS issue for more in-depth explanations. >> >> Before: (Master

Re: RFR: 8294977: Convert test/jdk/java tests from ASM library to Classfile API [v9]

2023-09-21 Thread Adam Sotona
On Wed, 28 Jun 2023 07:02:17 GMT, Chen Liang wrote: >> Summaries: >> 1. A few recommendations about updating the constant API is made at >> https://mail.openjdk.org/pipermail/classfile-api-dev/2023-March/000233.html >> and I may update this patch shall the API changes be integrated before >> 2.

Re: Should we build jrt-fs.jar again with the "Build JDK" ?

2023-09-21 Thread Magnus Ihse Bursie
On 2023-09-21 10:59, Andrew Leonard wrote: My only concern might be the fact the MANIFEST would say "Created by: jdk-N-1", which is still accurate according to the spec:   "Created-By: Defines the version and the vendor of the java implementation on top of which this manifest file is generated.

Re: Integrated: 8316582: Minor startup regression in 22-b15 due JDK-8310929

2023-09-21 Thread Claes Redestad
On Wed, 20 Sep 2023 09:21:00 GMT, Chen Liang wrote: > Can #14636 be a solution to avoid early VH initialization? I think #14636 would more or less solve the startup regression, yes, but the jury is out on whether we want to accept that. There's value in taking steps to make `VH` indistinguisha

Integrated: 8316582: Minor startup regression in 22-b15 due JDK-8310929

2023-09-21 Thread Claes Redestad
On Wed, 20 Sep 2023 09:12:48 GMT, Claes Redestad wrote: > This patch reverts the use of `ByteArrayLittleEndian` in `StringLatin1`. > > This use is the cause of a small (~1.5ms) startup regression in 22-b15. While > a manageable startup regression in and of itself, the use of `VarHandles` in >

Re: Integrated: 8316582: Minor startup regression in 22-b15 due JDK-8310929

2023-09-21 Thread Claes Redestad
On Wed, 20 Sep 2023 09:12:48 GMT, Claes Redestad wrote: > This patch reverts the use of `ByteArrayLittleEndian` in `StringLatin1`. > > This use is the cause of a small (~1.5ms) startup regression in 22-b15. While > a manageable startup regression in and of itself, the use of `VarHandles` in >

Re: Integrated: 8316582: Minor startup regression in 22-b15 due JDK-8310929

2023-09-21 Thread Chen Liang
On Wed, 20 Sep 2023 09:12:48 GMT, Claes Redestad wrote: > This patch reverts the use of `ByteArrayLittleEndian` in `StringLatin1`. > > This use is the cause of a small (~1.5ms) startup regression in 22-b15. While > a manageable startup regression in and of itself, the use of `VarHandles` in >

Re: Integrated: 8316582: Minor startup regression in 22-b15 due JDK-8310929

2023-09-21 Thread Roger Riggs
On Wed, 20 Sep 2023 09:12:48 GMT, Claes Redestad wrote: > This patch reverts the use of `ByteArrayLittleEndian` in `StringLatin1`. > > This use is the cause of a small (~1.5ms) startup regression in 22-b15. While > a manageable startup regression in and of itself, the use of `VarHandles` in >

Integrated: 8316582: Minor startup regression in 22-b15 due JDK-8310929

2023-09-21 Thread Claes Redestad
This patch reverts the use of `ByteArrayLittleEndian` in `StringLatin1`. This use is the cause of a small (~1.5ms) startup regression in 22-b15. While a manageable startup regression in and of itself, the use of `VarHandles` in core utility classes brings an increased risk of bootstrap circular

Re: RFR: 8316587: Use ArraysSupport.vectorizedHashCode in Utf8EntryImpl [v2]

2023-09-21 Thread Chen Liang
On Thu, 21 Sep 2023 02:38:08 GMT, Chen Liang wrote: >> Like #12077, this uses JDK's internal utilities to speed up ASCII reading in >> Class files, where most identifiers, from conventions to attribute names, >> are ASCII. See the JBS issue for more in-depth explanations. >> >> Before: (Master

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

2023-09-21 Thread Magnus Ihse Bursie
On Wed, 20 Sep 2023 17:19:42 GMT, Srinivas Vamsi Parasa wrote: >> The goal is to develop faster sort routines for x86_64 CPUs by taking >> advantage of AVX512 instructions. This enhancement provides an order of >> magnitude speedup for Arrays.sort() using int, long, float and double arrays. >>

Re: Should we build jrt-fs.jar again with the "Build JDK" ?

2023-09-21 Thread Andrew Leonard
My only concern might be the fact the MANIFEST would say "Created by: jdk-N-1", which is still accurate according to the spec: "Created-By: Defines the version and the vendor of the java implementation on top of which this manifest file is generated. This attribute is generated by the jar tool."

Re: RFR: 8316641: VarHandle template classes can share code in the base class [v2]

2023-09-21 Thread Chen Liang
> VarHandle implementations have many static fields and methods that can be > pulled to the common superclass to avoid repeated initialization and code > duplication. > > In addition, the Unsafe-based Buffer field access are replaced by usage of > public methods or JavaNioAccess. Chen Liang ha

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

2023-09-21 Thread Alan Bateman
On Wed, 20 Sep 2023 23:11:27 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 w

Integrated: 8311084: Add typeSymbol() API for applicable constant pool entries

2023-09-21 Thread Chen Liang
On Thu, 29 Jun 2023 09:59:30 GMT, Chen Liang wrote: > 5 Constant Pool entries, namely ConstantDynamicEntry, InvokeDynamicEntry, > FieldRefEntry, MethodRefEntry, and InterfaceMethodRefEntry should have a > typeSymbol() API to return the nominal/symbolic descriptor (ClassDesc or > MethodTypeDesc

Re: Should we build jrt-fs.jar again with the "Build JDK" ?

2023-09-21 Thread Andrew Leonard
Hi Erik, Thank you for the feedback. Yes, I think I agree with you, changing the compilation to "interim" would resolve the reproducibility, and also would be beneficial from the "secure dev" perspective having the classes built with the "latest&greatest" compiler. I will create a bug & PR, and pe

Re: RFR: JDK-8266431: Dual-Pivot Quicksort improvements (Radix sort) [v9]

2023-09-21 Thread iaroslavski
On Wed, 30 Aug 2023 10:55:48 GMT, Laurent Bourgès wrote: >> * improved mixed insertion sort (makes whole sorting faster) >> * introduced Radix which sort shows several times boost of performance and >> has linear complexity instead of n*ln(n) >> * improved merging sort for almost sorted data >>

Re: RFR: 8316421: libjava should load shell32.dll eagerly [v2]

2023-09-21 Thread Daniel Jeliński
On Wed, 20 Sep 2023 14:42:40 GMT, Jorn Vernee wrote: >> src/java.base/windows/native/libjava/java_props_md.c line 214: >> >>> 212: HRESULT hr; >>> 213: WCHAR *tmpPath = NULL; >>> 214: hr = SHGetKnownFolderPath(&FOLDERID_Profile, >>> KF_FLAG_DONT_VERIFY, NULL, &tmpPath);

Re: RFR: 8287843: File::getCanonicalFile doesn't work for \?\C:\ style paths DOS device paths [v4]

2023-09-21 Thread Alan Bateman
On Thu, 21 Sep 2023 00:46:45 GMT, Brian Burkhalter wrote: > Support for `isAbsolute` was added. Okay, this looks better but I'm still concerned about other potential inconsistencies. Can you try out getParent with different input to see if any issues come up related to the prefix length. ---

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

2023-09-21 Thread iaroslavski
On Wed, 20 Sep 2023 22:46:16 GMT, Srinivas Vamsi Parasa wrote: >> Srinivas Vamsi Parasa has updated the pull request incrementally with one >> additional commit since the last revision: >> >> change variable names of indexPivot* to pivotIndex* > > Hi Vladimir, > > Just trying to understand:

Re: RFR: 8316540: StoreReproducibilityTest fails on some locales [v2]

2023-09-21 Thread Alan Bateman
On Wed, 20 Sep 2023 16:12:36 GMT, Naoto Sato wrote: >> Fixing a test case that fails in some time zones. Making sure the test is >> run in `UTC` zone will fix the issue. Confirmed the fix by manually setting >> machine's time zone to Europe/Dublin. > > Naoto Sato has updated the pull request in