On Fri, 18 Jul 2025 23:18:16 GMT, John R Rose wrote:
> If (as in this case) IC2 loops over calls to IC1
Correction; I meant IC1 calls IC2, in a loop, N times. We don't want a
pre-loop in M1 that checks each of N distinct arguments to IC2 (like N calls to
M2 would), but rather a bat
On Thu, 17 Jul 2025 15:33:37 GMT, Raffaello Giulietti
wrote:
> What is the thinking when an `@IntrinsicCandidate` method invokes another
> `@IntrinsicCandidate` method? Which part is responsible for the checks?
This is a good question. Suppose IC1 calls IC2 and both are intrinsic
candidates,
On Thu, 17 Jul 2025 18:28:04 GMT, Chen Liang wrote:
>> On 32 bit platforms, when an access to long/double is aligned, it is
>> supported but not atomic. The original wording in
>> `MethodHandles::byteBufferViewVarHandle` sounds as if it is not supported at
>> all. We can fix that by borrowing
On Thu, 17 Jul 2025 18:00:31 GMT, Chen Liang wrote:
>> src/java.base/share/classes/java/lang/foreign/MemoryLayout.java line 281:
>>
>>> 279: * read write access modes for all {@code T}. On 32-bit platforms,
>>> access modes
>>> 280: * {@code get} and {@code set} for {@code long}, {@code d
On Wed, 16 Jul 2025 04:53:04 GMT, Joe Darcy wrote:
> Add `@Stable` to the static final arrays used in the Java port of FDLIBM.
The effect of this PR is to make the affected array elements eligible for
constant-folding by the JIT.
The contract of `@Stable` is private to the JDK, since it is a t
On Thu, 26 Jun 2025 10:48:37 GMT, Volkan Yazici wrote:
> Validate input in `java.lang.StringCoding` intrinsic Java wrappers, improve
> their documentation, enhance the checks in the associated C++ methods, and
> adapt them to cause VM crash on invalid input.
>
> ## Implementation notes
>
> Th
On Mon, 23 Jun 2025 22:48:52 GMT, Chen Liang wrote:
> sun.invoke.empty.Empty and java.lang.invoke.InvokeDynamic are useless
> remnants - Empty can be replaced by java.lang.Void, and InvokeDynamic was
> previously used as a stub for javac to compile signature polymorphic methods.
> They should
On Sat, 21 Jun 2025 00:03:26 GMT, Chen Liang wrote:
> Currently, the list of classes that have interdependencies and those
> that need runtimeSetup are maintained in a hardcoded list in CDS. This makes
> it risky for core library developers as they might introduce new
> interdependencies and
On Thu, 15 May 2025 16:03:44 GMT, Andrew Haley wrote:
>> This intrinsic is generally faster than the current implementation for
>> Panama segment operations for all writes larger than about 8 bytes in size,
>> increasing to more than 2* the performance on larger memory blocks on
>> Graviton 2,
On Thu, 22 May 2025 11:52:34 GMT, Per Minborg wrote:
>> This PR builds on a concept John Rose told me about some time ago. Instead
>> of combining memory operations of various sizes, a single large and skewed
>> memory operation can be made to clean up the tail of remaining bytes.
>>
>> This h
On Thu, 22 May 2025 11:52:34 GMT, Per Minborg wrote:
>> This PR builds on a concept John Rose told me about some time ago. Instead
>> of combining memory operations of various sizes, a single large and skewed
>> memory operation can be made to clean up the tail of remaining bytes.
>>
>> This h
On Wed, 30 Apr 2025 22:26:30 GMT, Chen Liang wrote:
>> In offline discussion, we noted that the documentation on this annotation
>> does not recommend minimizing the intrinsified section and moving whatever
>> can be done in Java to Java; thus I prepared this documentation update, to
>> shrink
On Wed, 30 Apr 2025 22:26:30 GMT, Chen Liang wrote:
>> In offline discussion, we noted that the documentation on this annotation
>> does not recommend minimizing the intrinsified section and moving whatever
>> can be done in Java to Java; thus I prepared this documentation update, to
>> shrink
On Wed, 7 May 2025 11:17:19 GMT, Volkan Yazici wrote:
>> src/java.base/share/classes/jdk/internal/access/JavaLangAccess.java line 302:
>>
>>> 300: * WARNING: This method does not perform any bound checks.
>>> 301: */
>>> 302: int countPositives(byte[] ba, int off, int len);
>>
>>
On Tue, 29 Apr 2025 19:03:08 GMT, Chen Liang wrote:
>> The recent patch #23866 makes calling `ClassValue::remove()` from
>> `ClassValue::computeValue()` end up in infinite loops while fixing the stale
>> value risk from the method.
>>
>> The proposed fix is to preserve the stale value risk fix
On Sun, 27 Apr 2025 04:50:37 GMT, Chen Liang wrote:
>> The recent patch #23866 makes calling `ClassValue::remove()` from
>> `ClassValue::computeValue()` end up in infinite loops while fixing the stale
>> value risk from the method.
>>
>> The proposed fix is to preserve the stale value risk fix
On Sun, 27 Apr 2025 04:50:37 GMT, Chen Liang wrote:
>> The recent patch #23866 makes calling `ClassValue::remove()` from
>> `ClassValue::computeValue()` end up in infinite loops while fixing the stale
>> value risk from the method.
>>
>> The proposed fix is to preserve the stale value risk fix
On Fri, 21 Mar 2025 19:44:48 GMT, Chen Liang wrote:
>> The recent patch #23866 makes calling `ClassValue::remove()` from
>> `ClassValue::computeValue()` end up in infinite loops while fixing the stale
>> value risk from the method.
>>
>> The proposed fix is to preserve the stale value risk fix
On Fri, 25 Apr 2025 14:49:37 GMT, Aleksey Shipilev wrote:
> CDS cannot handle large number of classes, because `ClassLoader` data
> structures get too large for CDS archival. The new test captures such an
> occasion. We do `clear()`-s, but that is not enough to trim the backing
> storages for
On Tue, 22 Apr 2025 20:58:21 GMT, Chen Liang wrote:
>> In offline discussion, we noted that the documentation on this annotation
>> does not recommend minimizing the intrinsified section and moving whatever
>> can be done in Java to Java; thus I prepared this documentation update, to
>> shrink
On Tue, 22 Apr 2025 20:58:21 GMT, Chen Liang wrote:
>> In offline discussion, we noted that the documentation on this annotation
>> does not recommend minimizing the intrinsified section and moving whatever
>> can be done in Java to Java; thus I prepared this documentation update, to
>> shrink
On Tue, 22 Apr 2025 21:01:13 GMT, Chen Liang wrote:
>> In the new design, the above "footnotes" go at the bottom. They explain why
>> the rules prescribed at the top are important. In effect, inform aggressive
>> implementors how far they may bend those rules. Sometimes the rules do get
>>
On Tue, 22 Apr 2025 18:38:42 GMT, John R Rose wrote:
>> src/java.base/share/classes/jdk/internal/vm/annotation/IntrinsicCandidate.java
>> line 58:
>>
>>> 56: * The HotSpot VM checks, when loading a class, the consistency of
>>> recognized
>>>
On Tue, 22 Apr 2025 18:23:52 GMT, John R Rose wrote:
>> Chen Liang has updated the pull request incrementally with one additional
>> commit since the last revision:
>>
>> Refine validation and defensive copying
>
> src/java.base/share/clas
On Mon, 21 Apr 2025 20:12:19 GMT, Chen Liang wrote:
>> In offline discussion, we noted that the documentation on this annotation
>> does not recommend minimizing the intrinsified section and moving whatever
>> can be done in Java to Java; thus I prepared this documentation update, to
>> shrink
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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.
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
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`
>>
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`
>>
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`
>>
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
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
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:
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
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
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
69 matches
Mail list logo