Re: RFR: 8351565: Implement JEP 502: Stable Values (Preview) [v6]

2025-03-18 Thread John R Rose
On Thu, 13 Mar 2025 15:22:43 GMT, Per Minborg wrote: >> Implement JEP 502. >> >> The PR passes tier1-tier3 tests. > > Per Minborg has updated the pull request with a new target base due to a > merge or a rebase. The pull request now contains 246 commits: > > - Merge branch 'master' into imple

Re: RFR: 8351565: Implement JEP 502: Stable Values (Preview) [v6]

2025-03-15 Thread John R Rose
On Thu, 13 Mar 2025 15:22:43 GMT, Per Minborg wrote: >> Implement JEP 502. >> >> The PR passes tier1-tier3 tests. > > Per Minborg has updated the pull request with a new target base due to a > merge or a rebase. The pull request now contains 246 commits: > > - Merge branch 'master' into imple

Re: RFR: 8351565: Implement JEP 502: Stable Values (Preview) [v6]

2025-03-15 Thread John R Rose
On Thu, 13 Mar 2025 15:22:43 GMT, Per Minborg wrote: >> Implement JEP 502. >> >> The PR passes tier1-tier3 tests. > > Per Minborg has updated the pull request with a new target base due to a > merge or a rebase. The pull request now contains 246 commits: > > - Merge branch 'master' into imple

Re: RFR: 8351565: Implement JEP 502: Stable Values (Preview) [v6]

2025-03-15 Thread John R Rose
On Thu, 13 Mar 2025 15:22:43 GMT, Per Minborg wrote: >> Implement JEP 502. >> >> The PR passes tier1-tier3 tests. > > Per Minborg has updated the pull request with a new target base due to a > merge or a rebase. The pull request now contains 246 commits: > > - Merge branch 'master' into imple

Re: RFR: 8351565: Implement JEP 502: Stable Values (Preview) [v6]

2025-03-15 Thread John R Rose
On Thu, 13 Mar 2025 15:22:43 GMT, Per Minborg wrote: >> Implement JEP 502. >> >> The PR passes tier1-tier3 tests. > > Per Minborg has updated the pull request with a new target base due to a > merge or a rebase. The pull request now contains 246 commits: > > - Merge branch 'master' into imple

Re: RFR: 8350607: Consolidate MethodHandles::zero into MethodHandles::constant [v2]

2025-03-04 Thread John R Rose
On Mon, 24 Feb 2025 23:45:37 GMT, Chen Liang wrote: >> LF editor spins classes, this avoids the spinning overhead and should speed >> up non-capturing lambdas too. >> >> There may need to be additional intrinsic work for MH combinator lf bytecode >> generation. > > Chen Liang has updated the p

Re: RFR: 8351045: ClassValue::remove cannot ensure computation observes up-to-date state

2025-03-04 Thread John R Rose
On Mon, 3 Mar 2025 15:24:05 GMT, Chen Liang wrote: > After a call to `ClassValue.remove`, a `ClassValue` can still install a value > that is computed with information that is not up-to-date with the remove > call. This is demonstrated in the test case, where an innocuous > `ClassValue.get` cal

Re: RFR: 8350607: Consolidate MethodHandles::zero into MethodHandles::constant

2025-02-24 Thread John R Rose
On Thu, 20 Feb 2025 02:33:59 GMT, Chen Liang wrote: > LF editor spins classes, this avoids the spinning overhead and should speed > up non-capturing lambdas too. > > There may need to be additional intrinsic work for MH combinator lf bytecode > generation. You are on the right track. Some of

Re: RFR: 8347606: Optimize Java implementation of ML-DSA

2025-02-21 Thread John R Rose
On Sun, 16 Feb 2025 15:41:52 GMT, Chen Liang wrote: >> src/java.base/share/classes/sun/security/provider/ML_DSA.java line 1237: >> >>> 1235: return res; >>> 1236: } >>> 1237: >> >> Centralizing the allocation into a helper on its own Looks unseful (for >> resource Management, debu

Re: RFR: 8349088: De-virtualize Codeblob and nmethod [v8]

2025-02-13 Thread John R Rose
On Thu, 13 Feb 2025 17:14:59 GMT, Vladimir Kozlov wrote: >> Remove virtual methods from CodeBlob and nmethod to simplify >> saving/restoring in Leyden AOT cache. It avoids the need to patch hidden >> VPTR pointer to class's virtual table. >> >> Added C++ static asserts to make sure no virtual

Re: RFR: 8349088: De-virtualize Codeblob and nmethod [v6]

2025-02-12 Thread John R Rose
On Wed, 12 Feb 2025 16:28:32 GMT, Vladimir Kozlov wrote: >> Remove virtual methods from CodeBlob and nmethod to simplify >> saving/restoring in Leyden AOT cache. It avoids the need to patch hidden >> VPTR pointer to class's virtual table. >> >> Added C++ static asserts to make sure no virtual

Re: RFR: 8342103: C2 compiler support for Float16 type and associated operations

2024-11-19 Thread John R Rose
On Mon, 14 Oct 2024 11:40:01 GMT, Jatin Bhateja wrote: > Hi All, > > This patch adds C2 compiler support for various Float16 operations added by > [PR#22128](https://github.com/openjdk/jdk/pull/22128) > > Following is the summary of changes included with this patch:- > > 1. Detection of vario

Re: RFR: 8341916: Remove ProtectionDomain related hotspot code and tests [v6]

2024-11-15 Thread John R Rose
On Fri, 15 Nov 2024 23:43:33 GMT, Coleen Phillimore wrote: >> Remove Hotspot code that passes protection_domain around class loading so >> that checkPackageAccess can be called and the result stored. With the >> removal of the Security Manager in JEP 486, this code no longer does >> anything.

Re: RFR: 8341916: Remove ProtectionDomain related hotspot code and tests [v6]

2024-11-15 Thread John R Rose
On Fri, 15 Nov 2024 23:43:33 GMT, Coleen Phillimore wrote: >> Remove Hotspot code that passes protection_domain around class loading so >> that checkPackageAccess can be called and the result stored. With the >> removal of the Security Manager in JEP 486, this code no longer does >> anything.

Re: RFR: 8341916: Remove ProtectionDomain related hotspot code and tests [v6]

2024-11-15 Thread John R Rose
On Sat, 16 Nov 2024 02:48:09 GMT, John R Rose wrote: >> Coleen Phillimore has updated the pull request with a new target base due to >> a merge or a rebase. The pull request now contains nine commits: >> >> - Handle merge conflicts in new resolve_instance_class c

Re: RFR: 8341916: Remove ProtectionDomain related hotspot code and tests [v6]

2024-11-15 Thread John R Rose
On Sat, 16 Nov 2024 02:48:09 GMT, John R Rose wrote: >> Coleen Phillimore has updated the pull request with a new target base due to >> a merge or a rebase. The pull request now contains nine commits: >> >> - Handle merge conflicts in new resolve_instance_class c

Re: RFR: 8341916: Remove ProtectionDomain related hotspot code and tests [v6]

2024-11-15 Thread John R Rose
On Fri, 15 Nov 2024 23:43:33 GMT, Coleen Phillimore wrote: >> Remove Hotspot code that passes protection_domain around class loading so >> that checkPackageAccess can be called and the result stored. With the >> removal of the Security Manager in JEP 486, this code no longer does >> anything.

Re: RFR: 8341916: Remove ProtectionDomain related hotspot code and tests [v6]

2024-11-15 Thread John R Rose
On Fri, 15 Nov 2024 23:43:33 GMT, Coleen Phillimore wrote: >> Remove Hotspot code that passes protection_domain around class loading so >> that checkPackageAccess can be called and the result stored. With the >> removal of the Security Manager in JEP 486, this code no longer does >> anything.

Re: RFR: 8331497: Implement JEP 483: Ahead-of-Time Class Loading & Linking [v14]

2024-11-15 Thread John R Rose
On Fri, 15 Nov 2024 16:38:20 GMT, Ioi Lam wrote: >> This is an implementation of [JEP 483: Ahead-of-Time Class Loading & >> Linking](https://openjdk.org/jeps/483). >> >> >> Note: this is a combined PR of the following individual PRs >> - https://github.com/openjdk/jdk/pull/20516 >> - https

Re: RFR: 8331497: Implement JEP 483: Ahead-of-Time Class Loading & Linking [v14]

2024-11-15 Thread John R Rose
On Fri, 15 Nov 2024 16:38:20 GMT, Ioi Lam wrote: >> This is an implementation of [JEP 483: Ahead-of-Time Class Loading & >> Linking](https://openjdk.org/jeps/483). >> >> >> Note: this is a combined PR of the following individual PRs >> - https://github.com/openjdk/jdk/pull/20516 >> - https

Re: RFR: 8331497: Implement JEP 483: Ahead-of-Time Class Loading & Linking [v12]

2024-11-14 Thread John R Rose
On Fri, 15 Nov 2024 05:48:27 GMT, Ioi Lam wrote: >> This is an implementation of [JEP 483: Ahead-of-Time Class Loading & >> Linking](https://openjdk.org/jeps/483). >> >> >> Note: this is a combined PR of the following individual PRs >> - https://github.com/openjdk/jdk/pull/20516 >> - https

Re: RFR: 8331497: Implement JEP 483: Ahead-of-Time Class Loading & Linking [v12]

2024-11-14 Thread John R Rose
On Fri, 15 Nov 2024 05:48:27 GMT, Ioi Lam wrote: >> This is an implementation of [JEP 483: Ahead-of-Time Class Loading & >> Linking](https://openjdk.org/jeps/483). >> >> >> Note: this is a combined PR of the following individual PRs >> - https://github.com/openjdk/jdk/pull/20516 >> - https

Re: RFR: 8342283: CDS cannot handle a large number of classes

2024-10-30 Thread John R Rose
On Thu, 31 Oct 2024 03:52:16 GMT, Ioi Lam wrote: > When lots of classes are loaded during `java -Xshare:dump`, the internal > arrays used by some of the HashMaps and ArrayLists become too large to be > archived by CDS (> 256KB). > > At the very end of Java bytecode execution during `java -Xsha

Re: Integrated: JDK-8289775: Update java.lang.invoke.MethodHandle[s] to use snippets

2024-10-28 Thread John R Rose
On Tue, 5 Jul 2022 22:22:46 GMT, Joe Darcy wrote: > Update existing examples in java.lang.invoke.{MethodHandle, MethodHandles} > to use snippets rather than the older markup idiom. The code examples in these files were exdented to make it easier to extract example code and test it, and to mai

Re: RFR: 8331497: Implement JEP 483: Ahead-of-Time Class Loading & Linking [v4]

2024-10-24 Thread John R Rose
On Thu, 24 Oct 2024 03:01:54 GMT, Ioi Lam wrote: >> This is an implementation of [JEP 483: Ahead-of-Time Class Loading & >> Linking](https://openjdk.org/jeps/483). >> >> >> Note: this is a combined PR of the following individual PRs >> - https://github.com/openjdk/jdk/pull/20516 >> - https

Re: RFR: 8331497: Implement JEP 483: Ahead-of-Time Class Loading & Linking [v4]

2024-10-24 Thread John R Rose
On Thu, 24 Oct 2024 03:01:54 GMT, Ioi Lam wrote: >> This is an implementation of [JEP 483: Ahead-of-Time Class Loading & >> Linking](https://openjdk.org/jeps/483). >> >> >> Note: this is a combined PR of the following individual PRs >> - https://github.com/openjdk/jdk/pull/20516 >> - https

Re: RFR: 8331497: Implement JEP 483: Ahead-of-Time Class Loading & Linking [v4]

2024-10-24 Thread John R Rose
On Thu, 24 Oct 2024 03:01:54 GMT, Ioi Lam wrote: >> This is an implementation of [JEP 483: Ahead-of-Time Class Loading & >> Linking](https://openjdk.org/jeps/483). >> >> >> Note: this is a combined PR of the following individual PRs >> - https://github.com/openjdk/jdk/pull/20516 >> - https

Re: RFR: 8331497: Implement JEP 483: Ahead-of-Time Class Loading & Linking [v4]

2024-10-23 Thread John R Rose
On Thu, 24 Oct 2024 03:01:54 GMT, Ioi Lam wrote: >> This is an implementation of [JEP 483: Ahead-of-Time Class Loading & >> Linking](https://openjdk.org/jeps/483). >> >> >> Note: this is a combined PR of the following individual PRs >> - https://github.com/openjdk/jdk/pull/20516 >> - https

Re: RFR: 8331497: Implement JEP 483: Ahead-of-Time Class Loading & Linking [v4]

2024-10-23 Thread John R Rose
On Thu, 24 Oct 2024 03:01:54 GMT, Ioi Lam wrote: >> This is an implementation of [JEP 483: Ahead-of-Time Class Loading & >> Linking](https://openjdk.org/jeps/483). >> >> >> Note: this is a combined PR of the following individual PRs >> - https://github.com/openjdk/jdk/pull/20516 >> - https

Re: RFR: 8331497: Implement JEP 483: Ahead-of-Time Class Loading & Linking [v4]

2024-10-23 Thread John R Rose
On Thu, 24 Oct 2024 03:01:54 GMT, Ioi Lam wrote: >> This is an implementation of [JEP 483: Ahead-of-Time Class Loading & >> Linking](https://openjdk.org/jeps/483). >> >> >> Note: this is a combined PR of the following individual PRs >> - https://github.com/openjdk/jdk/pull/20516 >> - https

Re: RFR: 8341260: Add Float16 to jdk.incubator.vector

2024-10-19 Thread John R Rose
On Thu, 17 Oct 2024 23:11:07 GMT, Joe Darcy wrote: > Port of Float16 from java.lang in the lworld+fp16 branch to > jdk.incubabor.vector. Comparing with https://github.com/openjdk/jdk/pull/21490 we can see that there are more than minimum number of intrinsics I recommended above, but (crucially

Re: RFR: 8341260: Add Float16 to jdk.incubator.vector

2024-10-19 Thread John R Rose
On Thu, 17 Oct 2024 23:11:07 GMT, Joe Darcy wrote: > Port of Float16 from java.lang in the lworld+fp16 branch to > jdk.incubabor.vector. Somebody might ask as a followup, "But what about calling sequences? Without intrinsics, how does the JIT know to store Float16 values in the correct type

Re: RFR: 8341260: Add Float16 to jdk.incubator.vector

2024-10-19 Thread John R Rose
On Thu, 17 Oct 2024 23:11:07 GMT, Joe Darcy wrote: > Port of Float16 from java.lang in the lworld+fp16 branch to > jdk.incubabor.vector. Joe, our revised and now-current thinking about JIT support for the Float16 (both as a pre-Valhalla VBC and Valhalla value class) is that there should be ze

Re: RFR: 8327624: Remove VM implementation that bypass verification for core reflection [v2]

2024-10-17 Thread John R Rose
On Thu, 17 Oct 2024 22:44:05 GMT, Mandy Chung wrote: >> The old core reflection implementation generates dynamic classes that are >> special cases in the VM to bypass bytecode verification to workaround >> various issues [1] [2] [3]. >> >> The old core reflection implementation was [removed in

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

2024-10-17 Thread John R Rose
On Thu, 17 Oct 2024 04:19:27 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 (`Lamb

Re: RFR: 8319343: Improve CDS module graph support for --add-modules option

2024-10-16 Thread John R Rose
On Wed, 16 Oct 2024 22:46:40 GMT, Calvin Cheung wrote: > Summary of changes: > > Before dumping info the archive, all the module names from `--add-modules` > will be sorted and then concatenated into one string with comma as the > separator between module names. > > During runtime, same funct

Re: RFR: 8311071: Avoid SoftReferences in LambdaFormEditor and MethodTypeForm when storing heap objects into AOT cache [v7]

2024-10-10 Thread John R Rose
On Wed, 2 Oct 2024 01:06:20 GMT, Ioi Lam wrote: >> This is the 6th PR for [JEP 483: Ahead-of-Time Class Loading & >> Linking](https://bugs.openjdk.org/browse/JDK-8315737). >> >> The implementation of java.lang.invoke uses SoftReferences so that unused >> MethodHandles, LambdaForms, etc, can be

Re: RFR: 8311071: Avoid SoftReferences in LambdaFormEditor and MethodTypeForm when storing heap objects into AOT cache [v7]

2024-10-09 Thread John R Rose
On Wed, 2 Oct 2024 01:06:20 GMT, Ioi Lam wrote: >> This is the 6th PR for [JEP 483: Ahead-of-Time Class Loading & >> Linking](https://bugs.openjdk.org/browse/JDK-8315737). >> >> The implementation of java.lang.invoke uses SoftReferences so that unused >> MethodHandles, LambdaForms, etc, can be

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

2024-10-09 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-09 Thread John R Rose
On Wed, 9 Oct 2024 16:07:19 GMT, Andrew Haley wrote: > simply(?) by allocating everything contiguously Suddenly I seem to hear Boromir and Yoda, in unison, saying, "One does not simply." - PR Comment: https://git.openjdk.org/jdk/pull/19157#issuecomment-2402756530

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: 8340838: Clean up MutableCallSite to use explicit release fence instead of AtomicInteger

2024-09-24 Thread John R Rose
On Tue, 24 Sep 2024 20:21:48 GMT, Chen Liang wrote: > This implementation code was written in JDK 7, before storeFence was > available in JDK 8. We should update this legacy code to make it clear. Good, thank you. Nice to see that silly variable go away. - Marked as reviewed by j

Re: RFR: 8339112: Move JVM Klass flags out of AccessFlags

2024-08-29 Thread John R Rose
On Mon, 26 Aug 2024 23:54:22 GMT, Coleen Phillimore wrote: > Move JVM implementation access flags that are not specified by the classfile > format into Klass so we can shrink AccessFlags to u2 in a future change. > > Tested with tier1-7. > > NOTE: there are arm, ppc and s390 changes to this th

Re: RFR: 8324241: Always record evol_method deps to avoid excessive method flushing [v2]

2024-01-22 Thread John R Rose
On Mon, 22 Jan 2024 23:26:08 GMT, Evgeny Astigeevich wrote: >> Volker Simonis has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Guard the feature with a diagnostic option and update the comments in the >> code > > src/hotspot/share/runti

Re: RFR: 8314502: Change the comparator taking version of GrowableArray::find to be a template method [v7]

2023-10-30 Thread John R Rose
On Sun, 29 Oct 2023 07:51:48 GMT, Kim Barrett wrote: >> @dholmes-ora Yes it helps avoid copying, especially if the copy constructor >> is non-trivial. And I think it is more idiomatic in C++ to use references >> here. > > Using a reference here leads to unnecessary overhead when `E` is small an

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

2023-07-12 Thread John R Rose
On Fri, 7 Jul 2023 00:39:20 GMT, Pavel Rappo wrote: >> Thanks @rose00 for the writeup and @pavelrappo for asking pertinent followup >> questions. >> >> For me the issue here is that there is a bunch of lore about avoiding >> `Objects::equals` and it's embodied in comments like this: >> >>> NB

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

2023-07-12 Thread John R Rose
On Fri, 7 Jul 2023 00:39:20 GMT, Pavel Rappo wrote: >> Thanks @rose00 for the writeup and @pavelrappo for asking pertinent followup >> questions. >> >> For me the issue here is that there is a bunch of lore about avoiding >> `Objects::equals` and it's embodied in comments like this: >> >>> NB

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

2023-07-04 Thread John R Rose
On Tue, 4 Jul 2023 01:01:22 GMT, Pavel Rappo 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-s

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

2023-07-04 Thread John R Rose
On Tue, 4 Jul 2023 01:01:22 GMT, Pavel Rappo 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-s

Re: RFR: 8289220: Locale.forLanguageTag throws NPE due to soft ref used in locale cache being cleared [v3]

2023-06-06 Thread John R Rose
On Tue, 6 Jun 2023 18:45:50 GMT, Erik Österlund wrote: >> For hotspot, when GC occurs, it causes all threads to run to the nearest >> safepoint and then freeze. Generally, safepoints are generated at branch >> jumps, method ends(ret instructions), loops instructions, and so on. >> Therefore, t

Re: RFR: 8289220: Locale.forLanguageTag throws NPE due to soft ref used in locale cache being cleared [v3]

2023-06-06 Thread John R Rose
On Tue, 6 Jun 2023 18:45:50 GMT, Erik Österlund wrote: >> For hotspot, when GC occurs, it causes all threads to run to the nearest >> safepoint and then freeze. Generally, safepoints are generated at branch >> jumps, method ends(ret instructions), loops instructions, and so on. >> Therefore, t

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

2023-05-02 Thread John R Rose
On Mon, 1 May 2023 22:23:11 GMT, Chen Liang wrote: > It had an invocation performance of 2ns/op as opposed to Proxy's 6ns/op, but > the condy implementation has 0.41ns/op. Good, so let’s take the win relative to 6ns/op metric. The condy implementation devotes a whole class to a single MH, so i

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

2023-05-01 Thread John R Rose
On Mon, 1 May 2023 21:37:07 GMT, Johannes Kuhn wrote: > `assertOriginalLookupOf` Yes, that’s the sort of thing I’d expect. It could go into a `jdk.internal.reflect` class. Now that we have modules, JDK platform code can use public APIs not accessible to normal users. Also, the static helper

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

2023-05-01 Thread John R Rose
On Mon, 1 May 2023 14:56:27 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: 8306474: Move InstanceKlass read-only flags

2023-04-19 Thread John R Rose
On Wed, 19 Apr 2023 23:27:10 GMT, John R Rose wrote: >> Moved three read-only InstanceKlass flags out of AccessFlags to >> InstanceKlassFlags, and removed unused and unneeded SA code. >> Tested with tier1-4. > > src/hotspot/share/oops/instanceKlassFlags.hpp lin

Re: RFR: 8306474: Move InstanceKlass read-only flags

2023-04-19 Thread John R Rose
On Wed, 19 Apr 2023 22:46:55 GMT, Coleen Phillimore wrote: > Moved three read-only InstanceKlass flags out of AccessFlags to > InstanceKlassFlags, and removed unused and unneeded SA code. > Tested with tier1-4. Reviewed. I like to see access flags being slowly emptied out. It was a not-so-go

Re: RFR: 8306075: Micro-optimize Enum.hashCode [v6]

2023-04-17 Thread John R Rose
On Mon, 17 Apr 2023 16:42:38 GMT, olivergillespie wrote: >> Improve the speed of Enum.hashCode by caching the identity hashcode on first >> use. I've seen an application where Enum.hashCode is a hot path, and this is >> fairly simple speedup. The memory overhead is low; in enums with no extra

Re: RFR: 8301958: Avoid Arrays.copyOfRange overhead in java.lang.String [v5]

2023-02-07 Thread John R Rose
On Tue, 7 Feb 2023 15:25:05 GMT, Claes Redestad wrote: >> This adds a local, specialized `copyBytes` method to `String` that avoids >> certain redundant range checks and clamping that JIT has issues removing >> fully. >> >> This has a small but statistically significant effect on `String` >>

Re: RFR: 8301958: Avoid Arrays.copyOfRange overhead in java.lang.String [v5]

2023-02-07 Thread John R Rose
On Tue, 7 Feb 2023 15:25:05 GMT, Claes Redestad wrote: >> This adds a local, specialized `copyBytes` method to `String` that avoids >> certain redundant range checks and clamping that JIT has issues removing >> fully. >> >> This has a small but statistically significant effect on `String` >>

Re: RFR: 8301958: Avoid Arrays.copyOfRange overhead in java.lang.String [v5]

2023-02-07 Thread John R Rose
On Tue, 7 Feb 2023 15:25:05 GMT, Claes Redestad wrote: >> This adds a local, specialized `copyBytes` method to `String` that avoids >> certain redundant range checks and clamping that JIT has issues removing >> fully. >> >> This has a small but statistically significant effect on `String` >>

Re: RFR: 8300487: Store cardinality as a field in BitSet [v5]

2023-01-19 Thread John R Rose
On Wed, 18 Jan 2023 12:43:31 GMT, fabioromano1 wrote: >> The enanchment is useful for applications that make heavy use of BitSet >> objects as sets of integers, and therefore they need to make a lot of calls >> to cardinality() method, which actually require linear time in the number of >> wor

Re: RFR: 8291555: Replace stack-locking with fast-locking [v8]

2022-11-14 Thread John R Rose
On Fri, 28 Oct 2022 09:32:58 GMT, Roman Kennke wrote: >> This change replaces the current stack-locking implementation with a >> fast-locking scheme that retains the advantages of stack-locking (namely >> fast locking in uncontended code-paths), while avoiding the overload of the >> mark word.

Re: RFR: 8291555: Replace stack-locking with fast-locking

2022-11-14 Thread John R Rose
On Fri, 28 Oct 2022 01:47:23 GMT, David Holmes wrote: > So the data structure for lock records (per thread) could consist of a series > of distinct values [ A B C ] and each of the values could be repeated, but > only adjacently: [ A A A B C C ] for example. > @rose00 why only adjacently? Neste

Re: RFR: 8291555: Replace stack-locking with fast-locking [v7]

2022-10-27 Thread John R Rose
On Mon, 24 Oct 2022 11:01:01 GMT, Robbin Ehn wrote: > Secondly, a question/suggestion: Many recursive cases do not interleave > locks, meaning the recursive enter will happen with the lock/oop top of lock > stack already. Why not peak at top lock/oop in lock-stack if the is current > just push

Re: RFR: 8295159: DSO created with -ffast-math breaks Java floating-point arithmetic [v7]

2022-10-25 Thread John R Rose
On Tue, 25 Oct 2022 23:13:08 GMT, Vladimir Ivanov wrote: > …very modest impact while still being able to catch important types of MXCSR > corruption. I fully support having it turned on by default for JNI calls. I guess I agree. With the clever test for the bad mode Java cares about, the over

Re: RFR: 8295229: Try to verify gtest version [v2]

2022-10-12 Thread John R Rose
On Thu, 13 Oct 2022 02:56:01 GMT, Dingli Zhang wrote: >> Magnus Ihse Bursie 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 two >> additional co

Re: RFR: JDK-8294539: Augment discussion of equivlance relations on floating-point values

2022-09-29 Thread John R Rose
On Thu, 29 Sep 2022 22:14:24 GMT, Joe Darcy wrote: > While the floating-point == operation is *not* an equivalence relation, there > are useful equivalence relations that can be defined over floating-point > values. Text is added to java.lang.Double to discuss and name those relations. src/jav

Integrated: 8292758: put support for UNSIGNED5 format into its own header file

2022-09-08 Thread John R Rose
On Mon, 29 Aug 2022 18:20:42 GMT, John R Rose wrote: > Refactor code from inside of CompressedStream into its own unit. > > This code is likely to be used in future refactorings, such as JDK-8292818 > (replace 96-bit representation for field metadata with variable-sized > str

Re: RFR: 8292758: put support for UNSIGNED5 format into its own header file [v2]

2022-09-08 Thread John R Rose
On Sat, 3 Sep 2022 07:48:50 GMT, Dean Long wrote: >> John R Rose 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 two addi

Re: RFR: 8292758: put support for UNSIGNED5 format into its own header file [v5]

2022-09-06 Thread John R Rose
> Refactor code from inside of CompressedStream into its own unit. > > This code is likely to be used in future refactorings, such as JDK-8292818 > (replace 96-bit representation for field metadata with variable-sized > streams). > > Add gtests. John R Rose has upd

Re: RFR: 8292758: put support for UNSIGNED5 format into its own header file [v4]

2022-09-06 Thread John R Rose
> Refactor code from inside of CompressedStream into its own unit. > > This code is likely to be used in future refactorings, such as JDK-8292818 > (replace 96-bit representation for field metadata with variable-sized > streams). > > Add gtests. John R Rose has upd

Re: RFR: 8292758: put support for UNSIGNED5 format into its own header file [v3]

2022-09-03 Thread John R Rose
> Refactor code from inside of CompressedStream into its own unit. > > This code is likely to be used in future refactorings, such as JDK-8292818 > (replace 96-bit representation for field metadata with variable-sized > streams). > > Add gtests. John R Rose has upd

Re: RFR: 8292758: put support for UNSIGNED5 format into its own header file [v2]

2022-09-02 Thread John R Rose
On Fri, 2 Sep 2022 23:28:38 GMT, Dean Long wrote: > I suggest splitting this up into the straight-forward refactor (without the > excluded bytes change), then adding excluded bytes as a follow-up. Yes, that is a slight change. Splitting is not necessary for the reason you mention because this

Re: RFR: 8292758: put support for UNSIGNED5 format into its own header file [v2]

2022-09-01 Thread John R Rose
On Fri, 2 Sep 2022 00:04:17 GMT, John R Rose wrote: >> Refactor code from inside of CompressedStream into its own unit. >> >> This code is likely to be used in future refactorings, such as JDK-8292818 >> (replace 96-bit representation for field metadata with va

Re: RFR: 8292758: put support for UNSIGNED5 format into its own header file [v2]

2022-09-01 Thread John R Rose
> Refactor code from inside of CompressedStream into its own unit. > > This code is likely to be used in future refactorings, such as JDK-8292818 > (replace 96-bit representation for field metadata with variable-sized > streams). > > Add gtests. John R Rose has updated th

Re: RFR: 8292758: put support for UNSIGNED5 format into its own header file

2022-09-01 Thread John R Rose
On Mon, 29 Aug 2022 18:20:42 GMT, John R Rose wrote: > Refactor code from inside of CompressedStream into its own unit. > > This code is likely to be used in future refactorings, such as JDK-8292818 > (replace 96-bit representation for field metadata with variable-sized > str

RFR: 8292758: put support for UNSIGNED5 format into its own header file

2022-09-01 Thread John R Rose
Refactor code from inside of CompressedStream into its own unit. This code is likely to be used in future refactorings, such as JDK-8292818 (replace 96-bit representation for field metadata with variable-sized streams). Add gtests. - Commit messages: - 8292758: put support for UNS

Re: RFR: JDK-8289551: Conversions between bit representations of half precision values and floats [v6]

2022-07-22 Thread John R Rose
On Fri, 22 Jul 2022 01:29:57 GMT, Joe Darcy wrote: >> Initial implementation. > > Joe Darcy has updated the pull request incrementally with one additional > commit since the last revision: > > Implement review feedback. Looks good. - Marked as reviewed by jrose (Reviewer). PR:

Re: RFR: JDK-8277095 : Empty streams create too many objects [v2]

2022-07-20 Thread John R Rose
On Tue, 16 Nov 2021 20:53:26 GMT, kabutz wrote: >> This is a draft proposal for how we could improve stream performance for the >> case where the streams are empty. Empty collections are common-place. If we >> iterate over them with an Iterator, we would have to create one small >> Iterator ob

Re: RFR: JDK-8289551: Conversions between bit representations of half precision values and floats

2022-07-12 Thread John R Rose
On Fri, 8 Jul 2022 06:11:22 GMT, Joe Darcy wrote: > Initial implementation. src/java.base/share/classes/java/lang/Float.java line 1003: > 1001: float abs_f = Math.abs(f); > 1002: int doppel = Float.floatToRawIntBits(f); > 1003: int f_sign = 0x8000_ & doppel; The cod

Re: RFR: JDK-8289775: Update java.lang.invoke.MethodHandle[s] to use snippets

2022-07-07 Thread John R Rose
On Tue, 5 Jul 2022 22:22:46 GMT, Joe Darcy wrote: > Update existing examples in java.lang.invoke.{MethodHandle, MethodHandles} > to use snippets rather than the older markup idiom. The code examples in these files were exdented to make it easier to extract example code and test it, and to mai

Re: RFR: 8282664: Unroll by hand StringUTF16, StringLatin1, and Arrays polynomial hash loops [v12]

2022-05-11 Thread John R Rose
On Tue, 10 May 2022 14:46:56 GMT, Ludovic Henry wrote: >> Despite the hash value being cached for Strings, computing the hash still >> represents a significant CPU usage for applications handling lots of text. >> >> Even though it would be generally better to do it through an enhancement to >>

Re: RFR: 8244681: Add a warning for possibly lossy conversion in compound assignments [v2]

2022-05-10 Thread John R Rose
On Tue, 10 May 2022 09:07:44 GMT, Adam Sotona wrote: >> Please review this patch adding new lint option, **lossy-conversions**, to >> javac to warn about type casts in compound assignments with possible lossy >> conversions. >> >> The new lint warning is shown if the type of the right-hand ope

Re: RFR: 8244681: Add a warning for possibly lossy conversion in compound assignments [v2]

2022-05-10 Thread John R Rose
On Tue, 10 May 2022 09:07:44 GMT, Adam Sotona wrote: >> Please review this patch adding new lint option, **lossy-conversions**, to >> javac to warn about type casts in compound assignments with possible lossy >> conversions. >> >> The new lint warning is shown if the type of the right-hand ope

Re: RFR: 8244681: Add a warning for possibly lossy conversion in compound assignments [v2]

2022-05-10 Thread John R Rose
On Tue, 10 May 2022 09:07:44 GMT, Adam Sotona wrote: >> Please review this patch adding new lint option, **lossy-conversions**, to >> javac to warn about type casts in compound assignments with possible lossy >> conversions. >> >> The new lint warning is shown if the type of the right-hand ope

Re: RFR: 8244681: Add a warning for possibly lossy conversion in compound assignments [v2]

2022-05-10 Thread John R Rose
On Tue, 10 May 2022 09:07:44 GMT, Adam Sotona wrote: >> Please review this patch adding new lint option, **lossy-conversions**, to >> javac to warn about type casts in compound assignments with possible lossy >> conversions. >> >> The new lint warning is shown if the type of the right-hand ope

Re: RFR: 8284050: [vectorapi] Optimize masked store for non-predicated architectures [v2]

2022-05-04 Thread John R Rose
On Thu, 5 May 2022 02:09:39 GMT, Xiaohong Gong wrote: >> Currently the vectorization of masked vector store is implemented by the >> masked store instruction only on architectures that support the predicate >> feature. The compiler will fall back to the java scalar code for >> non-predicate su

Re: RFR: 8285633: Take better advantage of generic MethodType cache [v2]

2022-04-27 Thread John R Rose
On Tue, 26 Apr 2022 20:47:39 GMT, Claes Redestad wrote: >> The `MethodType.genericMethodType` methods provide convenience methods for >> certain common method types and also provide `@Stable` cache that allows for >> constant folding. This patch enhances the more generic `methodType` methods >

Re: RFR: 8283892: Compress and expand bits

2022-04-06 Thread John R Rose
On Tue, 5 Apr 2022 22:05:19 GMT, Paul Sandoz wrote: > Add support to compress bits and expand bits of `int` and `long` values, see > Hacker's Delight (2nd edition), section 7.4. > > Compressing or expanding bits of an `int` or `long` value can be composed to > enable general permutations, and

Re: RFR: JDK-8282798 java.lang.runtime.Carrier

2022-03-08 Thread John R Rose
On Tue, 8 Mar 2022 15:59:59 GMT, Maurizio Cimadamore wrote: >> We propose to provide a runtime anonymous carrier class object generator; >> java.lang.runtime.Carrier. This generator class is designed to share >> anonymous classes when shapes are similar. For example, if several clients >> req

Re: RFR: 8282143: Objects.requireNonNull should be ForceInline

2022-02-28 Thread John R Rose
On Sat, 19 Feb 2022 05:51:52 GMT, Quan Anh Mai wrote: > Hi, > > `Objects.requireNonNull` may fail to be inlined. The call is expensive and > may lead to objects escaping to the heap while the null check is cheap and is > often elided. I have observed this when using the vector API when a call

Re: RFR: JDK-8281003 - MethodHandles::lookup throws NPE if caller is null

2022-02-14 Thread John R Rose
On Mon, 14 Feb 2022 18:10:37 GMT, Alan Bateman wrote: >> `MethodHandles::publicLookup` can be called instead to get a public Lookup >> to invoke a method with a Lookup parameter. The dilemma here is whether >> the API should be made null-caller friendly or using a proper API >> `MethodHandle

Re: RFR: JDK-8281003 - MethodHandles::lookup throws NPE if caller is null

2022-02-14 Thread John R Rose
On Mon, 14 Feb 2022 18:10:37 GMT, Alan Bateman wrote: >> `MethodHandles::publicLookup` can be called instead to get a public Lookup >> to invoke a method with a Lookup parameter. The dilemma here is whether >> the API should be made null-caller friendly or using a proper API >> `MethodHandle

Re: RFR: JDK-8281003 - MethodHandles::lookup throws NPE if caller is null

2022-02-14 Thread John R Rose
On Fri, 11 Feb 2022 20:32:46 GMT, Tim Prinzing wrote: > JDK-8281003 - MethodHandles::lookup throws NPE if caller is null Marked as reviewed by jrose (Reviewer). - PR: https://git.openjdk.java.net/jdk/pull/7447

Re: RFR: JDK-8281003 - MethodHandles::lookup throws NPE if caller is null

2022-02-14 Thread John R Rose
On Fri, 11 Feb 2022 20:32:46 GMT, Tim Prinzing wrote: > JDK-8281003 - MethodHandles::lookup throws NPE if caller is null Marked as reviewed by jrose (Reviewer). - PR: https://git.openjdk.java.net/jdk/pull/7447

Re: RFR: 8281294: [vectorapi] FIRST_NONZERO reduction operation throws IllegalArgumentExcept on zero vectors

2022-02-09 Thread John R Rose
On Wed, 9 Feb 2022 21:36:01 GMT, Paul Sandoz wrote: > …ArgumentExcept on zero vectors > > This PR fixes issues for reduction using FIRST_NONZERO and adds tests. The > testing infrastructure is generalized to reduction functions and tests for > min/max reductions are updated to use that. Marke

Re: RFR: 8281294: [vectorapi] FIRST_NONZERO reduction operation throws IllegalArgumentExcept on zero vectors

2022-02-09 Thread John R Rose
On Wed, 9 Feb 2022 21:36:01 GMT, Paul Sandoz wrote: > …ArgumentExcept on zero vectors > > This PR fixes issues for reduction using FIRST_NONZERO and adds tests. The > testing infrastructure is generalized to reduction functions and tests for > min/max reductions are updated to use that. Wow g

Re: RFR: 8273616: Fix trivial doc typos in the java.base module [v3]

2021-09-13 Thread John R Rose
On Mon, 13 Sep 2021 11:22:27 GMT, Pavel Rappo wrote: >> 8273616: Fix trivial doc typos in the java.base module > > Pavel Rappo has updated the pull request incrementally with one additional > commit since the last revision: > > Use "ensure" instead of "insure" Marked as reviewed by jrose (Re

Re: RFR: 8273616: Fix trivial doc typos in the java.base module [v3]

2021-09-13 Thread John R Rose
On Mon, 13 Sep 2021 11:22:27 GMT, Pavel Rappo wrote: >> 8273616: Fix trivial doc typos in the java.base module > > Pavel Rappo has updated the pull request incrementally with one additional > commit since the last revision: > > Use "ensure" instead of "insure" Marked as reviewed by jrose (Re

Re: RFR: 8273616: Fix trivial doc typos in the java.base module [v3]

2021-09-13 Thread John R Rose
On Mon, 13 Sep 2021 11:22:27 GMT, Pavel Rappo wrote: >> 8273616: Fix trivial doc typos in the java.base module > > Pavel Rappo has updated the pull request incrementally with one additional > commit since the last revision: > > Use "ensure" instead of "insure" Marked as reviewed by jrose (Re

  1   2   3   4   5   6   7   >