Re: [jdk17] RFR: 8269840: Update Platform.isDefaultCDSArchiveSupported() to return true for Linux-aarch64

2021-07-07 Thread Ioi Lam
On Thu, 8 Jul 2021 01:59:25 GMT, Mikhailo Seledtsov wrote: > Now that "JDK-8268212 Build linux-aarch64 natively" added support for default > CDS archive, time to update test configuration for this platform. This is a > very small one-line change. Looks good, but this returns true also for

Re: RFR: 8268698: Use Objects.check{Index, FromToIndex, FromIndexSize} for java.base [v11]

2021-07-07 Thread Yi Yang
> After JDK-8265518(#3615), it's possible to replace all variants of checkIndex > by Objects.checkIndex/Objects.checkFromToIndex/Objects.checkFromIndexSize in > the whole JDK codebase. Yi Yang has refreshed the contents of this pull request, and previous commits have been removed. The

Re: RFR: 8268698: Use Objects.check{Index, FromToIndex, FromIndexSize} for java.base [v8]

2021-07-07 Thread Yi Yang
On Wed, 7 Jul 2021 17:08:19 GMT, Mandy Chung wrote: >>> Does "client changes" means changes involving src/java.desktop and >>> test/java/awt? >> >> src/java.desktop, test/java/awt, and test/javax/imageio > >> > src/java.base/share/classes/java/util/concurrent/CopyOnWriteArrayList.java >> >

RFR: 8270056: Generated lambda class can not access protected static method of target class

2021-07-07 Thread Yi Yang
Generated lambda class can not access protected static method of the target class. The following exception is thrown when executing the attached reproducible program: Exception in thread "main" java.lang.IllegalAccessError: class

Re: [jdk17] RFR: 8269840: Update Platform.isDefaultCDSArchiveSupported() to return true for Linux-aarch64

2021-07-07 Thread Yumin Qi
On Thu, 8 Jul 2021 01:59:25 GMT, Mikhailo Seledtsov wrote: > Now that "JDK-8268212 Build linux-aarch64 natively" added support for default > CDS archive, time to update test configuration for this platform. This is a > very small one-line change. LGTM. - Marked as reviewed by

Re: [jdk17] RFR: 8269840: Update Platform.isDefaultCDSArchiveSupported() to return true for Linux-aarch64

2021-07-07 Thread Mikhailo Seledtsov
On Thu, 8 Jul 2021 01:59:25 GMT, Mikhailo Seledtsov wrote: > Now that "JDK-8268212 Build linux-aarch64 natively" added support for default > CDS archive, time to update test configuration for this platform. This is a > very small one-line change. Testing: Grepped test sources for

[jdk17] RFR: 8269840: Update Platform.isDefaultCDSArchiveSupported() to return true for Linux-aarch64

2021-07-07 Thread Mikhailo Seledtsov
Now that "JDK-8268212 Build linux-aarch64 natively" added support for default CDS archive, time to update test configuration for this platform. This is a very small one-line change. - Commit messages: - 8269840: Update Platform.isDefaultCDSArchiveSupported() to return true for

Re: RFR: 6506405: Math.abs(float) is slow

2021-07-07 Thread Brian Burkhalter
On Jul 7, 2021, at 5:50 PM, Joe Darcy mailto:joe.da...@oracle.com>> wrote: There is no specific constant in `{Float,Double}Consts` to mask all but the sign bit, but I had thought it might be good to add one there The sign bit mask can be bit-wise complemented though :-) I had it that way

Re: RFR: 6506405: Math.abs(float) is slow [v2]

2021-07-07 Thread Joe Darcy
On Thu, 8 Jul 2021 01:05:16 GMT, Brian Burkhalter wrote: >> Please consider this change to make the `float` and `double` versions of >> `java.lang.Math.abs()` branch-free. > > Brian Burkhalter has updated the pull request incrementally with one > additional commit since the last revision: > >

Re: RFR: 6506405: Math.abs(float) is slow [v2]

2021-07-07 Thread Brian Burkhalter
> Please consider this change to make the `float` and `double` versions of > `java.lang.Math.abs()` branch-free. Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision: 6506405: Add comments, use new consts for masking -

Re: RFR: Merge jdk17 [v2]

2021-07-07 Thread Jesper Wilhelmsson
> Forwardport JDK 17 -> JDK 18 Jesper Wilhelmsson has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 180 commits: - Merge - 8264735: Make dynamic dump repeatable Reviewed-by: ccheung, iklam - 8269481: SctpMultiChannel never

Integrated: Merge jdk17

2021-07-07 Thread Jesper Wilhelmsson
On Thu, 8 Jul 2021 00:01:43 GMT, Jesper Wilhelmsson wrote: > Forwardport JDK 17 -> JDK 18 This pull request has now been integrated. Changeset: 270fbcb3 Author:Jesper Wilhelmsson URL: https://git.openjdk.java.net/jdk/commit/270fbcb3f5755baf045fa6dec3fba459d32c32e1 Stats: 1083

Re: RFR: 6506405: Math.abs(float) is slow

2021-07-07 Thread Joe Darcy
On 7/7/2021 5:43 PM, Brian Burkhalter wrote: On Thu, 8 Jul 2021 00:38:45 GMT, Joe Darcy wrote: Please consider this change to make the `float` and `double` versions of `java.lang.Math.abs()` branch-free. src/java.base/share/classes/java/lang/Math.java line 1530: 1528:

Re: RFR: 6506405: Math.abs(float) is slow

2021-07-07 Thread Joe Darcy
On Wed, 7 Jul 2021 20:29:37 GMT, Brian Burkhalter wrote: > > > With this change there is no measurable effect on performance on macOS, but > on Linux there is approximately a 10% throughput improvement. The improvement is with the default options, without turning intrinsics off? I'm

Re: RFR: 6506405: Math.abs(float) is slow

2021-07-07 Thread Joe Darcy
On Wed, 7 Jul 2021 20:28:37 GMT, Brian Burkhalter wrote: > Please consider this change to make the `float` and `double` versions of > `java.lang.Math.abs()` branch-free. src/java.base/share/classes/java/lang/Math.java line 1530: > 1528: @IntrinsicCandidate > 1529: public static float

Re: RFR: 6506405: Math.abs(float) is slow

2021-07-07 Thread Brian Burkhalter
On Thu, 8 Jul 2021 00:38:45 GMT, Joe Darcy wrote: >> Please consider this change to make the `float` and `double` versions of >> `java.lang.Math.abs()` branch-free. > > src/java.base/share/classes/java/lang/Math.java line 1530: > >> 1528: @IntrinsicCandidate >> 1529: public static

Re: [jdk17] RFR: 6766844: ByteArrayInputStream#read with a byte array of length 0 not consistent with InputStream when at EOF [v2]

2021-07-07 Thread Brian Burkhalter
On Fri, 2 Jul 2021 19:36:01 GMT, Joe Wang wrote: >> Thanks for the suggestion. I am happy with it as is, but I'll hold off >> integrating it for now and rethink it later. > > Ok, good to know. Have a great weekend! I am inclined to leave the wording alone barring serious objections to the

RFR: Merge jdk17

2021-07-07 Thread Jesper Wilhelmsson
Forwardport JDK 17 -> JDK 18 - Commit messages: - Merge - 8269929: (test) Add diagnostic info to ProceessBuilder/Basic.java for unexpected output - 8269185: Directories in /opt/runtimepackagetest and /path/to/jdk-17 are different - 8269879: [PPC64] C2: Math.rint intrinsic uses

Re: RFR: 6506405: Math.abs(float) is slow

2021-07-07 Thread Brian Burkhalter
On Wed, 7 Jul 2021 20:28:37 GMT, Brian Burkhalter wrote: > Please consider this change to make the `float` and `double` versions of > `java.lang.Math.abs()` branch-free. On Jul 7, 2021, at 3:44 PM, Rémi Forax ***@***.**@***.***>> wrote: Your patch change the semantics, actually

Re: RFR: 6506405: Math.abs(float) is slow

2021-07-07 Thread Rémi Forax
On Wed, 7 Jul 2021 22:22:45 GMT, Joe Darcy wrote: > > > Your patch change the semantics, actually > > `Math.abs(Integer.MIN_VALUE) == Integer.MIN_VALUE` > > with your patch > > `Math.abs(Integer.MIN_VALUE) == Integer.MAX_VALUE` > > Does it? The overriding of int arguments shouldn't be

Re: RFR: 8268974: GetJREPath() JLI function fails to locate libjava.so if not standard Java launcher is used [v4]

2021-07-07 Thread Alexey Semenyuk
> GetApplicationHomeFromDll() fails if the path to libjli.so contains "bin" > component (/tmp/bin/HelloWorld/lib/runtime/lib/libjli.so). TruncatePath() > looks for "/bin/" first in "/tmp/bin/HelloWorld/lib/runtime/lib/libjli.so" > string and then it looks for "/lib/". But this is wrong order as

Re: RFR: 6506405: Math.abs(float) is slow

2021-07-07 Thread Joe Darcy
On Wed, 7 Jul 2021 20:28:37 GMT, Brian Burkhalter wrote: > Please consider this change to make the `float` and `double` versions of > `java.lang.Math.abs()` branch-free. > > Good catch. Well that’s not good. If it needs to catch a special case it’s > probably not worth doing. given the small

[jdk17] Integrated: 8269929: (test) Add diagnostic info to ProceessBuilder/Basic.java for unexpected output

2021-07-07 Thread Roger Riggs
On Wed, 7 Jul 2021 19:05:14 GMT, Roger Riggs wrote: > The test java/lang/ProcessBuilder/Basic.java continues to fail intermittently > with unexpected output from the VM. > It appears that destroying the process causes a vm thread to fail to be > started. > Extend the delay between starting the

Re: RFR: 6506405: Math.abs(float) is slow

2021-07-07 Thread Brian Burkhalter
On Wed, 7 Jul 2021 20:28:37 GMT, Brian Burkhalter wrote: > Please consider this change to make the `float` and `double` versions of > `java.lang.Math.abs()` branch-free. Good catch. Well that’s not good. If it needs to catch a special case it’s probably not worth doing. given the small

Re: RFR: 6506405: Math.abs(float) is slow

2021-07-07 Thread Rémi Forax
On Wed, 7 Jul 2021 20:28:37 GMT, Brian Burkhalter wrote: > Please consider this change to make the `float` and `double` versions of > `java.lang.Math.abs()` branch-free. Your patch change the semantics, actually `Math.abs(Integer.MIN_VALUE) == Integer.MIN_VALUE` with your patch

RFR: 6506405: Math.abs(float) is slow

2021-07-07 Thread Brian Burkhalter
Please consider this change to make the `float` and `double` versions of `java.lang.Math.abs()` branch-free. - Commit messages: - 6506405: Math.abs(float) is slow Changes: https://git.openjdk.java.net/jdk/pull/4711/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk=4711=00

Re: RFR: 6506405: Math.abs(float) is slow

2021-07-07 Thread Brian Burkhalter
On Wed, 7 Jul 2021 20:28:37 GMT, Brian Burkhalter wrote: > Please consider this change to make the `float` and `double` versions of > `java.lang.Math.abs()` branch-free. With this change there is no measurable effect on performance on macOS, but on Linux there is approximately a 10%

Re: [jdk17] RFR: 8269929: (test) Add diagnostic info to ProceessBuilder/Basic.java for unexpected output

2021-07-07 Thread Naoto Sato
On Wed, 7 Jul 2021 19:05:14 GMT, Roger Riggs wrote: > The test java/lang/ProcessBuilder/Basic.java continues to fail intermittently > with unexpected output from the VM. > It appears that destroying the process causes a vm thread to fail to be > started. > Extend the delay between starting the

Re: [jdk17] RFR: 8269929: (test) Add diagnostic info to ProceessBuilder/Basic.java for unexpected output

2021-07-07 Thread Brian Burkhalter
On Wed, 7 Jul 2021 19:05:14 GMT, Roger Riggs wrote: > The test java/lang/ProcessBuilder/Basic.java continues to fail intermittently > with unexpected output from the VM. > It appears that destroying the process causes a vm thread to fail to be > started. > Extend the delay between starting the

Re: [jdk17] RFR: 8269929: (test) Add diagnostic info to ProceessBuilder/Basic.java for unexpected output

2021-07-07 Thread Iris Clark
On Wed, 7 Jul 2021 19:05:14 GMT, Roger Riggs wrote: > The test java/lang/ProcessBuilder/Basic.java continues to fail intermittently > with unexpected output from the VM. > It appears that destroying the process causes a vm thread to fail to be > started. > Extend the delay between starting the

[jdk17] RFR: 8269929: (test) Add diagnostic info to ProceessBuilder/Basic.java for unexpected output

2021-07-07 Thread Roger Riggs
The test java/lang/ProcessBuilder/Basic.java continues to fail intermittently with unexpected output from the VM. It appears that destroying the process causes a vm thread to fail to be started. Extend the delay between starting the child and destroying it. Add diagnostics to be specific about

Re: RFR: 8268974: GetJREPath() JLI function fails to locate libjava.so if not standard Java launcher is used [v3]

2021-07-07 Thread Andy Herrick
On Wed, 7 Jul 2021 18:54:23 GMT, Alexey Semenyuk wrote: >> GetApplicationHomeFromDll() fails if the path to libjli.so contains "bin" >> component (/tmp/bin/HelloWorld/lib/runtime/lib/libjli.so). TruncatePath() >> looks for "/bin/" first in "/tmp/bin/HelloWorld/lib/runtime/lib/libjli.so" >>

Re: RFR: 8268974: GetJREPath() JLI function fails to locate libjava.so if not standard Java launcher is used

2021-07-07 Thread Alexey Semenyuk
On Sat, 3 Jul 2021 07:41:40 GMT, Alan Bateman wrote: >> Is it possible to add a test for this that is completely independent of >> jpackage? I think there are a few existing tests that copy the run-time >> image to a new location for testing purposes. >> >> We may need to rename the JBS

Re: RFR: 8268974: GetJREPath() JLI function fails to locate libjava.so if not standard Java launcher is used [v3]

2021-07-07 Thread Alexey Semenyuk
> GetApplicationHomeFromDll() fails if the path to libjli.so contains "bin" > component (/tmp/bin/HelloWorld/lib/runtime/lib/libjli.so). TruncatePath() > looks for "/bin/" first in "/tmp/bin/HelloWorld/lib/runtime/lib/libjli.so" > string and then it looks for "/lib/". But this is wrong order as

Re: RFR: 8268698: Use Objects.check{Index, FromToIndex, FromIndexSize} where possible [v8]

2021-07-07 Thread Mandy Chung
On Wed, 7 Jul 2021 16:22:25 GMT, Mandy Chung wrote: >> Hi Mandy, thanks for reviewing this. >> >>> I suggest to separate the client changes (both src and test) in a separate >>> PR for the client review. >> >> Does "client changes" means changes involving src/java.desktop and >>

[jdk17] Integrated: 8269185: Directories in /opt/runtimepackagetest and /path/to/jdk-17 are different

2021-07-07 Thread Alexey Semenyuk
On Fri, 2 Jul 2021 22:17:09 GMT, Alexey Semenyuk wrote: > Disable stripping to prevent rpmbuild from modifying executables This pull request has now been integrated. Changeset: 6000950b Author:Alexey Semenyuk URL:

Re: [jdk17] RFR: 8268766: Desugaring of pattern matching enum switch should be improved [v8]

2021-07-07 Thread Maurizio Cimadamore
On Wed, 7 Jul 2021 12:10:16 GMT, Jan Lahoda wrote: >> Currently, an enum switch with patterns is desugared in a very non-standard, >> and potentially slow, way. It would be better to use the standard >> `typeSwitch` bootstrap to classify the enum constants. The bootstrap needs >> to accept

Re: RFR: 8268698: Use Objects.check{Index, FromToIndex, FromIndexSize} where possible [v8]

2021-07-07 Thread Mandy Chung
On Wed, 7 Jul 2021 02:10:10 GMT, Yi Yang wrote: > Does "client changes" means changes involving src/java.desktop and > test/java/awt? src/java.desktop, test/java/awt, and test/javax/imageio - PR: https://git.openjdk.java.net/jdk/pull/4507

Re: RFR: 8268788: Annotations with lambda expressions can still cause AnnotationFormatError

2021-07-07 Thread Sergei Ustimenko
Hi Joe, Thanks, I appreciate your feedback very much! There was one more thing I wanted to discuss: there is something that might be improved in the AnnotationInvocationHandler#validateAnnotationMethods and I wanted to know if it makes sense to go ahead with the change. There are `if`

Re: [jdk17] RFR: JDK-8268826: Cleanup Override in Context-Specific Deserialization Filters [v7]

2021-07-07 Thread Roger Riggs
> Remove the unnecessary special case "OVERRIDE" in jdk.serialFilterFactory > property. > Fix description in the example of a filter allowing platform classes. > Suppress some warnings about use of SecurityManager in tests. Roger Riggs has updated the pull request incrementally with one

Re: [jdk17] RFR: 8268766: Desugaring of pattern matching enum switch should be improved [v8]

2021-07-07 Thread Jan Lahoda
On Wed, 7 Jul 2021 12:10:16 GMT, Jan Lahoda wrote: >> Currently, an enum switch with patterns is desugared in a very non-standard, >> and potentially slow, way. It would be better to use the standard >> `typeSwitch` bootstrap to classify the enum constants. The bootstrap needs >> to accept

Re: [jdk17] RFR: 8268766: Desugaring of pattern matching enum switch should be improved [v8]

2021-07-07 Thread Jan Lahoda
> Currently, an enum switch with patterns is desugared in a very non-standard, > and potentially slow, way. It would be better to use the standard > `typeSwitch` bootstrap to classify the enum constants. The bootstrap needs to > accept enum constants as labels in order to allow this. A

Re: [jdk17] RFR: 8269185: Directories in /opt/runtimepackagetest and /path/to/jdk-17 are different

2021-07-07 Thread Andy Herrick
On Fri, 2 Jul 2021 22:17:09 GMT, Alexey Semenyuk wrote: > Disable stripping to prevent rpmbuild from modifying executables Marked as reviewed by herrick (Reviewer). - PR: https://git.openjdk.java.net/jdk17/pull/207

Re: [jdk17] RFR: 8268766: Desugaring of pattern matching enum switch should be improved [v7]

2021-07-07 Thread Maurizio Cimadamore
On Wed, 7 Jul 2021 06:08:13 GMT, Jan Lahoda wrote: >> Currently, an enum switch with patterns is desugared in a very non-standard, >> and potentially slow, way. It would be better to use the standard >> `typeSwitch` bootstrap to classify the enum constants. The bootstrap needs >> to accept

[jdk17] Integrated: 8269772: [macos-aarch64] test compilation failed with "SocketException: No buffer space available"

2021-07-07 Thread Daniel Fuchs
On Mon, 5 Jul 2021 11:21:39 GMT, Daniel Fuchs wrote: > Please find here a trivial fix for: > > 8269772: [macos-aarch64] test compilation failed with "SocketException: No > buffer space available" > > Running several of the websocket tests concurrently on some of the CI > machines is causing

Re: [jdk17] RFR: 8268766: Desugaring of pattern matching enum switch should be improved [v7]

2021-07-07 Thread Jan Lahoda
> Currently, an enum switch with patterns is desugared in a very non-standard, > and potentially slow, way. It would be better to use the standard > `typeSwitch` bootstrap to classify the enum constants. The bootstrap needs to > accept enum constants as labels in order to allow this. A