Re: RFR: 8266054: VectorAPI rotate operation optimization [v13]

2021-07-26 Thread Sandhya Viswanathan
On Tue, 20 Jul 2021 09:57:07 GMT, Jatin Bhateja wrote: >> Current VectorAPI Java side implementation expresses rotateLeft and >> rotateRight operation using following operations:- >> >> vec1 = lanewise(VectorOperators.LSHL, n) >> vec2 = lanewise(VectorOperators.LSHR, n) >> res =

Re: RFR: 8266054: VectorAPI rotate operation optimization [v10]

2021-07-26 Thread Eric Liu
On Mon, 26 Jul 2021 18:56:01 GMT, Jatin Bhateja wrote: >> @jatin-bhateja This question is still pending. > > @sviswa7, SLP flow will either have a constant 8bit shift value or a variable > shift present in vector. So non constant scalar case will not be hit through > this route. It would be

Integrated: 8269753: Misplaced caret in PatternSyntaxException's detail message

2021-07-26 Thread Ian Graves
On Mon, 26 Jul 2021 18:10:03 GMT, Ian Graves wrote: > Fixes a bug where carets aren't indented correctly in PatternSyntaxException > messages because tab characters are converted to spaces in their indentation. This pull request has now been integrated. Changeset: bb508e13 Author:Ian

Re: RFR: 8265891: (ch) InputStream returned by Channels.newInputStream should override transferTo [v6]

2021-07-26 Thread Brian Burkhalter
On Mon, 26 Jul 2021 20:45:14 GMT, Markus KARG wrote: >> This PR-*draft* is **work in progress** and an invitation to discuss a >> possible solution for issue >> [JDK-8265891](https://bugs.openjdk.java.net/browse/JDK-8265891). It is *not >> yet* intended for a final review. >> >> As proposed

Integrated: 8190753: (zipfs): Accessing a large entry (> 2^31 bytes) leads to a negative initial size for ByteArrayOutputStream

2021-07-26 Thread Jaikiran Pai
On Mon, 28 Jun 2021 03:41:20 GMT, Jaikiran Pai wrote: > Can I please get a review for this proposed fix for the issue reported in > https://bugs.openjdk.java.net/browse/JDK-8190753? > > The commit here checks for the size of the zip entry before trying to create > a `ByteArrayOutputStream`

Re: RFR: 8190753: (zipfs): Accessing a large entry (> 2^31 bytes) leads to a negative initial size for ByteArrayOutputStream [v11]

2021-07-26 Thread Jaikiran Pai
On Fri, 23 Jul 2021 14:58:01 GMT, Jaikiran Pai wrote: >> Can I please get a review for this proposed fix for the issue reported in >> https://bugs.openjdk.java.net/browse/JDK-8190753? >> >> The commit here checks for the size of the zip entry before trying to create >> a

Re: RFR: 8265891: (ch) InputStream returned by Channels.newInputStream should override transferTo [v6]

2021-07-26 Thread Brian Burkhalter
On Mon, 26 Jul 2021 20:45:14 GMT, Markus KARG wrote: >> This PR-*draft* is **work in progress** and an invitation to discuss a >> possible solution for issue >> [JDK-8265891](https://bugs.openjdk.java.net/browse/JDK-8265891). It is *not >> yet* intended for a final review. >> >> As proposed

Re: RFR: 8265891: (ch) InputStream returned by Channels.newInputStream should override transferTo [v6]

2021-07-26 Thread Brian Burkhalter
On Mon, 26 Jul 2021 20:45:14 GMT, Markus KARG wrote: >> This PR-*draft* is **work in progress** and an invitation to discuss a >> possible solution for issue >> [JDK-8265891](https://bugs.openjdk.java.net/browse/JDK-8265891). It is *not >> yet* intended for a final review. >> >> As proposed

Re: RFR: 8269753: Misplaced caret in PatternSyntaxException's detail message [v3]

2021-07-26 Thread Pavel Rappo
On Mon, 26 Jul 2021 20:54:53 GMT, Ian Graves wrote: >> Fixes a bug where carets aren't indented correctly in PatternSyntaxException >> messages because tab characters are converted to spaces in their indentation. > > Ian Graves has updated the pull request incrementally with one additional >

Re: RFR: 8190753: (zipfs): Accessing a large entry (> 2^31 bytes) leads to a negative initial size for ByteArrayOutputStream [v11]

2021-07-26 Thread Lance Andersen
On Fri, 23 Jul 2021 16:22:01 GMT, Lance Andersen wrote: > > Thank you for the review Alan. > > @LanceAndersen, I've run the tier1 tests locally with the latest PR and > > they have passed without any regressions. Given that we changed the > > implementation to wrap ByteArrayOutputStream

Re: RFR: 4890732: GZIPOutputStream doesn't support optional GZIP fields [v9]

2021-07-26 Thread Lance Andersen
On Mon, 26 Jul 2021 03:28:44 GMT, Lin Zang wrote: >> 4890732: GZIPOutputStream doesn't support optional GZIP fields > > Lin Zang has updated the pull request with a new target base due to a merge > or a rebase. The pull request now contains 13 commits: > > - change since version to 18 > -

Re: RFR: JDK-8256844: Make NMT late-initializable

2021-07-26 Thread David Holmes
Hi Thomas, On 26/07/2021 10:15 pm, Thomas Stuefe wrote: Short: this patch makes NMT available in custom-launcher scenarios and during gtests. It simplifies NMT initialization. It adds a lot of NMT-specific testing. Before looking at this, have you checked the startup performance impact?

Re: RFR: 8269753: Misplaced caret in PatternSyntaxException's detail message [v3]

2021-07-26 Thread Ian Graves
> Fixes a bug where carets aren't indented correctly in PatternSyntaxException > messages because tab characters are converted to spaces in their indentation. Ian Graves has updated the pull request incrementally with one additional commit since the last revision: Tweaking some spacing.

Re: RFR: 8265891: (ch) InputStream returned by Channels.newInputStream should override transferTo [v6]

2021-07-26 Thread Markus KARG
> This PR-*draft* is **work in progress** and an invitation to discuss a > possible solution for issue > [JDK-8265891](https://bugs.openjdk.java.net/browse/JDK-8265891). It is *not > yet* intended for a final review. > > As proposed in JDK-8265891, this PR provides an implementation for >

Re: RFR: 8265891: (ch) InputStream returned by Channels.newInputStream should override transferTo [v5]

2021-07-26 Thread Markus KARG
> This PR-*draft* is **work in progress** and an invitation to discuss a > possible solution for issue > [JDK-8265891](https://bugs.openjdk.java.net/browse/JDK-8265891). It is *not > yet* intended for a final review. > > As proposed in JDK-8265891, this PR provides an implementation for >

Re: RFR: 8270321: Startup regressions in 18-b5 caused by JDK-8266310

2021-07-26 Thread Mandy Chung
On Fri, 23 Jul 2021 18:03:31 GMT, Sergey Chernyshev wrote: > Dear colleagues, > > Please review the patch that replaces the lambdas with anonymous classes > which solves the startup time regression as shown below. > > I attached the Bytestacks flamegraphs for both original (regression) and

Re: RFR: 8269753: Misplaced caret in PatternSyntaxException's detail message [v2]

2021-07-26 Thread Ian Graves
> Fixes a bug where carets aren't indented correctly in PatternSyntaxException > messages because tab characters are converted to spaces in their indentation. Ian Graves has updated the pull request incrementally with one additional commit since the last revision: Copyright years

Re: RFR: 8269130: Replace usages of Collection.toArray() with Collection.toArray(T[]) to avoid redundant array copying

2021-07-26 Thread Brett Okken
On Mon, 14 Jun 2021 17:00:29 GMT, Andrey Turbanov wrote: > I found few places, where code initially perform `Object[] > Colleciton.toArray()` call and then manually copy array into another array > with required type. > This PR cleanups such places to more shorter call `T[] >

Re: RFR: 8269753: Misplaced caret in PatternSyntaxException's detail message

2021-07-26 Thread Pavel Rappo
On Mon, 26 Jul 2021 18:10:03 GMT, Ian Graves wrote: > Fixes a bug where carets aren't indented correctly in PatternSyntaxException > messages because tab characters are converted to spaces in their indentation. Changes requested by prappo (Reviewer).

Re: RFR: 8269130: Replace usages of Collection.toArray() with Collection.toArray(T[]) to avoid redundant array copying

2021-07-26 Thread Brett Okken
On Mon, 14 Jun 2021 17:00:29 GMT, Andrey Turbanov wrote: > I found few places, where code initially perform `Object[] > Colleciton.toArray()` call and then manually copy array into another array > with required type. > This PR cleanups such places to more shorter call `T[] >

Re: RFR: 8269130: Replace usages of Collection.toArray() with Collection.toArray(T[]) to avoid redundant array copying

2021-07-26 Thread Sean Mullan
On Mon, 14 Jun 2021 17:00:29 GMT, Andrey Turbanov wrote: > I found few places, where code initially perform `Object[] > Colleciton.toArray()` call and then manually copy array into another array > with required type. > This PR cleanups such places to more shorter call `T[] >

Re: RFR: 8266054: VectorAPI rotate operation optimization [v10]

2021-07-26 Thread Jatin Bhateja
On Mon, 26 Jul 2021 17:19:07 GMT, Sandhya Viswanathan wrote: >> And'ing with shift_mask is already done on Java API side implementation >> before making a call to intrinsic rountine. > > @jatin-bhateja This question is still pending. @sviswa7, SLP flow will either have a constant 8bit shift

Re: RFR: 8270321: Startup regressions in 18-b5 caused by JDK-8266310

2021-07-26 Thread Rémi Forax
On Fri, 23 Jul 2021 18:03:31 GMT, Sergey Chernyshev wrote: > Dear colleagues, > > Please review the patch that replaces the lambdas with anonymous classes > which solves the startup time regression as shown below. > > I attached the Bytestacks flamegraphs for both original (regression) and

Integrated: 8268873: Unnecessary Vector usage in java.base

2021-07-26 Thread Andrey Turbanov
On Mon, 14 Jun 2021 11:34:50 GMT, Andrey Turbanov wrote: > Usage of thread-safe collection `Vector` is unnecessary. It's recommended to > use `ArrayList` if a thread-safe implementation is not needed. In > post-BiasedLocking times, this is gets worse, as every access is synchronized. > I

Re: RFR: 8269753: Misplaced caret in PatternSyntaxException's detail message

2021-07-26 Thread Ian Graves
On Mon, 26 Jul 2021 18:10:03 GMT, Ian Graves wrote: > Fixes a bug where carets aren't indented correctly in PatternSyntaxException > messages because tab characters are converted to spaces in their indentation. @pavelrappo - PR: https://git.openjdk.java.net/jdk/pull/4906

RFR: 8269753: Misplaced caret in PatternSyntaxException's detail message

2021-07-26 Thread Ian Graves
Fixes a bug where carets aren't indented correctly in PatternSyntaxException messages because tab characters are converted to spaces in their indentation. - Commit messages: - 8269753: Misplaced caret in PatternSyntaxException's detail message Changes:

Re: RFR: 8266054: VectorAPI rotate operation optimization [v10]

2021-07-26 Thread Jatin Bhateja
On Mon, 26 Jul 2021 17:19:07 GMT, Sandhya Viswanathan wrote: >> And'ing with shift_mask is already done on Java API side implementation >> before making a call to intrinsic rountine. > > @jatin-bhateja This question is still pending. Other than VectorAPI , SLP also infers vector rotates

Re: RFR: 8265891: (ch) InputStream returned by Channels.newInputStream should override transferTo [v3]

2021-07-26 Thread Markus KARG
On Fri, 2 Jul 2021 06:20:29 GMT, Markus KARG wrote: >> This PR-*draft* is **work in progress** and an invitation to discuss a >> possible solution for issue >> [JDK-8265891](https://bugs.openjdk.java.net/browse/JDK-8265891). It is *not >> yet* intended for a final review. >> >> As proposed

Re: RFR: 8265891: (ch) InputStream returned by Channels.newInputStream should override transferTo [v4]

2021-07-26 Thread Markus KARG
> This PR-*draft* is **work in progress** and an invitation to discuss a > possible solution for issue > [JDK-8265891](https://bugs.openjdk.java.net/browse/JDK-8265891). It is *not > yet* intended for a final review. > > As proposed in JDK-8265891, this PR provides an implementation for >

Integrated: 8075806: divideExact is missing in java.lang.Math

2021-07-26 Thread Brian Burkhalter
On Tue, 13 Jul 2021 17:21:52 GMT, Brian Burkhalter wrote: > Please consider this proposal to add `divideExact()` methods for integral > data types to `java.lang.Math` thereby rounding out "exact" support to all > four basic arithmetic operations. This pull request has now been integrated.

Re: RFR: 8266054: VectorAPI rotate operation optimization [v10]

2021-07-26 Thread Sandhya Viswanathan
On Sun, 18 Jul 2021 20:22:18 GMT, Jatin Bhateja wrote: >> src/hotspot/share/opto/vectornode.cpp line 1180: >> >>> 1178: cnt = cnt->in(1); >>> 1179: } >>> 1180: shiftRCnt = cnt; >> >> Why do we remove the And with mask here? > > And'ing with shift_mask is already done on Java API

Re: RFR: 8270321: Startup regressions in 18-b5 caused by JDK-8266310

2021-07-26 Thread Mandy Chung
On Fri, 23 Jul 2021 18:03:31 GMT, Sergey Chernyshev wrote: > Dear colleagues, > > Please review the patch that replaces the lambdas with anonymous classes > which solves the startup time regression as shown below. > > I attached the Bytestacks flamegraphs for both original (regression) and

Integrated: 8171382: java.time.Duration missing isPositive method

2021-07-26 Thread Naoto Sato
On Fri, 23 Jul 2021 17:27:27 GMT, Naoto Sato wrote: > Please review this PR to introduce `java.time.Duration.isPositive()` method. > A CSR is also drafted. This pull request has now been integrated. Changeset: efa63dc1 Author:Naoto Sato URL:

Integrated: 8265474: Dubious 'null' assignment in CompactByteArray.expand

2021-07-26 Thread Andrey Turbanov
On Wed, 23 Dec 2020 16:06:30 GMT, Andrey Turbanov wrote: > I propose to remove 'null' assignment of field CompactByteArray.values in > `expand` method. In the next statement this field is overridden with another > value - `tempArray`. > This code was there from initial load of OpenJDK

RFR: JDK-8256844: Make NMT late-initializable

2021-07-26 Thread Thomas Stuefe
Short: this patch makes NMT available in custom-launcher scenarios and during gtests. It simplifies NMT initialization. It adds a lot of NMT-specific testing. - NMT continues to be an extremely useful tool for SAP to tackle memory problems in the JVM. However, NMT is of limited use

Re: RFR: 8269130: Replace usages of Collection.toArray() with Collection.toArray(T[]) to avoid redundant array copying

2021-07-26 Thread Sergey Bylokhov
On Mon, 14 Jun 2021 17:00:29 GMT, Andrey Turbanov wrote: > I found few places, where code initially perform `Object[] > Colleciton.toArray()` call and then manually copy array into another array > with required type. > This PR cleanups such places to more shorter call `T[] >

Re: RFR: 8269130: Replace usages of Collection.toArray() with Collection.toArray(T[]) to avoid redundant array copying

2021-07-26 Thread Michael Bien
On Tue, 15 Jun 2021 12:34:50 GMT, Andrey Turbanov wrote: >> src/java.base/share/classes/java/security/Security.java line 656: >> >>> 654: return null; >>> 655: >>> 656: return candidates.toArray(new Provider[0]); >> >> `candidates.toArray(new

Re: RFR: 8269130: Replace usages of Collection.toArray() with Collection.toArray(T[]) to avoid redundant array copying

2021-07-26 Thread Michael Bien
On Mon, 14 Jun 2021 17:00:29 GMT, Andrey Turbanov wrote: > I found few places, where code initially perform `Object[] > Colleciton.toArray()` call and then manually copy array into another array > with required type. > This PR cleanups such places to more shorter call `T[] >

Re: RFR: 8269130: Replace usages of Collection.toArray() with Collection.toArray(T[]) to avoid redundant array copying

2021-07-26 Thread Andrey Turbanov
On Tue, 15 Jun 2021 12:06:43 GMT, Michael Bien wrote: >> I found few places, where code initially perform `Object[] >> Colleciton.toArray()` call and then manually copy array into another array >> with required type. >> This PR cleanups such places to more shorter call `T[] >>

Re: RFR: 8269130: Replace usages of Collection.toArray() with Collection.toArray(T[]) to avoid redundant array copying

2021-07-26 Thread Сергей Цыпанов
On Mon, 14 Jun 2021 17:00:29 GMT, Andrey Turbanov wrote: > I found few places, where code initially perform `Object[] > Colleciton.toArray()` call and then manually copy array into another array > with required type. > This PR cleanups such places to more shorter call `T[] >

RFR: 8269130: Replace usages of Collection.toArray() with Collection.toArray(T[]) to avoid redundant array copying

2021-07-26 Thread Andrey Turbanov
I found few places, where code initially perform `Object[] Colleciton.toArray()` call and then manually copy array into another array with required type. This PR cleanups such places to more shorter call `T[] Collection.toArray(T[])`. - Commit messages: - Replace usages of

Re: RFR: 8251329: (zipfs) Files.walkFileTree walks infinitely if zip has dir named "." inside [v2]

2021-07-26 Thread Alan Bateman
On Mon, 26 Jul 2021 10:16:47 GMT, Lance Andersen wrote: >> Hi, >> >> As discussed in the >> https://mail.openjdk.java.net/pipermail/core-libs-dev/2021-July/079621.html >> thread, this is the revised patch to address the use of '.' and '..' within >> Zip FS >> >> Zip FS needs to use "." and

Re: RFR: 8251329: (zipfs) Files.walkFileTree walks infinitely if zip has dir named "." inside

2021-07-26 Thread Lance Andersen
On Mon, 26 Jul 2021 09:52:09 GMT, Jaikiran Pai wrote: > This change looks fine to me. I was unsure how the writing/creating entries > with `.` or `..` with `ZipFileSystem` would behave in context of this change, > so I gave this a try locally with the changes from this PR: > > ``` > try

Re: RFR: 8251329: (zipfs) Files.walkFileTree walks infinitely if zip has dir named "." inside [v2]

2021-07-26 Thread Lance Andersen
On Mon, 26 Jul 2021 07:30:12 GMT, Alan Bateman wrote: >> Lance Andersen has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Add missing Copyright header and address minor comments > >

Re: RFR: 8251329: (zipfs) Files.walkFileTree walks infinitely if zip has dir named "." inside [v2]

2021-07-26 Thread Lance Andersen
> Hi, > > As discussed in the > https://mail.openjdk.java.net/pipermail/core-libs-dev/2021-July/079621.html > thread, this is the revised patch to address the use of '.' and '..' within > Zip FS > > Zip FS needs to use "." and ".." as links to the current and parent > directories and cannot

Re: RFR: 8251329: (zipfs) Files.walkFileTree walks infinitely if zip has dir named "." inside

2021-07-26 Thread Jaikiran Pai
On Sun, 25 Jul 2021 21:56:10 GMT, Lance Andersen wrote: > Hi, > > As discussed in the > https://mail.openjdk.java.net/pipermail/core-libs-dev/2021-July/079621.html > thread, this is the revised patch to address the use of '.' and '..' within > Zip FS > > Zip FS needs to use "." and ".." as

Re: RFR: 8266972: Use String.concat() in j.l.Class where invokedynamic-based String concatenation is not available [v7]

2021-07-26 Thread Сергей Цыпанов
> Hello, from discussion in https://github.com/openjdk/jdk/pull/3464 I've found > out, that in a few of JDK core classes, e.g. in `j.l.Class` expressions like > `baseName.replace('.', '/') + '/' + name` are not compiled into > `invokedynamic`-based code, but into one using `StringBuilder`. This

Re: RFR: 8263561: Re-examine uses of LinkedList [v5]

2021-07-26 Thread Сергей Цыпанов
> After I've renamed remove branch GitHub for some reason has closed original > https://github.com/openjdk/jdk/pull/2744, so I've decided to recreate it. Сергей Цыпанов has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 10 commits: -

Re: RFR: 8268113: Re-use Long.hashCode() where possible [v11]

2021-07-26 Thread Сергей Цыпанов
> There is a few JDK classes duplicating the contents of Long.hashCode() for > hash code calculation. They should explicitly delegate to Long.hashCode(). Сергей Цыпанов has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated

Re: RFR: 8270160: Remove redundant bounds check from AbstractStringBuilder.charAt() [v4]

2021-07-26 Thread Сергей Цыпанов
> `AbstractStringBuilder.charAt(int)` does bounds check before calling > `charAt()` (for non-latin Strings): > > @Override > public char charAt(int index) { > checkIndex(index, count); > if (isLatin1()) { > return (char)(value[index] & 0xff); > } > return

Re: RFR: 8251329: (zipfs) Files.walkFileTree walks infinitely if zip has dir named "." inside

2021-07-26 Thread Alan Bateman
On Sun, 25 Jul 2021 21:56:10 GMT, Lance Andersen wrote: > Hi, > > As discussed in the > https://mail.openjdk.java.net/pipermail/core-libs-dev/2021-July/079621.html > thread, this is the revised patch to address the use of '.' and '..' within > Zip FS > > Zip FS needs to use "." and ".." as