Re: RFR: 8311178: JMH tests don't scale well when sharing output buffers

2023-07-03 Thread Swati Sharma
On Sat, 1 Jul 2023 19:05:23 GMT, Sergey Tsypanov wrote: >> The below benchmark files have scaling issues due to cache contention and >> leads to poor scaling when run on multiple threads. The patch sets the scope >> from benchmark level to thread level to fix the issue: >> - org/openjdk/bench/j

Re: RFR: 8311188: Simplify and modernize equals and hashCode in java.text

2023-07-03 Thread Pavel Rappo
On Tue, 4 Jul 2023 00:40:14 GMT, Chen Liang wrote: > Hmm, I think that issue refers to code that have explicit non-Object > parameter types (like `X::equals(Object)boolean` in the issue's sample). This > method already have both arguments as `Object`, so I don't think there's any > type-specif

Re: RFR: JDK-8308398 Move SunEC crypto provider into java.base [v3]

2023-07-03 Thread Valerie Peng
On Mon, 3 Jul 2023 17:51:10 GMT, Anthony Scarpino wrote: >> Hi, >> >> I need a code review for moving the contents of the jdk.crypto.ec module >> into java.base. This moves the SunEC JCE Provider (Elliptic Curve) into >> java.base. EC has always been separate from the base module/pkg because

Re: RFR: 8311188: Simplify and modernize equals and hashCode in java.text

2023-07-03 Thread Chen Liang
On Tue, 4 Jul 2023 00:22:02 GMT, Pavel Rappo wrote: >> src/java.base/share/classes/java/text/AttributedString.java line 661: >> >>> 659: >>> 660: // returns whether the two objects are either both null or equal >>> 661: private static boolean valuesMatch(Object value1, Object value2) {

Re: RFR: 8311188: Simplify and modernize equals and hashCode in java.text

2023-07-03 Thread Pavel Rappo
On Mon, 3 Jul 2023 13:22:27 GMT, Chen Liang wrote: >> Please review this PR to use modern APIs and language features to simplify >> `equals` and `hashCode` in the java.text area. >> >> * Some changes to `equals` and `hashCode` are refactoring rather than >> modernization. Such changes can be a

Re: RFR: 8311188: Simplify and modernize equals and hashCode in java.text

2023-07-03 Thread Chen Liang
On Mon, 3 Jul 2023 11:12:32 GMT, Pavel Rappo wrote: > Please review this PR to use modern APIs and language features to simplify > `equals` and `hashCode` in the java.text area. > > * Some changes to `equals` and `hashCode` are refactoring rather than > modernization. Such changes can be as tr

Re: RFR: 8240567: MethodTooLargeException thrown while creating a jlink image [v6]

2023-07-03 Thread Mandy Chung
On Mon, 3 Jul 2023 21:22:36 GMT, Oliver Kopp wrote: >> `plugins.properties` needs to be updated to show the option added for this >> plugin. >> >> BTW, the current argument described in the usage is out-dated which needs >> update. >> >> system-modules.argument=retainModuleTarget > > Added

Re: RFR: 8240567: MethodTooLargeException thrown while creating a jlink image [v15]

2023-07-03 Thread Oliver Kopp
> Fix for [JDK-8240567](https://bugs.openjdk.org/browse/JDK-8240567): > "MethodTooLargeException thrown while creating a jlink image". > > Java still has a 64kb limit: A method may not be longer than 64kb. The idea > of the fix is to split up the generated methods in several smaller methods > >

Re: RFR: 8240567: MethodTooLargeException thrown while creating a jlink image [v14]

2023-07-03 Thread Oliver Kopp
> Fix for [JDK-8240567](https://bugs.openjdk.org/browse/JDK-8240567): > "MethodTooLargeException thrown while creating a jlink image". > > Java still has a 64kb limit: A method may not be longer than 64kb. The idea > of the fix is to split up the generated methods in several smaller methods > >

Re: RFR: 8240567: MethodTooLargeException thrown while creating a jlink image [v6]

2023-07-03 Thread Oliver Kopp
On Mon, 3 Jul 2023 17:09:35 GMT, Mandy Chung wrote: >> What I meant here is to change the `configure` method to allow the plugin to >> take an argument for example >> >> --system-modules batch-size=100 >> >> >> This argument is optional. If not specified, the default value is 75. >>

Re: RFR: 8240567: MethodTooLargeException thrown while creating a jlink image [v12]

2023-07-03 Thread Oliver Kopp
On Mon, 3 Jul 2023 20:00:40 GMT, Mandy Chung wrote: >> Oliver Kopp has updated the pull request incrementally with two additional >> commits since the last revision: >> >> - Fix test >> - Fix ArrayList initialization and off-by-one errors > > src/jdk.jlink/share/classes/jdk/tools/jlink/intern

Re: RFR: 8240567: MethodTooLargeException thrown while creating a jlink image [v13]

2023-07-03 Thread Oliver Kopp
> Fix for [JDK-8240567](https://bugs.openjdk.org/browse/JDK-8240567): > "MethodTooLargeException thrown while creating a jlink image". > > Java still has a 64kb limit: A method may not be longer than 64kb. The idea > of the fix is to split up the generated methods in several smaller methods > >

[jdk21] Integrated: 8254566: Clarify the spec of ClassLoader::getClassLoadingLock for non-parallel capable loader

2023-07-03 Thread Mandy Chung
On Mon, 3 Jul 2023 16:23:43 GMT, Mandy Chung wrote: > Backport of commit > [b9198f99](https://github.com/openjdk/jdk/commit/b9198f993173b0fbdc7ff1400e2205d3969370da). This pull request has now been integrated. Changeset: 205dffe3 Author:Mandy Chung URL: https://git.openjdk.org/jdk2

Re: RFR: 8311188: Simplify and modernize equals and hashCode in java.text

2023-07-03 Thread Naoto Sato
On Mon, 3 Jul 2023 11:12:32 GMT, Pavel Rappo wrote: > Please review this PR to use modern APIs and language features to simplify > `equals` and `hashCode` in the java.text area. > > * Some changes to `equals` and `hashCode` are refactoring rather than > modernization. Such changes can be as tr

Re: RFR: 8240567: MethodTooLargeException thrown while creating a jlink image [v12]

2023-07-03 Thread Mandy Chung
On Sat, 1 Jul 2023 18:36:10 GMT, Oliver Kopp wrote: >> Fix for [JDK-8240567](https://bugs.openjdk.org/browse/JDK-8240567): >> "MethodTooLargeException thrown while creating a jlink image". >> >> Java still has a 64kb limit: A method may not be longer than 64kb. The idea >> of the fix is to spl

Re: RFR: 8240567: MethodTooLargeException thrown while creating a jlink image [v6]

2023-07-03 Thread Mandy Chung
On Sat, 1 Jul 2023 10:07:15 GMT, Oliver Kopp wrote: >> test/jdk/tools/jlink/JLink100Modules.java line 40: >> >>> 38: * @library ../lib >>> 39: * @modules java.base/jdk.internal.jimage >>> 40: * jdk.jdeps/com.sun.tools.classfile >> >> I guess you copied this from other jlink tests.

Re: RFR: 8310901: Convert String::newStringNoRepl with Latin-1 to String::newStringLatin1NoRepl [v6]

2023-07-03 Thread Glavo
> Added a new method `newStringLatin1NoRepl` to the `JavaLangAccess`. > > Reasons: > > * Most use cases of `newStringNoRepl` use `ISO_8859_1` as the charset, > creating a new shortcut can make writing shorter; > * Since all possible values of `byte` are legal Latin-1 characters, > `newStringLat

Re: RFR: 8310901: Convert String::newStringNoRepl with Latin-1 to String::newStringLatin1NoRepl [v5]

2023-07-03 Thread Glavo
> Added a new method `newStringLatin1NoRepl` to the `JavaLangAccess`. > > Reasons: > > * Most use cases of `newStringNoRepl` use `ISO_8859_1` as the charset, > creating a new shortcut can make writing shorter; > * Since all possible values of `byte` are legal Latin-1 characters, > `newStringLat

Re: RFR: 6983726: Reimplement MethodHandleProxies.asInterfaceInstance [v20]

2023-07-03 Thread Mandy Chung
On Sun, 2 Jul 2023 02:05:23 GMT, Chen Liang wrote: >> As John Rose has pointed out in this issue, the current j.l.r.Proxy based >> implementation of MethodHandleProxies.asInterface has a few issues: >> 1. Exposes too much information via Proxy supertype (and WrapperInstance >> interface) >> 2.

Re: RFR: 8310818: Refactor more Locale tests to use JUnit

2023-07-03 Thread Naoto Sato
On Fri, 30 Jun 2023 07:52:36 GMT, Justin Lu wrote: > Please review this PR which refactors additional tests in Locale to use JUnit. > > If a test was named bugNNN.java, it was renamed to something more > descriptive. > > Below is a list of all the changes > > - Refactor and Rename Bug4175

Re: RFR: JDK-8308398 Move SunEC crypto provider into java.base [v3]

2023-07-03 Thread Anthony Scarpino
> Hi, > > I need a code review for moving the contents of the jdk.crypto.ec module into > java.base. This moves the SunEC JCE Provider (Elliptic Curve) into > java.base. EC has always been separate from the base module/pkg because of > its dependence on a native library. That library was rem

Re: RFR: 8240567: MethodTooLargeException thrown while creating a jlink image [v6]

2023-07-03 Thread Mandy Chung
On Thu, 29 Jun 2023 20:43:59 GMT, Mandy Chung wrote: >> Oliver Kopp has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Fix threshold > > src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/SystemModulesPlugin.java > line 669: > >

Re: RFR: 8240567: MethodTooLargeException thrown while creating a jlink image [v6]

2023-07-03 Thread Mandy Chung
On Mon, 3 Jul 2023 17:07:16 GMT, Mandy Chung wrote: >> src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/SystemModulesPlugin.java >> line 669: >> >>> 667: */ >>> 668: private void genModuleDescriptorsMethod(ClassBuilder clb) { >>> 669: if (moduleInfos.siz

Re: [jdk21] RFR: 8254566: Clarify the spec of ClassLoader::getClassLoadingLock for non-parallel capable loader

2023-07-03 Thread Iris Clark
On Mon, 3 Jul 2023 16:23:43 GMT, Mandy Chung wrote: > Backport of commit > [b9198f99](https://github.com/openjdk/jdk/commit/b9198f993173b0fbdc7ff1400e2205d3969370da). Looks identical to change in 22, as expected. - Marked as reviewed by iris (Reviewer). PR Review: https://git.ope

Re: RFR: 8240567: MethodTooLargeException thrown while creating a jlink image [v6]

2023-07-03 Thread Mandy Chung
On Mon, 3 Jul 2023 16:21:22 GMT, Mandy Chung wrote: >> I assume the "old" comments were too detailed. I removed them at >> [JabRef/jdk@`23bbc0c` >> (#2)](https://github.com/JabRef/jdk/pull/2/commits/23bbc0ce0c8fd8a4cd689c0260c5fbcb91b20046) >> to have the code reviewable. I can readd some of t

[jdk21] RFR: 8254566: Clarify the spec of ClassLoader::getClassLoadingLock for non-parallel capable loader

2023-07-03 Thread Mandy Chung
Backport of commit [b9198f99](https://github.com/openjdk/jdk/commit/b9198f993173b0fbdc7ff1400e2205d3969370da). - Commit messages: - Backport b9198f993173b0fbdc7ff1400e2205d3969370da Changes: https://git.openjdk.org/jdk21/pull/93/files Webrev: https://webrevs.openjdk.org/?repo=jdk2

Re: RFR: 8240567: MethodTooLargeException thrown while creating a jlink image [v6]

2023-07-03 Thread Mandy Chung
On Sat, 1 Jul 2023 10:38:05 GMT, Oliver Kopp wrote: >> src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/SystemModulesPlugin.java >> line 691: >> >>> 689: } >>> 690: >>> 691: List> splitModuleInfos = new >>> ArrayList<>(); >> >> Please add the comments to d

Integrated: 8254566: Clarify the spec of ClassLoader::getClassLoadingLock for non-parallel capable loader

2023-07-03 Thread Mandy Chung
On Thu, 29 Jun 2023 23:39:55 GMT, Mandy Chung wrote: > The spec of `ClassLoader::getClassLoadingLock` is unclear that this method is > intended for parallel-capable class loader implementations to provide an > alternate implementation. For non-parallel-capable class loaders, this > method sh

Re: RFR: 8311122: Fix typos in java.base

2023-07-03 Thread Sean Mullan
On Thu, 29 Jun 2023 21:17:49 GMT, Pavel Rappo wrote: > Please review this IDE-assisted typo hunt, which I plan to backport to jdk21. The changes in the security classes look fine to me. - Marked as reviewed by mullan (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/14718#pu

Re: RFR: 8311188: Simplify and modernize equals and hashCode in java.text

2023-07-03 Thread Lance Andersen
On Mon, 3 Jul 2023 11:12:32 GMT, Pavel Rappo wrote: > Please review this PR to use modern APIs and language features to simplify > `equals` and `hashCode` in the java.text area. > > * Some changes to `equals` and `hashCode` are refactoring rather than > modernization. Such changes can be as tr

RFR: 8311188: Simplify and modernize equals and hashCode in java.text

2023-07-03 Thread Pavel Rappo
Please review this PR to use modern APIs and language features to simplify `equals` and `hashCode` in the java.text area. * Some changes to `equals` and `hashCode` are refactoring rather than modernization. Such changes can be as trivial as rearranging, adding, or commenting checks. * java.tex

[jdk21] Integrated: 8310829: guarantee(!HAS_PENDING_EXCEPTION) failed in ExceptionTranslation::doit

2023-07-03 Thread Tobias Hartmann
On Mon, 3 Jul 2023 07:13:14 GMT, Tobias Hartmann wrote: > Backport of [JDK-8310829](https://bugs.openjdk.java.net/browse/JDK-8310829). > Applies cleanly. > > Thanks, > Tobias This pull request has now been integrated. Changeset: 6de4e8f6 Author:Tobias Hartmann URL: https://git.ope

Re: [jdk21] RFR: 8310829: guarantee(!HAS_PENDING_EXCEPTION) failed in ExceptionTranslation::doit

2023-07-03 Thread Tobias Hartmann
On Mon, 3 Jul 2023 07:13:14 GMT, Tobias Hartmann wrote: > Backport of [JDK-8310829](https://bugs.openjdk.java.net/browse/JDK-8310829). > Applies cleanly. > > Thanks, > Tobias Thanks, Christian! - PR Comment: https://git.openjdk.org/jdk21/pull/91#issuecomment-1617875850

Re: RFR: 8311220: Optimization for StringLatin UpperLower [v2]

2023-07-03 Thread 温绍锦
> # Benchmark Result > > > sh make/devkit/createJMHBundle.sh > bash configure --with-jmh=build/jmh/jars > make test TEST="micro:java.lang.StringUpperLower.*" > > > > ## 1. > [aliyun_ecs_c8i.xlarge](https://help.aliyun.com/document_detail/25378.html#c8i) > * cpu : intel xeon sapphire rapids (x

Re: RFR: 8311220: Optimization for StringLatin UpperLower

2023-07-03 Thread Glavo
On Mon, 3 Jul 2023 09:21:54 GMT, 温绍锦 wrote: > another example: > > ``` > String str0 = new String(new byte[]{-1}, StandardCharsets.ISO_8859_1); > String str1 = str0.toUpperCase(); > ``` > > str0.coder is LATIN1 str1.coder is UTF16 I know this, these cases only happen with `toUpperCase`, not wi

Re: RFR: 8311220: Optimization for StringLatin UpperLower

2023-07-03 Thread 温绍锦
On Mon, 3 Jul 2023 09:20:04 GMT, Glavo wrote: >> String str0 = new String(new byte[]{-75}, StandardCharsets.ISO_8859_1); >> String str1 = str0.toUpperCase(); >> >> str0.coder is LATIN1 >> str1.coder is UTF16 > >> ```java >> String str0 = new String(new byte[]{-75}, StandardCharsets.ISO_8859_1);

Re: RFR: 8311220: Optimization for StringLatin UpperLower

2023-07-03 Thread Glavo
On Mon, 3 Jul 2023 09:17:29 GMT, 温绍锦 wrote: >> src/java.base/share/classes/java/lang/StringLatin1.java line 442: >> >>> 440: if (!canEncode(cp)) { // not a latin1 >>> character >>> 441: return toLowerCaseEx(str, value, first, locale, false); >>>

Re: RFR: 8311220: Optimization for StringLatin UpperLower

2023-07-03 Thread 温绍锦
On Mon, 3 Jul 2023 08:25:06 GMT, Glavo wrote: >> # Benchmark Result >> >> >> sh make/devkit/createJMHBundle.sh >> bash configure --with-jmh=build/jmh/jars >> make test TEST="micro:java.lang.StringUpperLower.*" >> >> >> >> ## 1. >> [aliyun_ecs_c8i.xlarge](https://help.aliyun.com/document_det

Re: [jdk21] RFR: 8310829: guarantee(!HAS_PENDING_EXCEPTION) failed in ExceptionTranslation::doit

2023-07-03 Thread Christian Hagedorn
On Mon, 3 Jul 2023 07:13:14 GMT, Tobias Hartmann wrote: > Backport of [JDK-8310829](https://bugs.openjdk.java.net/browse/JDK-8310829). > Applies cleanly. > > Thanks, > Tobias Looks good. - Marked as reviewed by chagedorn (Reviewer). PR Review: https://git.openjdk.org/jdk21/pull/

Withdrawn: 8311030: ResourceBundle.handleKeySet() is racy

2023-07-03 Thread Sergey Tsypanov
On Wed, 28 Jun 2023 11:05:11 GMT, Sergey Tsypanov wrote: > Double-checked locking should rely on local variable to avoid racy reads from > volatile field. This pull request has been closed without being integrated. - PR: https://git.openjdk.org/jdk/pull/14692

Re: RFR: 8311220: Optimization for StringLatin UpperLower

2023-07-03 Thread Glavo
On Mon, 3 Jul 2023 04:02:44 GMT, 温绍锦 wrote: > # Benchmark Result > > > sh make/devkit/createJMHBundle.sh > bash configure --with-jmh=build/jmh/jars > make test TEST="micro:java.lang.StringUpperLower.*" > > > > ## 1. > [aliyun_ecs_c8i.xlarge](https://help.aliyun.com/document_detail/25378.htm

Re: RFR: 8311220: Optimization for StringLatin UpperLower

2023-07-03 Thread Chen Liang
On Mon, 3 Jul 2023 05:29:57 GMT, 温绍锦 wrote: >> src/java.base/share/classes/java/lang/StringLatin1.java line 498: >> >>> 496: for (first = 0 ; first < len; first++ ) { >>> 497: int cp = value[first] & 0xff; >>> 498: if (cp >= 'a' && (cp <= 'z' || cp == 181 || (cp >

[jdk21] RFR: 8310829: guarantee(!HAS_PENDING_EXCEPTION) failed in ExceptionTranslation::doit

2023-07-03 Thread Tobias Hartmann
Backport of [JDK-8310829](https://bugs.openjdk.java.net/browse/JDK-8310829). Applies cleanly. Thanks, Tobias - Commit messages: - 8310829: guarantee(!HAS_PENDING_EXCEPTION) failed in ExceptionTranslation::doit Changes: https://git.openjdk.org/jdk21/pull/91/files Webrev: https://

[jdk21] Integrated: 8310380: Handle problems in core-related tests on macOS when codesign tool does not work

2023-07-03 Thread Matthias Baesken
On Fri, 30 Jun 2023 12:35:27 GMT, Matthias Baesken wrote: > 8310380: Handle problems in core-related tests on macOS when codesign tool > does not work This pull request has now been integrated. Changeset: 6f3f4aa2 Author:Matthias Baesken URL: https://git.openjdk.org/jdk21/commit/6f