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

2023-07-05 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: 8240567: MethodTooLargeException thrown while creating a jlink image [v21]

2023-07-05 Thread Oliver Kopp
On Wed, 5 Jul 2023 23:37:28 GMT, Mandy Chung wrote: >> Oliver Kopp has updated the pull request with a new target base due to a >> merge or a rebase. The pull request now contains 30 commits: >> >> - Merge remote-tracking branch 'upstream/master' into fix-8240567 >> - Reformat >> - Update te

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

2023-07-05 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: 6983726: Reimplement MethodHandleProxies.asInterfaceInstance [v20]

2023-07-05 Thread Chen Liang
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: 8240567: MethodTooLargeException thrown while creating a jlink image [v21]

2023-07-05 Thread Mandy Chung
On Wed, 5 Jul 2023 22:43:14 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 [v19]

2023-07-05 Thread Oliver Kopp
On Wed, 5 Jul 2023 17:25:03 GMT, Mandy Chung wrote: > It's looking pretty good. Thank you! > About the test, I don't see `ArrayList::add` in the generated bytecode of > `sub2-13`. The dedup string set is used for the targets of qualified exports > and opens and uses. The modifiers set of `req

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

2023-07-05 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: 8311188: Simplify and modernize equals and hashCode in java.text [v3]

2023-07-05 Thread Pavel Rappo
On Wed, 5 Jul 2023 17:39:49 GMT, Roger Riggs wrote: >> Do you mean we could use `obj instanceof DecimalFormat other` in front of >> that 30-line `&&` expression, or that we could collapse the list to exactly >> what you wrote? >> >> Separately, `super.equals` already performs the class check;

Re: RFR: JDK-8310913 Move ReferencedKeyMap to jdk.internal so it may be shared [v3]

2023-07-05 Thread Mandy Chung
On Tue, 4 Jul 2023 12:55:22 GMT, Jim Laskey wrote: >> java.lang.runtime.ReferencedKeyMap was introduced to provide a concurrent >> caching scheme for Carrier objects. The technique used is generally useful >> for a variety of caching schemes and is being moved to be shared in other >> parts of

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

2023-07-05 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: 8311500: StackWalker.getCallerClass() can throw if invoked reflectively [v2]

2023-07-05 Thread Mandy Chung
On Wed, 5 Jul 2023 17:25:24 GMT, Volker Simonis wrote: >> As the included jtreg test demonstrates, `StackWalker.getCallerClass()` can >> throw an `UnsupportedOperationException` if called reflectively. Currently >> this only happens if we invoke `StackWalker.getCallerClass()` recursively >> re

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

2023-07-05 Thread Jorn Vernee
On Wed, 5 Jul 2023 16:00:11 GMT, Mandy Chung wrote: >> Ok, thanks. This is similar to the solution I would have suggested. >> >> The only thing I'm unsure about is races. ClassValue allows multiple threads >> to race to compute the final value, but in the end only 1 is chosen that is >> return

Re: RFR: JDK-8310913 Move ReferencedKeyMap to jdk.internal so it may be shared [v3]

2023-07-05 Thread Roger Riggs
On Tue, 4 Jul 2023 12:55:22 GMT, Jim Laskey wrote: >> java.lang.runtime.ReferencedKeyMap was introduced to provide a concurrent >> caching scheme for Carrier objects. The technique used is generally useful >> for a variety of caching schemes and is being moved to be shared in other >> parts of

Integrated: 8310999: Add @since info in jdk.jsobject files

2023-07-05 Thread Roger Riggs
On Wed, 5 Jul 2023 14:51:31 GMT, Roger Riggs wrote: > Source code cleanup. > Add @since, remove unused imports and remove unnecessary SuppressWarnings of > deprecation. This pull request has now been integrated. Changeset: 6eba096c Author:Roger Riggs URL: https://git.openjdk.org/jd

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

2023-07-05 Thread Roger Riggs
On Wed, 5 Jul 2023 16:39:58 GMT, Pavel Rappo wrote: >> src/java.base/share/classes/java/text/CompactNumberFormat.java line 2364: >> >>> 2362: return true; >>> 2363: } >>> 2364: >> >> Moving this before the `super.equals` call performance-wise would favor the >> equals cas

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

2023-07-05 Thread Roger Riggs
On Wed, 5 Jul 2023 16:27:38 GMT, Pavel Rappo wrote: >> src/java.base/share/classes/java/text/DecimalFormat.java line 2930: >> >>> 2928: DecimalFormat other = (DecimalFormat) obj; >>> 2929: return ((posPrefixPattern == other.posPrefixPattern && >>> 2930: positiveP

Re: RFR: 8310999: Add @since info in jdk.jsobject files [v2]

2023-07-05 Thread Phil Race
On Wed, 5 Jul 2023 16:20:07 GMT, Roger Riggs wrote: >> Source code cleanup. >> Add @since, remove unused imports and remove unnecessary SuppressWarnings of >> deprecation. > > Roger Riggs has updated the pull request incrementally with one additional > commit since the last revision: > > Rem

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

2023-07-05 Thread Mandy Chung
On Tue, 4 Jul 2023 11:00:13 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: 8311500: StackWalker.getCallerClass() can throw if invoked reflectively [v2]

2023-07-05 Thread Volker Simonis
On Wed, 5 Jul 2023 14:41:21 GMT, Aleksey Shipilev wrote: > Neither PR nor the bug describes what the root cause it, so it is very hard > to see if patch makes sense. Please describe the problem and solution briefly? Fair enough :) I've put the details into the initial comment and also renamed

Re: RFR: 8311500: StackWalker.getCallerClass() can throw if invoked reflectively [v2]

2023-07-05 Thread Volker Simonis
> As the included jtreg test demonstrates, `StackWalker.getCallerClass()` can > throw an `UnsupportedOperationException` if called reflectively. Currently > this only happens if we invoke `StackWalker.getCallerClass()` recursively > reflectively, but this issue will become more prominent once we

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

2023-07-05 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.

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

2023-07-05 Thread Pavel Rappo
On Wed, 5 Jul 2023 15:46:56 GMT, Roger Riggs wrote: >> Pavel Rappo has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Adhere to surrounding code style > > src/java.base/share/classes/java/text/CompactNumberFormat.java line 2364: > >> 2362:

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

2023-07-05 Thread Pavel Rappo
On Wed, 5 Jul 2023 15:47:56 GMT, Roger Riggs wrote: >> Pavel Rappo has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Adhere to surrounding code style > > src/java.base/share/classes/java/text/DecimalFormat.java line 2926: > >> 2924:

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

2023-07-05 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.

Re: RFR: 8310999: Add @since info in jdk.jsobject files [v2]

2023-07-05 Thread Roger Riggs
> Source code cleanup. > Add @since, remove unused imports and remove unnecessary SuppressWarnings of > deprecation. Roger Riggs has updated the pull request incrementally with one additional commit since the last revision: Remove unneeded @SuppressWarnings - Changes: - all: h

Re: RFR: 8310999: Add @since info in jdk.jsobject files [v2]

2023-07-05 Thread Roger Riggs
On Wed, 5 Jul 2023 16:05:25 GMT, Phil Race wrote: > unless my eyes deceive me the suppresswarnings is still present. Gack!, I removed it and then put it back to try to discover why it was there in the first place. Gone again and thanks - PR Comment: https://git.openjdk.org/jdk/pul

Re: RFR: 8310999: Add @since info in jdk.jsobject files [v2]

2023-07-05 Thread Iris Clark
On Wed, 5 Jul 2023 16:20:07 GMT, Roger Riggs wrote: >> Source code cleanup. >> Add @since, remove unused imports and remove unnecessary SuppressWarnings of >> deprecation. > > Roger Riggs has updated the pull request incrementally with one additional > commit since the last revision: > > Rem

Re: RFR: 8310999: Add @since info in jdk.jsobject files

2023-07-05 Thread Phil Race
On Wed, 5 Jul 2023 14:51:31 GMT, Roger Riggs wrote: > Source code cleanup. > Add @since, remove unused imports and remove unnecessary SuppressWarnings of > deprecation. unless my eyes deceive me the suppresswarnings is still present. - Changes requested by prr (Reviewer). PR Revi

Re: RFR: 8310999: Add @since info in jdk.jsobject files

2023-07-05 Thread Iris Clark
On Wed, 5 Jul 2023 14:51:31 GMT, Roger Riggs wrote: > Source code cleanup. > Add @since, remove unused imports and remove unnecessary SuppressWarnings of > deprecation. Marked as reviewed by iris (Reviewer). - PR Review: https://git.openjdk.org/jdk/pull/14775#pullrequestreview-151

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

2023-07-05 Thread Mandy Chung
On Tue, 4 Jul 2023 21:35:38 GMT, Jorn Vernee wrote: > If multiple threads race to create a new proxy lookup here, they will all get > a distinct lookup returned to them. I think this is okay? Though, it would > mean we have less sharing of proxy classes. yes, that's okay. We can also do what

Re: RFR: 8310999: Add @since info in jdk.jsobject files

2023-07-05 Thread Brian Burkhalter
On Wed, 5 Jul 2023 14:51:31 GMT, Roger Riggs wrote: > Source code cleanup. > Add @since, remove unused imports and remove unnecessary SuppressWarnings of > deprecation. Marked as reviewed by bpb (Reviewer). - PR Review: https://git.openjdk.org/jdk/pull/14775#pullrequestreview-1514

Re: RFR: 8310999: Add @since info in jdk.jsobject files

2023-07-05 Thread Joe Wang
On Wed, 5 Jul 2023 14:51:31 GMT, Roger Riggs wrote: > Source code cleanup. > Add @since, remove unused imports and remove unnecessary SuppressWarnings of > deprecation. Marked as reviewed by joehw (Reviewer). - PR Review: https://git.openjdk.org/jdk/pull/14775#pullrequestreview-15

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

2023-07-05 Thread Roger Riggs
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: 8311188: Simplify and modernize equals and hashCode in java.text

2023-07-05 Thread Roger Riggs
On Tue, 4 Jul 2023 22:03:58 GMT, John R Rose 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 ty

Re: RFR: 8311489: Remove unused dirent_md files

2023-07-05 Thread Brian Burkhalter
On Wed, 5 Jul 2023 10:21:51 GMT, Daniel Jeliński wrote: > The methods declared in dirent_md are not used in libjava and not exported. > They should be removed. Marked as reviewed by bpb (Reviewer). - PR Review: https://git.openjdk.org/jdk/pull/14772#pullrequestreview-1514847033

Re: RFR: 8310999: Add @since info in jdk.jsobject files

2023-07-05 Thread Lance Andersen
On Wed, 5 Jul 2023 14:51:31 GMT, Roger Riggs wrote: > Source code cleanup. > Add @since, remove unused imports and remove unnecessary SuppressWarnings of > deprecation. Marked as reviewed by lancea (Reviewer). - PR Review: https://git.openjdk.org/jdk/pull/14775#pullrequestreview-1

Re: Adapt ArrayList Javadoc for sequenced collections

2023-07-05 Thread Roger Riggs
Hi Daniel, Core-libs-dev is indeed the correct alias for this documentation issue. Create an issue to track: JDK-8311517 Regards, Roger On 7/1/23 3:35 PM, Daniel Schmid wrote: The JEP for sequenced collection (https://openjdk.org/jeps/431) would

Re: RFR: JDK-8310550: Adjust references to rt.jar [v4]

2023-07-05 Thread Matthias Baesken
> There are a few references to rt.jar in comments and in the codebase itself. > Some of them might be removed or adjusted. Matthias Baesken has updated the pull request incrementally with one additional commit since the last revision: Adjust comments - Changes: - all: https:/

Re: RFR: JDK-8310550: Adjust references to rt.jar [v4]

2023-07-05 Thread Christoph Langer
On Wed, 5 Jul 2023 15:01:52 GMT, Matthias Baesken wrote: >> There are a few references to rt.jar in comments and in the codebase itself. >> Some of them might be removed or adjusted. > > Matthias Baesken has updated the pull request incrementally with one > additional commit since the last revi

Re: RFR: JDK-8310550: Adjust references to rt.jar [v3]

2023-07-05 Thread Matthias Baesken
On Fri, 30 Jun 2023 11:37:10 GMT, Matthias Baesken wrote: >> There are a few references to rt.jar in comments and in the codebase itself. >> Some of them might be removed or adjusted. > > Matthias Baesken has updated the pull request incrementally with one > additional commit since the last rev

RFR: 8310999: Add @since info in jdk.jsobject files

2023-07-05 Thread Roger Riggs
Source code cleanup. Add @since, remove unused imports and remove unnecessary SuppressWarnings of deprecation. - Commit messages: - 8310999: Add @since info in jdk.jsobject files Changes: https://git.openjdk.org/jdk/pull/14775/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr

Re: RFR: 8311500: StackWalker.getCallerClass() can throw if invoked reflectively

2023-07-05 Thread Aleksey Shipilev
On Wed, 5 Jul 2023 11:45:59 GMT, Volker Simonis wrote: > As the included jtreg test demonstrates, `StackWalker.getCallerClass()` can > throw an `UnsupportedOperationException` if called reflectively. Currently > this only happens if we invoke `StackWalker.getCallerClass()` recursively > reflec

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

2023-07-05 Thread Eric Caspole
On Sat, 1 Jul 2023 07:53:17 GMT, Swati Sharma 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/java/io/

Integrated: 8311290: Improve java.lang.ref.Cleaner rendered documentation

2023-07-05 Thread Pavel Rappo
On Tue, 4 Jul 2023 12:40:26 GMT, Pavel Rappo wrote: > 1. Missing leading asterisk interferes with example indentation; nothing in > https://bugs.openjdk.org/browse/JDK-8276700 (or review thereof), which > introduced that line, suggests that the asterisk was omitted on purpose. > 2. link and li

Re: RFR: 8311290: Improve java.lang.ref.Cleaner rendered documentation

2023-07-05 Thread Roger Riggs
On Tue, 4 Jul 2023 12:40:26 GMT, Pavel Rappo wrote: > 1. Missing leading asterisk interferes with example indentation; nothing in > https://bugs.openjdk.org/browse/JDK-8276700 (or review thereof), which > introduced that line, suggests that the asterisk was omitted on purpose. > 2. link and li

Re: RFR: JDK-8310550: Adjust references to rt.jar [v3]

2023-07-05 Thread Christoph Langer
On Thu, 22 Jun 2023 09:21:29 GMT, Matthias Baesken wrote: >> src/jdk.compiler/share/classes/com/sun/tools/javac/file/JavacFileManager.java >> line 196: >> >>> 194: >>> 195: /** >>> 196: * Set whether or not to use ct.sym as an alternate >> >> As an alternate to what? This needs somet

Re: RFR: JDK-8310550: Adjust references to rt.jar [v3]

2023-07-05 Thread Christoph Langer
On Fri, 30 Jun 2023 11:37:10 GMT, Matthias Baesken wrote: >> There are a few references to rt.jar in comments and in the codebase itself. >> Some of them might be removed or adjusted. > > Matthias Baesken has updated the pull request incrementally with one > additional commit since the last rev

Re: RFR: 8310813: Simplify and modernize equals, hashCode, and compareTo for BigInteger [v2]

2023-07-05 Thread Pavel Rappo
On Thu, 29 Jun 2023 15:50:33 GMT, Roger Riggs wrote: >> Pavel Rappo has updated the pull request with a new target base due to a >> merge or a rebase. The incremental webrev excludes the unrelated changes >> brought in by the merge/rebase. The pull request contains five additional >> commits s

Re: RFR: 8310813: Simplify and modernize equals, hashCode, and compareTo for BigInteger [v2]

2023-07-05 Thread Pavel Rappo
> Please review this PR to use modern APIs and language features to simplify > equals, hashCode, and compareTo for BigInteger. If you have any performance > concerns, please raise them. > > This PR is cherry-picked from a bigger, not-yet-published PR, to test the > waters. That latter PR will b

RFR: 8311500: StackWalker.getCallerClass() can throw if invoked reflectively

2023-07-05 Thread Volker Simonis
As the included jtreg test demonstrates, `StackWalker.getCallerClass()` can throw an `UnsupportedOperationException` if called reflectively. Currently this only happens if we invoke `StackWalker.getCallerClass()` recursively reflectively, but this issue will become more prominent once we fix [J

RFR: 8311489: Remove unused dirent_md files

2023-07-05 Thread Daniel Jeliński
The methods declared in dirent_md are not used in libjava and not exported. They should be removed. - Commit messages: - Remove dirent_md Changes: https://git.openjdk.org/jdk/pull/14772/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=14772&range=00 Issue: https://bugs.ope