Re: RFR: 8341566: Adding factory for non-synchronized CharSequence Reader [v6]

2024-10-08 Thread Jaikiran Pai
On Wed, 9 Oct 2024 05:50:18 GMT, Markus KARG wrote: >> This Pull Requests proposes an implementation for >> [JDK-8341566](https://bugs.openjdk.org/browse/JDK-8341566): Adding the new >> method `public static Reader Reader.of(CharSequence)` will return an >> anonymous, non-synchronized implemen

Re: RFR: 8293336: AOT-linking of invokedynamic for lambda expression and string concat

2024-10-08 Thread John Rose
On 8 Oct 2024, at 14:47, Ioi Lam wrote: > On Wed, 25 Sep 2024 17:14:54 GMT, Chen Liang wrote: > >>> 402: MethodType primordialMT = new MethodType(rtype, ptypes); >>> 403: if (AOTHolder.archivedMethodTypes != null) { >>> 404: MethodType mt = >>> AOTHolder.archivedMetho

Re: RFR: 8338526: Don't store abstract and interface Klasses in class metaspace

2024-10-08 Thread Roman Kennke
On Tue, 3 Sep 2024 15:50:13 GMT, Thomas Stuefe wrote: >>> > I don't think the costs for two address comparisons matter, not with the >>> > comparatively few deallocations that happen (few hundreds or few >>> > thousand). If deallocate is hot, we are using metaspace wrong. >>> >>> MethodData do

Re: RFR: 8341722: Fix some warnings as errors when building on Linux with toolchain clang

2024-10-08 Thread Matthias Baesken
On Tue, 8 Oct 2024 16:30:36 GMT, Chris Plummer wrote: >> There are a few warnings as errors occurring when building on Linux with >> clang (clang15). Mostly these are some kind of 'unused' warnings. >> Might be related to https://bugs.openjdk.org/browse/JDK-8339156 . > > src/jdk.hotspot.agent/li

Re: RFR: 8338526: Don't store abstract and interface Klasses in class metaspace [v6]

2024-10-08 Thread John R Rose
On Fri, 6 Sep 2024 16:20:52 GMT, Coleen Phillimore wrote: >> This change stores InstanceKlass for interface and abstract classes in the >> non-class metaspace, since class metaspace will have limits on number of >> classes that can be represented when Lilliput changes go in. Classes that >> h

Re: RFR: 8338526: Don't store abstract and interface Klasses in class metaspace [v6]

2024-10-08 Thread Quan Anh Mai
On Wed, 9 Oct 2024 05:53:51 GMT, Andrew Haley wrote: >> Coleen Phillimore has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Replace Metaspace::is_compressed_klass_ptr with >> CompressedKlassPointers::is_in_encoding_range. > > On 8 Oct 202

Re: RFR: 8338526: Don't store abstract and interface Klasses in class metaspace [v6]

2024-10-08 Thread Andrew Haley
On Fri, 6 Sep 2024 16:20:52 GMT, Coleen Phillimore wrote: >> This change stores InstanceKlass for interface and abstract classes in the >> non-class metaspace, since class metaspace will have limits on number of >> classes that can be represented when Lilliput changes go in. Classes that >> h

Re: RFR: 8293336: AOT-linking of invokedynamic for lambda expression and string concat [v2]

2024-10-08 Thread Ioi Lam
On Wed, 9 Oct 2024 03:49:49 GMT, ExE Boss wrote: >> We haven't done much testing with the other SCF BSMs, so I think it's better >> to do that in a follow-up REF. > > [`StringConcatFactory​::makeConcat(…)`] is definitely deterministic, as it > simply delegates to [`StringConcatFactory​::makeCon

Integrated: 8341658: RISC-V: Test DateFormatProviderTest.java run timeouted

2024-10-08 Thread SendaoYan
On Mon, 7 Oct 2024 15:49:57 GMT, SendaoYan wrote: > Hi all, > The test `java/util/PluggableLocale/DateFormatProviderTest.java` run timeout > on riscv64 physic machine. This test has 4496 sub-tests, and riscv64 has poor > single core performance, so this test run timeouted on riscv64 seems > ac

Re: RFR: 8341658: RISC-V: Test DateFormatProviderTest.java run timeouted

2024-10-08 Thread SendaoYan
On Mon, 7 Oct 2024 15:49:57 GMT, SendaoYan wrote: > Hi all, > The test `java/util/PluggableLocale/DateFormatProviderTest.java` run timeout > on riscv64 physic machine. This test has 4496 sub-tests, and riscv64 has poor > single core performance, so this test run timeouted on riscv64 seems > ac

Re: RFR: 8341566: Adding factory for non-synchronized CharSequence Reader [v4]

2024-10-08 Thread Markus KARG
On Wed, 9 Oct 2024 05:30:58 GMT, Alan Bateman wrote: >> I have updated the source code so that it looks up `cs.length()` live each >> time. Nevertheless, this does not necessarily imply any predictable outcome >> due to the natur of an interface: Custom implementations could concurrently >> re

Re: RFR: 8341566: Adding factory for non-synchronized CharSequence Reader [v6]

2024-10-08 Thread Markus KARG
> This Pull Requests proposes an implementation for > [JDK-8341566](https://bugs.openjdk.org/browse/JDK-8341566): Adding the new > method `public static Reader Reader.of(CharSequence)` will return an > anonymous, non-synchronized implementation of a `Reader` for each kind of > `CharSequence` im

Re: RFR: 8341566: Adding factory for non-synchronized CharSequence Reader [v4]

2024-10-08 Thread Alan Bateman
On Tue, 8 Oct 2024 17:38:14 GMT, Markus KARG wrote: >>> @AlanBateman WDYT? >> >> It's good question as a CharSequence's length can change over time, e.g. >> StringBuilder. This scenario comes up regularly with InputStreams and >> Readers connected to files as the file may be growing and shrink

Re: RFR: 8341755: Optimize argNames in InnerClassLambdaMetafactory [v7]

2024-10-08 Thread Shaojin Wen
On Wed, 9 Oct 2024 04:20:17 GMT, Chen Liang wrote: > Back to precomputed constants :) Manual shift computation! The code is also simplified based on precomputed constants. - PR Comment: https://git.openjdk.org/jdk/pull/21399#issuecomment-2401334988

Re: RFR: 8341755: Optimize argNames in InnerClassLambdaMetafactory [v7]

2024-10-08 Thread Chen Liang
On Wed, 9 Oct 2024 04:09:33 GMT, Shaojin Wen wrote: >> A simple optimization that eliminates the allocation of the >> MethodTypeDescImpl object when parameterCount is equal to 0 and eliminates >> the allocation of argNames when parameterCount is equal to 1 > > Shaojin Wen has updated the pull r

Re: RFR: 8341755: Optimize argNames in InnerClassLambdaMetafactory [v7]

2024-10-08 Thread Shaojin Wen
> A simple optimization that eliminates the allocation of the > MethodTypeDescImpl object when parameterCount is equal to 0 and eliminates > the allocation of argNames when parameterCount is equal to 1 Shaojin Wen has updated the pull request incrementally with one additional commit since the l

Re: RFR: 8341755: Optimize argNames in InnerClassLambdaMetafactory [v6]

2024-10-08 Thread Shaojin Wen
> A simple optimization that eliminates the allocation of the > MethodTypeDescImpl object when parameterCount is equal to 0 and eliminates > the allocation of argNames when parameterCount is equal to 1 Shaojin Wen has updated the pull request incrementally with one additional commit since the l

Re: RFR: 8293336: AOT-linking of invokedynamic for lambda expression and string concat [v2]

2024-10-08 Thread ExE Boss
On Tue, 1 Oct 2024 07:53:23 GMT, Ioi Lam wrote: >> src/hotspot/share/cds/aotConstantPoolResolver.cpp line 476: >> >>> 474: if (bsm_klass->equals("java/lang/invoke/StringConcatFactory") && >>> 475: bsm_name->equals("makeConcatWithConstants")) { >>> 476: return true; >> >> I think all

Re: RFR: 8293336: AOT-linking of invokedynamic for lambda expression and string concat [v2]

2024-10-08 Thread ExE Boss
On Wed, 9 Oct 2024 00:43:25 GMT, Ioi Lam wrote: >> This is the 7th and final PR for [JEP 483: Ahead-of-Time Class Loading & >> Linking](https://bugs.openjdk.org/browse/JDK-8315737). >> >> This PR implements the AOT-linking of invokedynamic callsites: >> - We only link lambda expressions (`Lambd

Re: RFR: 8341755: Optimize argNames in InnerClassLambdaMetafactory [v5]

2024-10-08 Thread Claes Redestad
On Tue, 8 Oct 2024 22:34:38 GMT, Shaojin Wen wrote: >> A simple optimization that eliminates the allocation of the >> MethodTypeDescImpl object when parameterCount is equal to 0 and eliminates >> the allocation of argNames when parameterCount is equal to 1 > > Shaojin Wen has updated the pull r

Re: RFR: 8324672: Update jdk/java/time/tck/java/time/TCKInstant.java now() to be more robust

2024-10-08 Thread Ramkumar Sunderbabu
On Wed, 9 Oct 2024 01:10:54 GMT, Ramkumar Sunderbabu wrote: >> test/jdk/java/time/tck/java/time/TCKInstant.java line 193: >> >>> 191: Instant test = Instant.now(); >>> 192: long diff = Math.abs(test.toEpochMilli() - >>> expected.toEpochMilli()); >>> 193: assertTrue(diff

Re: RFR: 8341134: Deprecate for removal the jrunscript tool [v4]

2024-10-08 Thread Jaikiran Pai
On Tue, 8 Oct 2024 01:36:39 GMT, Jaikiran Pai wrote: >> Can I please get a review for this change which proposes to deprecate for >> removal the `jrunscript` tool? >> >> The `jrunscript` tool as documented in its specification >> https://docs.oracle.com/en/java/javase/23/docs/specs/man/jrunsc

Re: RFR: 8324672: Update jdk/java/time/tck/java/time/TCKInstant.java now() to be more robust

2024-10-08 Thread Ramkumar Sunderbabu
On Tue, 8 Oct 2024 19:50:54 GMT, Roger Riggs wrote: >> The time difference check might fail for scenarios such as batch >> compilation. It is safer to give a bigger allowance of 10 seconds instead of >> 0.1 sec. >> >> Testing: The test was run for 100 times with -Xcomp option. > > test/jdk/jav

Re: RFR: 8293336: AOT-linking of invokedynamic for lambda expression and string concat [v2]

2024-10-08 Thread Ioi Lam
On Tue, 8 Oct 2024 11:01:45 GMT, Andrew Dinn wrote: >> Ioi Lam has updated the pull request incrementally with one additional >> commit since the last revision: >> >> @adinn comments > > src/hotspot/share/cds/archiveBuilder.cpp line 234: > >> 232: _klasses->append(klass); >> 233:

Re: RFR: 8293336: AOT-linking of invokedynamic for lambda expression and string concat [v2]

2024-10-08 Thread Ioi Lam
> This is the 7th and final PR for [JEP 483: Ahead-of-Time Class Loading & > Linking](https://bugs.openjdk.org/browse/JDK-8315737). > > This PR implements the AOT-linking of invokedynamic callsites: > - We only link lambda expressions (`LambdaMetafactory::metafactory`) and > string concat (`Stri

Re: RFR: 8341684: Typo in External Specifications link of java.util.Currency

2024-10-08 Thread Justin Lu
On Tue, 8 Oct 2024 23:48:03 GMT, Chen Liang wrote: > Isn't the right link https://www.iso.org/iso-4217-currency-codes.html while > simply changing the extension (and yes, the link in this PR) leads to a 404 > page? > > Also note that we prefer https links over http if possible. Thanks Chen, y

Re: RFR: 8341684: Typo in External Specifications link of java.util.Currency [v2]

2024-10-08 Thread Chen Liang
On Wed, 9 Oct 2024 00:05:15 GMT, Justin Lu wrote: >> A trivial correction to the _j.util.Currency_ external specification ISO >> currency codes link. Browsers will auto resolve and correct the link, but it >> should still be fixed regardless. > > Justin Lu has updated the pull request incremen

Re: RFR: 8341684: Typo in External Specifications link of java.util.Currency [v2]

2024-10-08 Thread Justin Lu
> A trivial correction to the _j.util.Currency_ external specification ISO > currency codes link. Browsers will auto resolve and correct the link, but it > should still be fixed regardless. Justin Lu has updated the pull request incrementally with one additional commit since the last revision:

Re: RFR: 8341684: Typo in External Specifications link of java.util.Currency

2024-10-08 Thread Chen Liang
On Tue, 8 Oct 2024 23:11:25 GMT, Justin Lu wrote: > A trivial correction to the _j.util.Currency_ external specification ISO > currency codes link. Browsers will auto resolve and correct the link, but it > should still be fixed regardless. Isn't the right link https://www.iso.org/iso-4217-cur

RFR: 8341684: Typo in External Specifications link of java.util.Currency

2024-10-08 Thread Justin Lu
A trivial correction to the _j.util.Currency_ external specification ISO currency codes link. Browsers will auto resolve and correct the link, but it should still be fixed regardless. - Commit messages: - init Changes: https://git.openjdk.org/jdk/pull/21416/files Webrev: https:

Re: RFR: 8341141: Optimize DirectCodeBuilder [v24]

2024-10-08 Thread Chen Liang
On Tue, 8 Oct 2024 22:51:46 GMT, Shaojin Wen wrote: >> Indeed, the opcode here is pointless if we have a pool adaption; in that >> case we should just use `ldc(LoadableConstantEntry)`. > > Here in writeLoadConstant, some branches have curly braces, and some don't. > The style is inconsistent. S

Re: RFR: 8341445: DecimalFormatSymbols setters should throw NPE [v3]

2024-10-08 Thread Justin Lu
On Tue, 8 Oct 2024 23:04:18 GMT, Justin Lu wrote: >> Please review this PR which improves the safety of equality checking for >> DecimalFormatSymbols. As certain setters did not throw NPE, this allowed for >> NPE in the equality method. This PR now updates the setters to throw NPE. >> >> In ad

Re: RFR: 8341445: DecimalFormatSymbols setters should throw NPE [v3]

2024-10-08 Thread Justin Lu
> Please review this PR which improves the safety of equality checking for > DecimalFormatSymbols. As certain setters did not throw NPE, this allowed for > NPE in the equality method. This PR now updates the setters to throw NPE. > > In addition to the NPEs, there is also a behavioral change tha

Re: RFR: 8293336: AOT-linking of invokedynamic for lambda expression and string concat

2024-10-08 Thread Ioi Lam
On Mon, 7 Oct 2024 16:09:30 GMT, Andrew Dinn wrote: >> This is the 7th and final PR for [JEP 483: Ahead-of-Time Class Loading & >> Linking](https://bugs.openjdk.org/browse/JDK-8315737). >> >> This PR implements the AOT-linking of invokedynamic callsites: >> - We only link lambda expressions (`L

Re: RFR: 8341141: Optimize DirectCodeBuilder [v24]

2024-10-08 Thread Shaojin Wen
On Tue, 8 Oct 2024 22:32:24 GMT, Chen Liang wrote: >> src/java.base/share/classes/jdk/internal/classfile/impl/DirectCodeBuilder.java >> line 706: >> >>> 704: public void writeLoadConstant(Opcode opcode, LoadableConstantEntry >>> value) { >>> 705: // Make sure Long and Double have L

Re: RFR: 8341141: Optimize DirectCodeBuilder [v25]

2024-10-08 Thread Claes Redestad
On Tue, 8 Oct 2024 22:25:03 GMT, Shaojin Wen wrote: > Are you talking about merging multiple writeU2 in places like > AbstractAttributeMapper? I am planning to make a new PR to complete these > works, because this PR has too many changes. Good. I would have suggested the same. -

Re: RFR: 8341755: Optimize argNames in InnerClassLambdaMetafactory [v5]

2024-10-08 Thread Chen Liang
On Tue, 8 Oct 2024 22:34:38 GMT, Shaojin Wen wrote: >> A simple optimization that eliminates the allocation of the >> MethodTypeDescImpl object when parameterCount is equal to 0 and eliminates >> the allocation of argNames when parameterCount is equal to 1 > > Shaojin Wen has updated the pull r

Re: RFR: 8341141: Optimize DirectCodeBuilder [v24]

2024-10-08 Thread Chen Liang
On Tue, 8 Oct 2024 09:34:42 GMT, Claes Redestad wrote: >> Shaojin Wen has updated the pull request incrementally with one additional >> commit since the last revision: >> >> suggestion from @liach > > src/java.base/share/classes/jdk/internal/classfile/impl/DirectCodeBuilder.java > line 706:

Re: RFR: 8341141: Optimize DirectCodeBuilder [v26]

2024-10-08 Thread Chen Liang
On Tue, 8 Oct 2024 22:22:37 GMT, Shaojin Wen wrote: >> Some DirectCodeBuilder related optimizations to improve startup and running >> performance: >> 1. Merge calls, merge writeU1 and writeU2 into writeU3 >> 2. Merge calls, merge writeU1 and writeIndex operations >> 3. Directly use writeU1 inste

Re: RFR: 8341755: Optimize argNames in InnerClassLambdaMetafactory [v5]

2024-10-08 Thread Shaojin Wen
> A simple optimization that eliminates the allocation of the > MethodTypeDescImpl object when parameterCount is equal to 0 and eliminates > the allocation of argNames when parameterCount is equal to 1 Shaojin Wen has updated the pull request incrementally with one additional commit since the l

Re: RFR: 8341141: Optimize DirectCodeBuilder [v25]

2024-10-08 Thread Shaojin Wen
On Tue, 8 Oct 2024 22:15:23 GMT, Claes Redestad wrote: > LGTM. > > I spotted places outside of the DirectCodeBuilder paths that could benefit > from using these new coalescing writers, but write-only cases is a good focus > point for now. Are you talking about merging multiple writeU2 in plac

Re: RFR: 8341141: Optimize DirectCodeBuilder [v26]

2024-10-08 Thread Shaojin Wen
> Some DirectCodeBuilder related optimizations to improve startup and running > performance: > 1. Merge calls, merge writeU1 and writeU2 into writeU3 > 2. Merge calls, merge writeU1 and writeIndex operations > 3. Directly use writeU1 instead of writeBytecode > 4. Rewrite the implementation of load

Re: RFR: 8341366: Suspicious check in Locale.getDisplayName(Locale inLocale) [v2]

2024-10-08 Thread Naoto Sato
On Tue, 8 Oct 2024 21:42:38 GMT, Justin Lu wrote: >> Please review this PR which modifies a suspicious check in the fallback of >> `Locale.getDisplayName(Locale inLocale)`. >> >> As a fallback, a hard coded pattern is used. The previous code outputted the >> qualifiers if the `displayNames` ar

Re: RFR: 8341141: Optimize DirectCodeBuilder [v25]

2024-10-08 Thread Claes Redestad
On Tue, 8 Oct 2024 09:57:43 GMT, Shaojin Wen wrote: >> Some DirectCodeBuilder related optimizations to improve startup and running >> performance: >> 1. Merge calls, merge writeU1 and writeU2 into writeU3 >> 2. Merge calls, merge writeU1 and writeIndex operations >> 3. Directly use writeU1 inste

Re: RFR: 8341141: Optimize DirectCodeBuilder [v24]

2024-10-08 Thread Claes Redestad
On Mon, 7 Oct 2024 22:54:24 GMT, Shaojin Wen wrote: >> Some DirectCodeBuilder related optimizations to improve startup and running >> performance: >> 1. Merge calls, merge writeU1 and writeU2 into writeU3 >> 2. Merge calls, merge writeU1 and writeIndex operations >> 3. Directly use writeU1 inste

Re: RFR: 8341755: Optimize argNames in InnerClassLambdaMetafactory [v4]

2024-10-08 Thread Shaojin Wen
> A simple optimization that eliminates the allocation of the > MethodTypeDescImpl object when parameterCount is equal to 0 and eliminates > the allocation of argNames when parameterCount is equal to 1 Shaojin Wen has updated the pull request with a new target base due to a merge or a rebase. T

Re: RFR: 8293336: AOT-linking of invokedynamic for lambda expression and string concat

2024-10-08 Thread Andrey Turbanov
On Mon, 23 Sep 2024 18:45:49 GMT, Ioi Lam wrote: > This is the 7th and final PR for [JEP 483: Ahead-of-Time Class Loading & > Linking](https://bugs.openjdk.org/browse/JDK-8315737). > > This PR implements the AOT-linking of invokedynamic callsites: > - We only link lambda expressions (`LambdaMet

Re: RFR: 8293336: AOT-linking of invokedynamic for lambda expression and string concat

2024-10-08 Thread Ioi Lam
On Wed, 25 Sep 2024 17:14:54 GMT, Chen Liang wrote: >> This is the 7th and final PR for [JEP 483: Ahead-of-Time Class Loading & >> Linking](https://bugs.openjdk.org/browse/JDK-8315737). >> >> This PR implements the AOT-linking of invokedynamic callsites: >> - We only link lambda expressions (`L

Re: RFR: 8293336: AOT-linking of invokedynamic for lambda expression and string concat

2024-10-08 Thread Chen Liang
On Mon, 23 Sep 2024 18:45:49 GMT, Ioi Lam wrote: > This is the 7th and final PR for [JEP 483: Ahead-of-Time Class Loading & > Linking](https://bugs.openjdk.org/browse/JDK-8315737). > > This PR implements the AOT-linking of invokedynamic callsites: > - We only link lambda expressions (`LambdaMet

Re: RFR: 8293336: AOT-linking of invokedynamic for lambda expression and string concat

2024-10-08 Thread Andrew Dinn
On Mon, 23 Sep 2024 18:45:49 GMT, Ioi Lam wrote: > This is the 7th and final PR for [JEP 483: Ahead-of-Time Class Loading & > Linking](https://bugs.openjdk.org/browse/JDK-8315737). > > This PR implements the AOT-linking of invokedynamic callsites: > - We only link lambda expressions (`LambdaMet

Re: RFR: 8293336: AOT-linking of invokedynamic for lambda expression and string concat

2024-10-08 Thread Aleksey Shipilev
On Mon, 23 Sep 2024 18:45:49 GMT, Ioi Lam wrote: > This is the 7th and final PR for [JEP 483: Ahead-of-Time Class Loading & > Linking](https://bugs.openjdk.org/browse/JDK-8315737). > > This PR implements the AOT-linking of invokedynamic callsites: > - We only link lambda expressions (`LambdaMet

Re: RFR: 8293336: AOT-linking of invokedynamic for lambda expression and string concat

2024-10-08 Thread Ioi Lam
On Thu, 26 Sep 2024 17:29:38 GMT, Aleksey Shipilev wrote: >> This is the 7th and final PR for [JEP 483: Ahead-of-Time Class Loading & >> Linking](https://bugs.openjdk.org/browse/JDK-8315737). >> >> This PR implements the AOT-linking of invokedynamic callsites: >> - We only link lambda expressio

RFR: 8293336: AOT-linking of invokedynamic for lambda expression and string concat

2024-10-08 Thread Ioi Lam
This is the 7th and final PR for [JEP 483: Ahead-of-Time Class Loading & Linking](https://bugs.openjdk.org/browse/JDK-8315737). This PR implements the AOT-linking of invokedynamic callsites: - We only link lambda expressions (`LambdaMetafactory::metafactory`) and string concat (`StringConcatFact

Re: RFR: 8341366: Suspicious check in Locale.getDisplayName(Locale inLocale) [v2]

2024-10-08 Thread Justin Lu
> Please review this PR which modifies a suspicious check in the fallback of > `Locale.getDisplayName(Locale inLocale)`. > > As a fallback, a hard coded pattern is used. The previous code outputted the > qualifiers if the `displayNames` array had length greater than 2. Just a few > lines above,

Re: RFR: 8341366: Suspicious check in Locale.getDisplayName(Locale inLocale)

2024-10-08 Thread Naoto Sato
On Tue, 1 Oct 2024 21:46:44 GMT, Justin Lu wrote: > Please review this PR which modifies a suspicious check in the fallback of > `Locale.getDisplayName(Locale inLocale)`. > > As a fallback, a hard coded pattern is used. The previous code outputted the > qualifiers if the `displayNames` array h

Re: RFR: 8341658: RISC-V: Test DateFormatProviderTest.java run timeouted

2024-10-08 Thread Naoto Sato
On Mon, 7 Oct 2024 15:49:57 GMT, SendaoYan wrote: > Hi all, > The test `java/util/PluggableLocale/DateFormatProviderTest.java` run timeout > on riscv64 physic machine. This test has 4496 sub-tests, and riscv64 has poor > single core performance, so this test run timeouted on riscv64 seems > ac

Re: RFR: 8338544: Dedicated Array class descriptor implementation [v3]

2024-10-08 Thread Mandy Chung
On Tue, 8 Oct 2024 21:04:47 GMT, Chen Liang wrote: >> src/java.base/share/classes/jdk/internal/constant/ConstantUtils.java line >> 313: >> >>> 311: throw new IllegalArgumentException("rank " + rank + " is >>> not a positive value"); >>> 312: } >>> 313: } >> >> Suggest

Re: RFR: 8338544: Dedicated Array class descriptor implementation [v3]

2024-10-08 Thread Chen Liang
On Tue, 8 Oct 2024 19:42:14 GMT, Mandy Chung wrote: >> Chen Liang has updated the pull request incrementally with one additional >> commit since the last revision: >> >> mlchung suggestions: elementType, improve utility methods > > src/java.base/share/classes/jdk/internal/constant/ConstantUti

Re: RFR: 8338544: Dedicated Array class descriptor implementation [v3]

2024-10-08 Thread Mandy Chung
On Tue, 8 Oct 2024 20:46:13 GMT, Chen Liang wrote: >> src/java.base/share/classes/java/lang/constant/ClassDesc.java line 281: >> >>> 279: * >>> 280: * @implSpec >>> 281: * The implementations return the simple name >> >> Suggestion: >> >> * The implementation returns the si

Re: RFR: 8341141: Optimize DirectCodeBuilder [v25]

2024-10-08 Thread Chen Liang
On Tue, 8 Oct 2024 09:57:43 GMT, Shaojin Wen wrote: >> Some DirectCodeBuilder related optimizations to improve startup and running >> performance: >> 1. Merge calls, merge writeU1 and writeU2 into writeU3 >> 2. Merge calls, merge writeU1 and writeIndex operations >> 3. Directly use writeU1 inste

Re: RFR: 8341445: DecimalFormatSymbols can throw NPE for equals() [v2]

2024-10-08 Thread Justin Lu
On Tue, 8 Oct 2024 20:31:04 GMT, Naoto Sato wrote: > I am not sure allowing null for those setters just because not to throw > exceptions in equals() is the right solutoin. The distinction is made purely > based on the existing behavior (which I believe is just an overlook in the > first place

Re: RFR: 8338544: Dedicated Array class descriptor implementation [v3]

2024-10-08 Thread Chen Liang
On Tue, 8 Oct 2024 19:47:06 GMT, Mandy Chung wrote: >> Chen Liang has updated the pull request incrementally with one additional >> commit since the last revision: >> >> mlchung suggestions: elementType, improve utility methods > > src/java.base/share/classes/java/lang/constant/ClassDesc.java

Integrated: 8341548: More concise use of classfile API

2024-10-08 Thread Shaojin Wen
On Fri, 4 Oct 2024 12:05:02 GMT, Shaojin Wen wrote: > java.base should provide best practices for Class File API > > 1. Use fluent coding style > 2. Use aconst_null instead of oadConstant(null) > 3. use astore intead of 'storeLocal(REFERENCE' > 4. use aload instead of 'loadLocal(REFERENCE' > 5.

Re: RFR: 8341445: DecimalFormatSymbols can throw NPE for equals() [v2]

2024-10-08 Thread Naoto Sato
On Thu, 3 Oct 2024 21:02:16 GMT, Justin Lu wrote: >> Please review this PR which improves the safety of equality checking for >> DecimalFormatSymbols. >> >> DecimalFormatSymbols via its setters, allows certain instance variables to >> be set as null. (Note that some variables are allowed to be

Re: RFR: 8338544: Dedicated Array class descriptor implementation [v2]

2024-10-08 Thread Jorn Vernee
On Tue, 8 Oct 2024 01:13:37 GMT, Chen Liang wrote: >> @cl4es discovered that Stack Map generation in ClassFile API uses >> `componentType` and `arrayType` for `aaload` `aastore` instructions, which >> are currently quite slow. We can split out array class descriptors from >> class or interface

Re: RFR: 8341755: Optimize argNames in InnerClassLambdaMetafactory [v3]

2024-10-08 Thread Claes Redestad
On Tue, 8 Oct 2024 18:35:46 GMT, Shaojin Wen wrote: >> A simple optimization that eliminates the allocation of the >> MethodTypeDescImpl object when parameterCount is equal to 0 and eliminates >> the allocation of argNames when parameterCount is equal to 1 > > Shaojin Wen has updated the pull r

Re: RFR: 8333796: Add missing serialization functionality to sun.reflect.ReflectionFactory [v6]

2024-10-08 Thread Roger Riggs
On Wed, 25 Sep 2024 12:58:20 GMT, David M. Lloyd wrote: >> Issue [JDK-8164908](https://bugs.openjdk.org/browse/JDK-8164908) added >> support for functionality required to continue to support IIOP and custom >> serializers in light of additional module-based restrictions on reflection. >> It wa

Re: RFR: 8324672: Update jdk/java/time/tck/java/time/TCKInstant.java now() to be more robust

2024-10-08 Thread Roger Riggs
On Tue, 8 Oct 2024 17:10:43 GMT, Ramkumar Sunderbabu wrote: > The time difference check might fail for scenarios such as batch compilation. > It is safer to give a bigger allowance of 10 seconds instead of 0.1 sec. > > Testing: The test was run for 100 times with -Xcomp option. test/jdk/java/

Re: RFR: 8338544: Dedicated Array class descriptor implementation [v3]

2024-10-08 Thread Mandy Chung
On Tue, 8 Oct 2024 19:32:34 GMT, Chen Liang wrote: >> @cl4es discovered that Stack Map generation in ClassFile API uses >> `componentType` and `arrayType` for `aaload` `aastore` instructions, which >> are currently quite slow. We can split out array class descriptors from >> class or interface

Re: RFR: 8340488: Clarify LocaleServiceProvider deployment on application module path

2024-10-08 Thread Naoto Sato
On Tue, 1 Oct 2024 17:28:53 GMT, Justin Lu wrote: > Please review this PR and [CSR](https://bugs.openjdk.org/browse/JDK-8341285) > which clarifies that a Locale sensitive service provider can be deployed as a > module. > > This mainly follows the same format as the work done for > [JDK-834040

Re: RFR: 8338544: Dedicated Array class descriptor implementation [v3]

2024-10-08 Thread Mandy Chung
On Tue, 8 Oct 2024 19:32:34 GMT, Chen Liang wrote: >> @cl4es discovered that Stack Map generation in ClassFile API uses >> `componentType` and `arrayType` for `aaload` `aastore` instructions, which >> are currently quite slow. We can split out array class descriptors from >> class or interface

Re: RFR: 8341548: More concise use of classfile API [v3]

2024-10-08 Thread Chen Liang
On Mon, 7 Oct 2024 01:25:31 GMT, Shaojin Wen wrote: >> java.base should provide best practices for Class File API >> >> 1. Use fluent coding style >> 2. Use aconst_null instead of oadConstant(null) >> 3. use astore intead of 'storeLocal(REFERENCE' >> 4. use aload instead of 'loadLocal(REFERENCE'

Re: RFR: 8341755: Optimize argNames in InnerClassLambdaMetafactory [v3]

2024-10-08 Thread Chen Liang
On Tue, 8 Oct 2024 18:35:46 GMT, Shaojin Wen wrote: >> A simple optimization that eliminates the allocation of the >> MethodTypeDescImpl object when parameterCount is equal to 0 and eliminates >> the allocation of argNames when parameterCount is equal to 1 > > Shaojin Wen has updated the pull r

Re: RFR: 8338544: Dedicated Array class descriptor implementation [v2]

2024-10-08 Thread Chen Liang
On Tue, 8 Oct 2024 19:16:00 GMT, Chen Liang wrote: >> src/java.base/share/classes/jdk/internal/constant/ArrayClassDescImpl.java >> line 81: >> >>> 79: throw new IllegalStateException( >>> 80: "Cannot create an array type descriptor with more than " >>> 81:

Re: RFR: 8338544: Dedicated Array class descriptor implementation [v2]

2024-10-08 Thread Chen Liang
On Tue, 8 Oct 2024 01:13:37 GMT, Chen Liang wrote: >> @cl4es discovered that Stack Map generation in ClassFile API uses >> `componentType` and `arrayType` for `aaload` `aastore` instructions, which >> are currently quite slow. We can split out array class descriptors from >> class or interface

Re: RFR: 8338544: Dedicated Array class descriptor implementation [v3]

2024-10-08 Thread Chen Liang
> @cl4es discovered that Stack Map generation in ClassFile API uses > `componentType` and `arrayType` for `aaload` `aastore` instructions, which > are currently quite slow. We can split out array class descriptors from class > or interfaces to support faster `arrayType` and `componentType` opera

Re: RFR: 8338021: Support new unsigned and saturating vector operators in VectorAPI [v23]

2024-10-08 Thread Jatin Bhateja
> Hi All, > > As per the discussion on panama-dev mailing list[1], patch adds the support > for following new vector operators. > > > . SUADD : Saturating unsigned addition. > . SADD: Saturating signed addition. > . SUSUB : Saturating unsigned subtraction. > . SSUB

Re: RFR: 8338544: Dedicated Array class descriptor implementation [v2]

2024-10-08 Thread Chen Liang
On Tue, 8 Oct 2024 18:16:34 GMT, Mandy Chung wrote: >> Chen Liang has updated the pull request with a new target base due to a >> merge or a rebase. The pull request now contains nine commits: >> >> - class or interface descriptor renamed for clarity >> - Merge branch 'master' of https://gith

Re: RFR: 8328821: Map.of() derived view collection mutators should throw UnsupportedOperationException [v7]

2024-10-08 Thread Liam Miller-Cushon
On Tue, 9 Jul 2024 23:17:47 GMT, Liam Miller-Cushon wrote: >> This change overrides mutator methods in the implementation returned by >> `Map.of().entrySet()` to throw `UnsupportedOperationException`. > > Liam Miller-Cushon has updated the pull request incrementally with one > additional commit

Re: RFR: 8341134: Deprecate for removal the jrunscript tool [v4]

2024-10-08 Thread Mandy Chung
On Tue, 8 Oct 2024 01:36:39 GMT, Jaikiran Pai wrote: >> Can I please get a review for this change which proposes to deprecate for >> removal the `jrunscript` tool? >> >> The `jrunscript` tool as documented in its specification >> https://docs.oracle.com/en/java/javase/23/docs/specs/man/jrunsc

Re: RFR: 8341755: Optimize argNames in InnerClassLambdaMetafactory [v2]

2024-10-08 Thread Claes Redestad
On Tue, 8 Oct 2024 18:03:14 GMT, Chen Liang wrote: >> src/java.base/share/classes/java/lang/invoke/InnerClassLambdaMetafactory.java >> line 193: >> >>> 191: String argName = i < ARG_NAME_CACHE_SIZE ? ARG_NAME_CACHE[i] : >>> null; >>> 192: if (argName == null) { >>> 193:

Re: RFR: 8341755: Optimize argNames in InnerClassLambdaMetafactory [v3]

2024-10-08 Thread Shaojin Wen
> A simple optimization that eliminates the allocation of the > MethodTypeDescImpl object when parameterCount is equal to 0 and eliminates > the allocation of argNames when parameterCount is equal to 1 Shaojin Wen has updated the pull request incrementally with one additional commit since the l

Re: RFR: 8341134: Deprecate for removal the jrunscript tool [v4]

2024-10-08 Thread Mandy Chung
On Tue, 8 Oct 2024 01:36:39 GMT, Jaikiran Pai wrote: >> Can I please get a review for this change which proposes to deprecate for >> removal the `jrunscript` tool? >> >> The `jrunscript` tool as documented in its specification >> https://docs.oracle.com/en/java/javase/23/docs/specs/man/jrunsc

Re: RFR: 8338544: Dedicated Array class descriptor implementation [v2]

2024-10-08 Thread Mandy Chung
On Tue, 8 Oct 2024 01:13:37 GMT, Chen Liang wrote: >> @cl4es discovered that Stack Map generation in ClassFile API uses >> `componentType` and `arrayType` for `aaload` `aastore` instructions, which >> are currently quite slow. We can split out array class descriptors from >> class or interface

Re: RFR: 8341566: Adding factory for non-synchronized CharSequence Reader [v4]

2024-10-08 Thread Markus KARG
On Tue, 8 Oct 2024 13:23:23 GMT, Alan Bateman wrote: >> For `chars()` or `codePoints()`, I believe calling `length()` or not was a >> matter of implementation convenience instead of the assumption that >> `length()` can change during calls. Note implementation methods in the >> anonymous class

Re: RFR: 8341566: Adding factory for non-synchronized CharSequence Reader [v4]

2024-10-08 Thread Markus KARG
On Tue, 8 Oct 2024 12:38:10 GMT, Chen Liang wrote: >> IIUC I shall just remove the `` but keep the text `After the reader...`? > > Yep. Better keep everything about closing in the same paragraph. Done. - PR Review Comment: https://git.openjdk.org/jdk/pull/21371#discussion_r17922598

Re: RFR: 8341755: Optimize argNames in InnerClassLambdaMetafactory [v2]

2024-10-08 Thread Chen Liang
On Tue, 8 Oct 2024 17:35:32 GMT, Claes Redestad wrote: >> Shaojin Wen has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Lazy initialization of ARG_NAME_CACHE > > src/java.base/share/classes/java/lang/invoke/InnerClassLambdaMetafactory.java

Re: RFR: 8341566: Adding factory for non-synchronized CharSequence Reader [v5]

2024-10-08 Thread Markus KARG
> This Pull Requests proposes an implementation for > [JDK-8341566](https://bugs.openjdk.org/browse/JDK-8341566): Adding the new > method `public static Reader Reader.of(CharSequence)` will return an > anonymous, non-synchronized implementation of a `Reader` for each kind of > `CharSequence` im

Withdrawn: 8341484: TimeZone.toZoneId() throws exception when using old mapping for "HST"

2024-10-08 Thread Justin Lu
On Thu, 3 Oct 2024 19:46:48 GMT, Justin Lu wrote: > Please review this PR which fixes an unexpected exception for > `TimeZone.toZoneId("HST")` when the old mapping system property is used. > > The culprit is in `TimeZone.toZoneId0()`. > > This method provides workarounds for "EST", "MST", and

Re: RFR: 8341484: TimeZone.toZoneId() throws exception when using old mapping for "HST"

2024-10-08 Thread Justin Lu
On Tue, 8 Oct 2024 17:46:16 GMT, Naoto Sato wrote: > This is indeed surprising that this has not been revealed by now. I guess > nobody used this old mapping before... Anyway, I am now trying to get rid of > this old mapping behavior altogether > (https://bugs.openjdk.org/browse/JDK-8340477),

Re: RFR: 8341755: Optimize argNames in InnerClassLambdaMetafactory [v2]

2024-10-08 Thread Claes Redestad
On Tue, 8 Oct 2024 15:52:35 GMT, Shaojin Wen wrote: >> A simple optimization that eliminates the allocation of the >> MethodTypeDescImpl object when parameterCount is equal to 0 and eliminates >> the allocation of argNames when parameterCount is equal to 1 > > Shaojin Wen has updated the pull r

Re: RFR: 8341484: TimeZone.toZoneId() throws exception when using old mapping for "HST"

2024-10-08 Thread Naoto Sato
On Thu, 3 Oct 2024 19:46:48 GMT, Justin Lu wrote: > Please review this PR which fixes an unexpected exception for > `TimeZone.toZoneId("HST")` when the old mapping system property is used. > > The culprit is in `TimeZone.toZoneId0()`. > > This method provides workarounds for "EST", "MST", and

Re: RFR: 8339637: (tz) Update Timezone Data to 2024b [v2]

2024-10-08 Thread Naoto Sato
On Tue, 1 Oct 2024 18:40:56 GMT, Justin Lu wrote: >> Johny Jose has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Review changes > > test/jdk/sun/util/calendar/zi/TestZoneInfo310.java line 290: > >> 288: >> 289: if (l1.equals(l2)

RFR: 8324672: Update jdk/java/time/tck/java/time/TCKInstant.java now() to be more robust

2024-10-08 Thread Ramkumar Sunderbabu
The time difference check might fail for scenarios such as batch compilation. It is safer to give a bigger allowance of 10 seconds instead of 0.1 sec. Testing: The test was run for 100 times with -Xcomp option. - Commit messages: - initial commit Changes: https://git.openjdk.org/j

Re: RFR: 8338023: Support two vector selectFrom API [v16]

2024-10-08 Thread Paul Sandoz
On Thu, 3 Oct 2024 19:05:14 GMT, Jatin Bhateja wrote: >> Hi All, >> >> As per the discussion on panama-dev mailing list[1], patch adds the support >> for following new two vector permutation APIs. >> >> >> Declaration:- >> Vector.selectFrom(Vector v1, Vector v2) >> >> >> Semantics:- >>

Re: RFR: 8338021: Support new unsigned and saturating vector operators in VectorAPI [v22]

2024-10-08 Thread Paul Sandoz
On Fri, 4 Oct 2024 00:01:59 GMT, Jatin Bhateja wrote: >> Hi All, >> >> As per the discussion on panama-dev mailing list[1], patch adds the support >> for following new vector operators. >> >> >> . SUADD : Saturating unsigned addition. >> . SADD: Saturating signed addition. >>

Re: RFR: 8341722: Fix some warnings as errors when building on Linux with toolchain clang

2024-10-08 Thread Chris Plummer
On Tue, 8 Oct 2024 13:38:54 GMT, Matthias Baesken wrote: > There are a few warnings as errors occurring when building on Linux with > clang (clang15). Mostly these are some kind of 'unused' warnings. > Might be related to https://bugs.openjdk.org/browse/JDK-8339156 . src/jdk.hotspot.agent/linux

Re: RFR: 8339637: (tz) Update Timezone Data to 2024b [v2]

2024-10-08 Thread Justin Lu
On Tue, 1 Oct 2024 18:16:56 GMT, Justin Lu wrote: >> Johny Jose has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Review changes > > src/java.base/share/classes/java/time/ZoneId.java line 191: > >> 189: * This map contains a mapping

Re: RFR: 8341755: Optimize argNames in InnerClassLambdaMetafactory [v2]

2024-10-08 Thread Chen Liang
On Tue, 8 Oct 2024 15:52:35 GMT, Shaojin Wen wrote: >> A simple optimization that eliminates the allocation of the >> MethodTypeDescImpl object when parameterCount is equal to 0 and eliminates >> the allocation of argNames when parameterCount is equal to 1 > > Shaojin Wen has updated the pull r

Re: RFR: 8341755: Optimize argNames in InnerClassLambdaMetafactory [v2]

2024-10-08 Thread Shaojin Wen
> A simple optimization that eliminates the allocation of the > MethodTypeDescImpl object when parameterCount is equal to 0 and eliminates > the allocation of argNames when parameterCount is equal to 1 Shaojin Wen has updated the pull request incrementally with one additional commit since the l

  1   2   >