Re: RFR: JDK-8262435: Clarify the behavior of a few inherited ZipInputStream methods [v4]

2022-11-13 Thread Alan Bateman
On Sun, 13 Nov 2022 21:42:38 GMT, Lance Andersen wrote: >> Please review the following PR which updates several of the ZipInputStream >> methods whose javadoc is inherited to clarify the methods are acting on >> the current ZIP Entry. >> >> There are no changes in behavior. The main descrip

Re: RFR: 8282664: Unroll by hand StringUTF16 and StringLatin1 polynomial hash loops [v13]

2022-11-13 Thread Tobias Hartmann
On Fri, 11 Nov 2022 13:00:06 GMT, Claes Redestad wrote: >> Continuing the work initiated by @luhenry to unroll and then intrinsify >> polynomial hash loops. >> >> I've rewired the library changes to route via a single `@IntrinsicCandidate` >> method. To make this work I've harmonized how they

Re: RFR: 8295146: Clean up native code with newer C/C++ language features [v2]

2022-11-13 Thread Julian Waters
On Sun, 13 Nov 2022 22:58:11 GMT, David Holmes wrote: >> Julian Waters has updated the pull request incrementally with one additional >> commit since the last revision: >> >> ATTRIBUTE_SCANF > > src/hotspot/os/linux/os_perf_linux.cpp line 233: > >> 231: * Ensure that 'fmt' does _NOT_ conta

Re: RFR: 8295146: Clean up native code with newer C/C++ language features [v2]

2022-11-13 Thread Julian Waters
> After [JDK-8292008](https://bugs.openjdk.org/browse/JDK-8292008) and > [JDK-8247283](https://bugs.openjdk.org/browse/JDK-8247283), some C and C++ > code across the JDK can be replaced and simplified with cleaner language > features that were previously not available due to required compatibili

Re: RFR: 8295146: Clean up native code with newer C/C++ language features

2022-11-13 Thread Julian Waters
On Sun, 13 Nov 2022 23:16:47 GMT, David Holmes wrote: >> After [JDK-8292008](https://bugs.openjdk.org/browse/JDK-8292008) and >> [JDK-8247283](https://bugs.openjdk.org/browse/JDK-8247283), some C and C++ >> code across the JDK can be replaced and simplified with cleaner language >> features th

Re: RFR: 8295146: Clean up native code with newer C/C++ language features

2022-11-13 Thread Julian Waters
On Sun, 13 Nov 2022 23:08:53 GMT, David Holmes wrote: >> After [JDK-8292008](https://bugs.openjdk.org/browse/JDK-8292008) and >> [JDK-8247283](https://bugs.openjdk.org/browse/JDK-8247283), some C and C++ >> code across the JDK can be replaced and simplified with cleaner language >> features th

Re: RFR: 8295146: Clean up native code with newer C/C++ language features

2022-11-13 Thread Julian Waters
On Sun, 13 Nov 2022 23:07:35 GMT, David Holmes wrote: >> After [JDK-8292008](https://bugs.openjdk.org/browse/JDK-8292008) and >> [JDK-8247283](https://bugs.openjdk.org/browse/JDK-8247283), some C and C++ >> code across the JDK can be replaced and simplified with cleaner language >> features th

Re: RFR: 8295146: Clean up native code with newer C/C++ language features

2022-11-13 Thread Julian Waters
On Sun, 13 Nov 2022 22:59:01 GMT, David Holmes wrote: >> After [JDK-8292008](https://bugs.openjdk.org/browse/JDK-8292008) and >> [JDK-8247283](https://bugs.openjdk.org/browse/JDK-8247283), some C and C++ >> code across the JDK can be replaced and simplified with cleaner language >> features th

Re: RFR: 8295146: Clean up native code with newer C/C++ language features

2022-11-13 Thread David Holmes
On Thu, 10 Nov 2022 06:20:41 GMT, Julian Waters wrote: > After [JDK-8292008](https://bugs.openjdk.org/browse/JDK-8292008) and > [JDK-8247283](https://bugs.openjdk.org/browse/JDK-8247283), some C and C++ > code across the JDK can be replaced and simplified with cleaner language > features that

Re: RFR: JDK-8262435: Clarify the behavior of a few inherited ZipInputStream methods [v3]

2022-11-13 Thread Lance Andersen
On Sat, 12 Nov 2022 12:27:30 GMT, Alan Bateman wrote: > I think it will need to say that input stream for the current ZIP entry has > been read to end of stream, or the ZIP entry has been closed with closeEntry. > That will cover the two cases where it returns 0. Thank you Alan. I have revise

Re: RFR: JDK-8262435: Clarify the behavior of a few inherited ZipInputStream methods [v4]

2022-11-13 Thread Lance Andersen
> Please review the following PR which updates several of the ZipInputStream > methods whose javadoc is inherited to clarify the methods are acting on the > current ZIP Entry. > > There are no changes in behavior. The main description for the method's > javadoc that has been copied has been

Re: RFR: 8282664: Unroll by hand StringUTF16 and StringLatin1 polynomial hash loops [v13]

2022-11-13 Thread Claes Redestad
On Sat, 12 Nov 2022 02:08:19 GMT, Vladimir Ivanov wrote: > Also, I'd like to note that C2 auto-vectorization support is not too far away > from being able to optimize hash code computations. At some point, I was able > to achieve some promising results with modest tweaking of SuperWord pass: >

Re: RFR: 8282664: Unroll by hand StringUTF16 and StringLatin1 polynomial hash loops [v13]

2022-11-13 Thread Claes Redestad
On Sat, 12 Nov 2022 01:35:39 GMT, Vladimir Ivanov wrote: >> Claes Redestad has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Missing & 0xff in StringLatin1::hashCode > > src/java.base/share/classes/jdk/internal/util/ArraysSupport.java line

Re: RFR: 8282664: Unroll by hand StringUTF16 and StringLatin1 polynomial hash loops [v13]

2022-11-13 Thread Claes Redestad
On Sat, 12 Nov 2022 01:28:51 GMT, Vladimir Ivanov wrote: >> Claes Redestad has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Missing & 0xff in StringLatin1::hashCode > > src/hotspot/share/opto/intrinsicnode.hpp line 175: > >> 173: // as

Re: RFR: 8282664: Unroll by hand StringUTF16 and StringLatin1 polynomial hash loops [v13]

2022-11-13 Thread Claes Redestad
On Sat, 12 Nov 2022 01:10:50 GMT, Vladimir Ivanov wrote: >> src/hotspot/cpu/x86/x86_64.ad line 12081: >> >>> 12079: format %{ "Array HashCode byte[] $ary1,$cnt1 -> $result // KILL >>> all" %} >>> 12080: ins_encode %{ >>> 12081: __ arrays_hashcode($ary1$$Register, $cnt1$$Register, >>>

Re: RFR: 8282664: Unroll by hand StringUTF16 and StringLatin1 polynomial hash loops [v13]

2022-11-13 Thread Claes Redestad
On Sat, 12 Nov 2022 01:06:27 GMT, Vladimir Ivanov wrote: >> Claes Redestad has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Missing & 0xff in StringLatin1::hashCode > > src/hotspot/cpu/x86/x86_64.ad line 12073: > >> 12071:

Re: RFR: 8282664: Unroll by hand StringUTF16 and StringLatin1 polynomial hash loops [v13]

2022-11-13 Thread Claes Redestad
On Sat, 12 Nov 2022 15:27:09 GMT, Piotr Tarsa wrote: > Out of curiosity: how does this intrinsic affect time-to-safepoint? Does it > matter? I don't see any safepoint poll, but then I don't precisely know how > safepoints work, so I could be missing something. Theoretically, with 2^31 > elemen