Re: RFR: 8271732: Regression in StringBuilder.charAt bounds checking [v4]

2021-08-11 Thread Alan Bateman
On Wed, 11 Aug 2021 21:40:52 GMT, Claes Redestad wrote: >> In #4738 we removed the `checkIndex(value, count)` call in `ASB.charAt` to >> avoid potentially getting two bounds checks in the UTF-16 case. Problem is >> this optimization cause a regression since `StringUTF16.charAt(..)` checks >> `

Integrated: 8272120: Avoid looking for standard encodings in "java." modules

2021-08-11 Thread Sergey Bylokhov
On Tue, 10 Aug 2021 05:08:54 GMT, Sergey Bylokhov wrote: > This is the continuation of JDK-8233884 and JDK-8271456. This change affects > fewer cases so I fix all "java." modules at once. > > In many places standard charsets are looked up via their names, for example: > absolutePath.getBytes("U

Re: RFR: 8272297: FileInputStream should override transferTo() for better performance

2021-08-11 Thread Brian Burkhalter
On Thu, 12 Aug 2021 01:16:04 GMT, Brian Burkhalter wrote: > Please consider this request to add an override > `java.io.FileInputStream.transferTo(OutputStream)` with improved performance > if the parameter is a `FileOutputStream`. Invoking `transferTo()` on a `FileInputStream` will use the sup

RFR: 8272297: FileInputStream should override transferTo() for better performance

2021-08-11 Thread Brian Burkhalter
Please consider this request to add an override `java.io.FileInputStream.transferTo(OutputStream)` with improved performance if the parameter is a `FileOutputStream`. - Commit messages: - 8272297: FileInputStream should override transferTo() for better performance Changes: https:/

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

2021-08-11 Thread Brian Burkhalter
On Sun, 1 Aug 2021 22:01:33 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 i

Integrated: 8271170: Add unit test for what jpackage app launcher puts in the environment

2021-08-11 Thread Alexey Semenyuk
On Mon, 9 Aug 2021 17:02:55 GMT, Alexey Semenyuk wrote: > Added jtreg test to verify jpackage launcher adds app dir to > `java.library.path` system property. > Removed unused test/jdk/tools/jpackage/apps/installer/Hello.java. > Moved test/jdk/tools/jpackage/apps/image/Hello.java to > test/jdk/t

Re: RFR: 8271732: Regression in StringBuilder.charAt bounds checking [v4]

2021-08-11 Thread Naoto Sato
On Wed, 11 Aug 2021 21:40:52 GMT, Claes Redestad wrote: >> In #4738 we removed the `checkIndex(value, count)` call in `ASB.charAt` to >> avoid potentially getting two bounds checks in the UTF-16 case. Problem is >> this optimization cause a regression since `StringUTF16.charAt(..)` checks >> `

Re: RFR: 8271732: Regression in StringBuilder.charAt bounds checking [v4]

2021-08-11 Thread Claes Redestad
> In #4738 we removed the `checkIndex(value, count)` call in `ASB.charAt` to > avoid potentially getting two bounds checks in the UTF-16 case. Problem is > this optimization cause a regression since `StringUTF16.charAt(..)` checks > `index` against the length of the `value` array and not `count`

Re: RFR: 8271732: Regression in StringBuilder.charAt bounds checking [v3]

2021-08-11 Thread Claes Redestad
> In #4738 we removed the `checkIndex(value, count)` call in `ASB.charAt` to > avoid potentially getting two bounds checks in the UTF-16 case. Problem is > this optimization cause a regression since `StringUTF16.charAt(..)` checks > `index` against the length of the `value` array and not `count`

Re: RFR: 8271170: Add unit test for what jpackage app launcher puts in the environment [v4]

2021-08-11 Thread Alexey Semenyuk
> Added jtreg test to verify jpackage launcher adds app dir to > `java.library.path` system property. > Removed unused test/jdk/tools/jpackage/apps/installer/Hello.java. > Moved test/jdk/tools/jpackage/apps/image/Hello.java to > test/jdk/tools/jpackage/apps/Hello.java. Alexey Semenyuk has update

Integrated: 8272328: java.library.path is not set properly by Windows jpackage app launcher

2021-08-11 Thread Alexey Semenyuk
On Wed, 11 Aug 2021 17:52:57 GMT, Alexey Semenyuk wrote: > Restart window app launcher to make changes made to `PATH` env variable > visible to JLI code in > https://github.com/openjdk/jdk/blob/master/src/hotspot/os/windows/os_windows.cpp#L347 This pull request has now been integrated. Change

Re: RFR: 8272328: java.library.path is not set properly by Windows jpackage app launcher

2021-08-11 Thread Alexander Matveev
On Wed, 11 Aug 2021 17:52:57 GMT, Alexey Semenyuk wrote: > Restart window app launcher to make changes made to `PATH` env variable > visible to JLI code in > https://github.com/openjdk/jdk/blob/master/src/hotspot/os/windows/os_windows.cpp#L347 Marked as reviewed by almatvee (Reviewer). --

Re: RFR: 8271732: Regression in StringBuilder.charAt bounds checking [v2]

2021-08-11 Thread Claes Redestad
> In #4738 we removed the `checkIndex(value, count)` call in `ASB.charAt` to > avoid potentially getting two bounds checks in the UTF-16 case. Problem is > this optimization cause a regression since `StringUTF16.charAt(..)` checks > `index` against the length of the `value` array and not `count`

Re: RFR: 8272328: java.library.path is not set properly by Windows jpackage app launcher

2021-08-11 Thread Andy Herrick
On Wed, 11 Aug 2021 17:52:57 GMT, Alexey Semenyuk wrote: > Restart window app launcher to make changes made to `PATH` env variable > visible to JLI code in > https://github.com/openjdk/jdk/blob/master/src/hotspot/os/windows/os_windows.cpp#L347 Marked as reviewed by herrick (Reviewer). ---

Re: RFR: 8272120: Avoid looking for standard encodings in "java." modules

2021-08-11 Thread Naoto Sato
On Tue, 10 Aug 2021 05:08:54 GMT, Sergey Bylokhov wrote: > This is the continuation of JDK-8233884 and JDK-8271456. This change affects > fewer cases so I fix all "java." modules at once. > > In many places standard charsets are looked up via their names, for example: > absolutePath.getBytes("U

Re: RFR: 8272120: Avoid looking for standard encodings in "java." modules

2021-08-11 Thread Daniel Fuchs
On Tue, 10 Aug 2021 05:08:54 GMT, Sergey Bylokhov wrote: > This is the continuation of JDK-8233884 and JDK-8271456. This change affects > fewer cases so I fix all "java." modules at once. > > In many places standard charsets are looked up via their names, for example: > absolutePath.getBytes("U

Re: RFR: 8272120: Avoid looking for standard encodings in "java." modules

2021-08-11 Thread Alan Bateman
On Tue, 10 Aug 2021 05:08:54 GMT, Sergey Bylokhov wrote: > This is the continuation of JDK-8233884 and JDK-8271456. This change affects > fewer cases so I fix all "java." modules at once. > > In many places standard charsets are looked up via their names, for example: > absolutePath.getBytes("U

Re: RFR: 8272120: Avoid looking for standard encodings in "java." modules

2021-08-11 Thread Alan Bateman
On Tue, 10 Aug 2021 18:41:04 GMT, Claes Redestad wrote: > Yes, while I don't know exactly which changes resolved JDK-6764325, it's > clear from the microbenchmarks added for #2102 that it's no longer an issue - > at least not in the mainline. Thanks for checking and for closing that issue. --

RFR: 8271302: Regex Test Refresh

2021-08-11 Thread Ian Graves
8271302: Regex Test Refresh - Commit messages: - Migrating regular expression tests to TestNG Changes: https://git.openjdk.java.net/jdk/pull/5092/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=5092&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8271302 St

Re: RFR: 8271302: Regex Test Refresh

2021-08-11 Thread Ian Graves
On Wed, 11 Aug 2021 18:22:42 GMT, Ian Graves wrote: > 8271302: Regex Test Refresh This PR migrates all regular expression tests in the jdk/java/util/regex directory to use TestNG assertions and annotations. The assertions utilized for this refresh are shared in common with standard ones from J

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

2021-08-11 Thread Markus KARG
On Wed, 11 Aug 2021 11:27:53 GMT, Alan Bateman wrote: > I've looked through the latest revision. Is there any way that we could drop > most of the changes to ChannelInputStream and focus on one or two specific > cases? I'm asking because there are several issues, inconsistencies, and it > is t

RFR: 8272328: java.library.path is not set properly by Windows jpackage app launcher

2021-08-11 Thread Alexey Semenyuk
Restart window app launcher to make changes made to `PATH` env variable visible to JLI code in https://github.com/openjdk/jdk/blob/master/src/hotspot/os/windows/os_windows.cpp#L347 - Commit messages: - 8272328: java.library.path is not set properly by Windows jpackage app launcher

Re: RFR: 8271170: Add unit test for what jpackage app launcher puts in the environment [v3]

2021-08-11 Thread Alexey Semenyuk
On Wed, 11 Aug 2021 15:20:00 GMT, Alexey Semenyuk wrote: >> Added jtreg test to verify jpackage launcher adds app dir to >> `java.library.path` system property. >> Removed unused test/jdk/tools/jpackage/apps/installer/Hello.java. >> Moved test/jdk/tools/jpackage/apps/image/Hello.java to >> test

Re: RFR: 8271732: Regression in StringBuilder.charAt bounds checking

2021-08-11 Thread Naoto Sato
On Wed, 11 Aug 2021 14:26:32 GMT, Claes Redestad wrote: > In #4738 we removed the `checkIndex(value, count)` call in `ASB.charAt` to > avoid potentially getting two bounds checks in the UTF-16 case. Problem is > this optimization cause a regression since `StringUTF16.charAt(..)` checks > `inde

Re: RFR: 8272120: Avoid looking for standard encodings in "java." modules

2021-08-11 Thread Naoto Sato
On Tue, 10 Aug 2021 05:08:54 GMT, Sergey Bylokhov wrote: > This is the continuation of JDK-8233884 and JDK-8271456. This change affects > fewer cases so I fix all "java." modules at once. > > In many places standard charsets are looked up via their names, for example: > absolutePath.getBytes("U

Re: RFR: 8271170: Add unit test for what jpackage app launcher puts in the environment [v3]

2021-08-11 Thread Alexey Semenyuk
> Added jtreg test to verify jpackage launcher adds app dir to > `java.library.path` system property. > Removed unused test/jdk/tools/jpackage/apps/installer/Hello.java. > Moved test/jdk/tools/jpackage/apps/image/Hello.java to > test/jdk/tools/jpackage/apps/Hello.java. Alexey Semenyuk has update

Re: RFR: 8271732: Regression in StringBuilder.charAt bounds checking

2021-08-11 Thread Alan Bateman
On Wed, 11 Aug 2021 14:26:32 GMT, Claes Redestad wrote: > In #4738 we removed the `checkIndex(value, count)` call in `ASB.charAt` to > avoid potentially getting two bounds checks in the UTF-16 case. Problem is > this optimization cause a regression since `StringUTF16.charAt(..)` checks > `inde

RFR: 8271732: Regression in StringBuilder.charAt bounds checking

2021-08-11 Thread Claes Redestad
In #4738 we removed the `checkIndex(value, count)` call in `ASB.charAt` to avoid potentially getting two bounds checks in the UTF-16 case. Problem is this optimization cause a regression since `StringUTF16.charAt(..)` checks `index` against the length of the `value` array and not `count`. A cor

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

2021-08-11 Thread Alan Bateman
On Mon, 9 Aug 2021 18:10:52 GMT, Alan Bateman wrote: > I think I fixed all requested changes. Anymore comments on this PR? I've looked through the latest revision. Is here any way that we could drop most of the changes to ChannelInputStream and focus on one or two specific cases? I'm asking be

Re: RFR: 8271862: C2 intrinsic for Reference.refersTo() is often not used [v2]

2021-08-11 Thread Per Liden
On Tue, 10 Aug 2021 08:59:59 GMT, Per Liden wrote: >> While fixing JDK-8270626 it was discovered that the C2 intrinsic for >> `Reference.refersTo()` is not used as often as one would think. Instead C2 >> often prefers using the native implementation, which is much slower which >> defeats the p

Integrated: 8271862: C2 intrinsic for Reference.refersTo() is often not used

2021-08-11 Thread Per Liden
On Mon, 9 Aug 2021 13:13:33 GMT, Per Liden wrote: > While fixing JDK-8270626 it was discovered that the C2 intrinsic for > `Reference.refersTo()` is not used as often as one would think. Instead C2 > often prefers using the native implementation, which is much slower which > defeats the purpos

Re: RFR: 8272120: Avoid looking for standard encodings in "java." modules

2021-08-11 Thread Daniel Fuchs
On Tue, 10 Aug 2021 05:08:54 GMT, Sergey Bylokhov wrote: > This is the continuation of JDK-8233884 and JDK-8271456. This change affects > fewer cases so I fix all "java." modules at once. > > In many places standard charsets are looked up via their names, for example: > absolutePath.getBytes("U

Withdrawn: JDK-8271858: Handle to jimage file inherited into child processes (posix)

2021-08-11 Thread Thomas Stuefe
On Wed, 4 Aug 2021 12:22:24 GMT, Thomas Stuefe wrote: > We should not leak the handle to the jimage file (lib/modules) to childs. > > JDK-8194734 did solve this for windows. We should use FD_CLOEXEC on Posix as > well. > > Note that this only poses a problem when a child process is spawned off

Re: RFR: JDK-8271858: Handle to jimage file inherited into child processes (posix)

2021-08-11 Thread Thomas Stuefe
On Wed, 4 Aug 2021 12:22:24 GMT, Thomas Stuefe wrote: > We should not leak the handle to the jimage file (lib/modules) to childs. > > JDK-8194734 did solve this for windows. We should use FD_CLOEXEC on Posix as > well. > > Note that this only poses a problem when a child process is spawned off