Dangling class-level javadoc comments in JDK

2021-08-23 Thread Andrey Turbanov
Hello. I found a few internal classes in the JDK codebase which don't have proper javadoc, but have dangling javadoc-like comments. Dangling Javadoc comments are ignored by the javadoc tool and IDE. Perhaps it was intentional to not add proper javadoc to them? I believe it's better to convert them

Re: RFR: 8272863: Replace usages of Collections.sort with List.sort call in public java modules

2021-08-23 Thread Sergey Bylokhov
On Mon, 23 Aug 2021 21:01:48 GMT, Andrey Turbanov wrote: > Collections.sort is just a wrapper, so it is better to use an instance method > directly. The changes in the src/java.desktop/ looks fine. Filed: https://bugs.openjdk.java.net/browse/JDK-8272863 - Marked as reviewed by s

RFR: 8272863: Replace usages of Collections.sort with List.sort call in public java modules

2021-08-23 Thread Andrey Turbanov
Collections.sort is just a wrapper, so it is better to use an instance method directly. - Commit messages: - [PATCH] Replace usages of Collections.sort with List.sort call in public java modules Changes: https://git.openjdk.java.net/jdk/pull/5229/files Webrev: https://webrevs.ope

Re: RFR: 8269559: AArch64: Implement string_compare intrinsic in SVE [v2]

2021-08-23 Thread Nick Gasson
On Mon, 23 Aug 2021 21:48:01 GMT, TatWai Chong wrote: >> This patch implements string_compare intrinsic in SVE. >> It supports all LL, LU, UL and UU comparisons. >> >> As we haven't found an existing benchmark to measure performance impact, >> we created a benchmark derived from the test [1] fo

Re: RFR: 8272861: Add a micro benchmark for vector api

2021-08-23 Thread Ningsheng Jian
On Mon, 23 Aug 2021 23:18:28 GMT, Sandhya Viswanathan wrote: > This pull request adds a micro benchmark for Vector API. > The Black Scholes algorithm is implemented with and without Vector API. > We see about ~6x gain with Vector API for this micro benchmark using 256 bit > vectors. test/micro

Re: RFR: 8272347: ObjectMethods::bootstrap should specify NPE if any argument except lookup is null [v2]

2021-08-23 Thread Vicente Romero
On Mon, 23 Aug 2021 23:13:58 GMT, Mandy Chung wrote: >> Vicente Romero has updated the pull request incrementally with one >> additional commit since the last revision: >> >> addressing review comments > > src/java.base/share/classes/java/lang/runtime/ObjectMethods.java line 327: > >> 325:

Re: RFR: 8272347: ObjectMethods::bootstrap should specify NPE if any argument except lookup is null [v2]

2021-08-23 Thread Vicente Romero
> Please review this simple PR along with the associated CSR. The PR is > basically adding a line the the specification of method > `java.lang.runtime.ObjectMethods::bootstrap` stating under what conditions a > NPE will be thrown. > > TIA > > link to the [CSR](https://bugs.openjdk.java.net/bro

Re: RFR: 8268231: Aarch64: Use ldp in intrinsics for String.compareTo [v4]

2021-08-23 Thread Wu Yan
On Wed, 28 Jul 2021 08:51:38 GMT, Andrew Haley wrote: >> I don't think we want to keep two copies of the compareTo intrinsic. If >> there are no cases where the LDP version is worse than the original version >> then we should just delete the old one and replace it with this. > >> I don't think

Re: RFR: 8264322: Generate CDS archive when creating custom JDK image [v2]

2021-08-23 Thread Mandy Chung
On Fri, 20 Aug 2021 00:09:01 GMT, Calvin Cheung wrote: >> Please review this change for adding a `jlink` command line option >> `--generate-cds-archive` for generating CDS archives as a post processing >> step during the creation of a custom JDK image. >> >> Details can be found in the corresp

Re: RFR: 8264322: Generate CDS archive when creating custom JDK image [v2]

2021-08-23 Thread Calvin Cheung
On Fri, 20 Aug 2021 02:04:52 GMT, Mandy Chung wrote: >> I'd prefer to leave it as is for now since it's in a test case and I don't >> think the code is complex. > > This is fragile by setting `os.name`. I've filed [JDK-8272868](https://bugs.openjdk.java.net/browse/JDK-8272868) to follow-up the

Re: RFR: 8272347: ObjectMethods::bootstrap should specify NPE if any argument except lookup is null

2021-08-23 Thread Vicente Romero
On 8/23/21 4:07 PM, Brian Goetz wrote: Actually, it will not NPE if `names` is null and you have selected equals/hashCode as the name.  Might be better to do requiresNonNull() up front for all the arguments, just to make such analysis simpler: requireNonNull(methodName); requireNonNull(type

RFR: 8272861: Add a micro benchmark for vector api

2021-08-23 Thread Sandhya Viswanathan
This pull request adds a micro benchmark for Vector API. The Black Scholes algorithm is implemented with and without Vector API. We see about ~6x gain with Vector API for this micro benchmark using 256 bit vectors. - Commit messages: - whitespace - 8272861: Add a micro benchmark fo

Re: RFR: 8272347: ObjectMethods::bootstrap should specify NPE if any argument except lookup is null

2021-08-23 Thread Mandy Chung
On Mon, 23 Aug 2021 18:08:02 GMT, Vicente Romero wrote: > Please review this simple PR along with the associated CSR. The PR is > basically adding a line the the specification of method > `java.lang.runtime.ObjectMethods::bootstrap` stating under what conditions a > NPE will be thrown. > > TI

Re: RFR: 8269559: AArch64: Implement string_compare intrinsic in SVE [v2]

2021-08-23 Thread TatWai Chong
On Tue, 17 Aug 2021 07:14:24 GMT, Nick Gasson wrote: >> TatWai Chong has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Restore the removal of vtmp3 (=V2) as it is still used by the non-SVE >> compare-long-strings stub. >> >> And remo

Re: RFR: 8269559: AArch64: Implement string_compare intrinsic in SVE [v2]

2021-08-23 Thread TatWai Chong
> This patch implements string_compare intrinsic in SVE. > It supports all LL, LU, UL and UU comparisons. > > As we haven't found an existing benchmark to measure performance impact, > we created a benchmark derived from the test [1] for this evaluation. > This benchmark is attached to this patch.

Re: [(Much) faster java.util.LinkedList]

2021-08-23 Thread Paul Sandoz
Hi, Thanks for sharing. I browsed through the code (not a review) and gave it a test drive, generally it looks of good quality. Over time, since LinkedList was added, there are less reasons to use it, thereby making such improvements you propose less impactful. CPU caches have got much better

Re: RFR: JDK-8272639: jpackaged applications using microphone on mac [v2]

2021-08-23 Thread Sergey Bylokhov
On Mon, 23 Aug 2021 14:34:52 GMT, Andy Herrick wrote: >> JDK-8272639: jpackaged applications using microphone on mac > > Andy Herrick has updated the pull request incrementally with one additional > commit since the last revision: > > JDK-8272639: jpackaged applications using microphone on ma

Re: RFR: 8272347: ObjectMethods::bootstrap should specify NPE if any argument except lookup is null

2021-08-23 Thread Brian Goetz
Actually, it will not NPE if `names` is null and you have selected equals/hashCode as the name.  Might be better to do requiresNonNull() up front for all the arguments, just to make such analysis simpler: requireNonNull(methodName); requireNonNull(type); requireNonNull(recordClass); requireNonN

Re: RFR: 8272347: ObjectMethods::bootstrap should specify NPE if any argument except lookup is null

2021-08-23 Thread Brian Goetz
+1 On 8/23/2021 2:22 PM, Vicente Romero wrote: Please review this simple PR along with the associated CSR. The PR is basically adding a line the the specification of method `java.lang.runtime.ObjectMethods::bootstrap` stating under what conditions a NPE will be thrown. TIA link to the [CSR]

RFR: 8272347: ObjectMethods::bootstrap should specify NPE if any argument except lookup is null

2021-08-23 Thread Vicente Romero
Please review this simple PR along with the associated CSR. The PR is basically adding a line the the specification of method `java.lang.runtime.ObjectMethods::bootstrap` stating under what conditions a NPE will be thrown. TIA link to the [CSR](https://bugs.openjdk.java.net/browse/JDK-8272852)

RFR: 8272473: Parsing epoch seconds at a DST transition with a non-UTC parser is wrong

2021-08-23 Thread Naoto Sato
Please review the fix to the subject issue. When instant seconds and zone co-exist in parsed data, instant seconds was not resolved correctly from them. - Commit messages: - 8272473: Parsing epoch seconds at a DST transition with a non-UTC parser is wrong Changes: https://git.open

Re: RFR: JDK-8272639: jpackaged applications using microphone on mac [v2]

2021-08-23 Thread Andy Herrick
> JDK-8272639: jpackaged applications using microphone on mac Andy Herrick has updated the pull request incrementally with one additional commit since the last revision: JDK-8272639: jpackaged applications using microphone on mac - Changes: - all: https://git.openjdk.java.net/j

Re: RFR: 8266936: Add a finalization JFR event [v8]

2021-08-23 Thread Markus Grönlund
> Greetings, > > Object.finalize() was deprecated in JDK9. There is an ongoing effort to > replace and mitigate Object.finalize() uses in the JDK libraries; please see > https://bugs.openjdk.java.net/browse/JDK-8253568 for more information. > > We also like to assist users in replacing and mit

Re: RFR: 8272836: Limit run time for java/lang/invoke/LFCaching tests

2021-08-23 Thread Aleksey Shipilev
On Mon, 23 Aug 2021 11:33:35 GMT, Aleksey Shipilev wrote: > See the RFE for discussion. > > Current PR improves the test time like this: > > > $ make run-test TEST=java/lang/invoke/LFCaching/ > > # Before > real 3m51.608s > user 5m21.612s > sys 0m5.391s > > # After > real 1m13.606s > u

Re: RFR: JDK-8272639: jpackaged applications using microphone on mac

2021-08-23 Thread Andy Herrick
On Thu, 19 Aug 2021 22:46:18 GMT, Sergey Bylokhov wrote: >> JDK-8272639: jpackaged applications using microphone on mac > > src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/resources/Info-lite.plist.template > line 37: > >> 35: true >> 36: NSMicrophoneUsageDescription >> 37: The appl

Re: RFR: 8266936: Add a finalization JFR event [v7]

2021-08-23 Thread Markus Grönlund
> Greetings, > > Object.finalize() was deprecated in JDK9. There is an ongoing effort to > replace and mitigate Object.finalize() uses in the JDK libraries; please see > https://bugs.openjdk.java.net/browse/JDK-8253568 for more information. > > We also like to assist users in replacing and mit

Re: RFR: 8270380: Change the default value of the java.security.manager system property to disallow

2021-08-23 Thread Jaikiran Pai
On Mon, 23 Aug 2021 12:09:42 GMT, Weijun Wang wrote: > > Would this then allow the security manager to be used? In other words, can > > the value of `java.security.manager` be changed dynamically at runtime or > > is it restricted to be set only at launch time (via command line arugment > > `-

Re: RFR: 8272836: Optimize run time for java/lang/invoke/LFCaching tests

2021-08-23 Thread Claes Redestad
On Mon, 23 Aug 2021 11:33:35 GMT, Aleksey Shipilev wrote: > See the RFE for discussion. > > Current PR improves the test time like this: > > > $ make run-test TEST=java/lang/invoke/LFCaching/ > > # Before > real 3m51.608s > user 5m21.612s > sys 0m5.391s > > # After > real 1m13.606s > u

Re: RFR: 8270380: Change the default value of the java.security.manager system property to disallow

2021-08-23 Thread Weijun Wang
On Mon, 23 Aug 2021 03:22:18 GMT, Jaikiran Pai wrote: > Would this then allow the security manager to be used? In other words, can > the value of `java.security.manager` be changed dynamically at runtime or is > it restricted to be set only at launch time (via command line arugment > `-Djava.s

Re: RFR: 8270380: Change the default value of the java.security.manager system property to disallow

2021-08-23 Thread Weijun Wang
On Fri, 20 Aug 2021 22:44:34 GMT, Weijun Wang wrote: > This change modifies the default value of the `java.security.manager` system > property from "allow" to "disallow". This means unless it's explicitly set to > "allow", any call to `System.setSecurityManager()` would throw an UOE. > > The `

RFR: 8272836: Optimize run time for java/lang/invoke/LFCaching tests

2021-08-23 Thread Aleksey Shipilev
See the RFE for discussion. Current PR improves the test time like this: $ make run-test TEST=java/lang/invoke/LFCaching/ # Before real3m51.608s user5m21.612s sys 0m5.391s # After real1m13.606s user2m26.827s sys 0m4.761s - Commit messages: - 8272836: Opt

Re: RFR: 8270380: Change the default value of the java.security.manager system property to disallow

2021-08-23 Thread David Holmes
On Fri, 20 Aug 2021 22:44:34 GMT, Weijun Wang wrote: > This change modifies the default value of the `java.security.manager` system > property from "allow" to "disallow". This means unless it's explicitly set to > "allow", any call to `System.setSecurityManager()` would throw an UOE. > > The `