Re: RFR: 8361842: Move input validation checks to Java for String-related intrinsics [v8]

2025-07-17 Thread Yudi Zheng
On Thu, 17 Jul 2025 07:20:34 GMT, Volkan Yazici wrote: >> Validate input in `java.lang.StringCoding` intrinsic Java wrappers, improve >> their documentation, enhance the checks in the associated IR or assembly >> code, and adapt them to cause VM crash on invalid input. >> >> ## Implementation

Re: RFR: 8354556: Expand value-based class warnings to java.lang.ref API [v4]

2025-05-05 Thread Yudi Zheng
On Fri, 2 May 2025 19:44:31 GMT, Vicente Romero wrote: >> This PR is defining a new internal annotation, >> `@jdk.internal.RequiresIdentity`, with target types PARAMETER and >> TYPE_PARAMETER. The @RequiresIdentity annotation expresses the expectation >> that an argument to a given method or c

Re: RFR: 8349860: Make Class.isArray(), Class.isInterface() and Class.isPrimitive() non-native [v5]

2025-02-21 Thread Yudi Zheng
On Thu, 20 Feb 2025 20:19:15 GMT, Coleen Phillimore wrote: >> Class.isInterface() can check modifier flags, Class.isArray() can check >> whether component mirror is non-null and Class.isPrimitive() needs a new >> final transient boolean in java.lang.Class that the JVM code initializes. >> Teste

Re: RFR: 8349145: Make Class.getProtectionDomain() non-native [v7]

2025-02-12 Thread Yudi Zheng
On Mon, 10 Feb 2025 13:23:49 GMT, Coleen Phillimore wrote: >> This change removes the native call and injected field for ProtectionDomain >> in the java.lang.Class instance, and moves the field to be declared in Java. >> Tested with tier1-4. > > Coleen Phillimore has updated the pull request wit

Re: RFR: 8346567: Make Class.getModifiers() non-native [v7]

2025-02-10 Thread Yudi Zheng
On Fri, 7 Feb 2025 12:34:40 GMT, Coleen Phillimore wrote: >> The Class.getModifiers() method is implemented as a native method in >> java.lang.Class to access a field that we've calculated when creating the >> mirror. The field is final after that point. The VM doesn't need it >> anymore, so

Re: RFR: 8344223: Remove calls to SecurityManager and doPrivileged in java.net.URLClassLoader after JEP 486 integration [v4]

2024-11-20 Thread Yudi Zheng
On Wed, 20 Nov 2024 06:52:11 GMT, Jaikiran Pai wrote: >> Can I please get a review of this change which proposes to remove >> SecurityManager related API usages from `URLClassLoader` and its related >> `URLClassPath`? This addresses https://bugs.openjdk.org/browse/JDK-8344223. >> >> The `URLCl

Re: RFR: 8343982: Remove usage of security manager from ClassLoader and related classes [v2]

2024-11-14 Thread Yudi Zheng
On Thu, 14 Nov 2024 11:25:08 GMT, Alan Bateman wrote: >> Remove the code for the now defunct SecurityManager execution mode from >> ClassLoader and the built-in class loader implementations. The override of >> getPermissions is removed from the application class loader, and from the >> class l

Re: RFR: 8344011: Remove usage of security manager from Class and reflective APIs [v2]

2024-11-13 Thread Yudi Zheng
On Wed, 13 Nov 2024 19:05:21 GMT, Alan Bateman wrote: >> Remove code required for the now defunct SecurityManager execution mode from >> java.lang.Class, friends, and reflection APIs. Careful review is required so >> I've set Reviewer to 2. I've tried to keep the changes as easy to review as >

Re: RFR: 8343981: Remove usage of security manager from Thread and related classes [v4]

2024-11-13 Thread Yudi Zheng
On Tue, 12 Nov 2024 18:47:46 GMT, Alan Bateman wrote: >> Removes the SecurityManager usage from Thread + friends. >> >> In Thread, the getContextClassLoader method is no longer caller-sensitive >> method. >> >> JavaLangAccess.newThreadWithAcc is removed and jdk.internal.access is no >> longer

Re: RFR: 8343981: Remove usage of security manager from Thread and related classes [v4]

2024-11-13 Thread Yudi Zheng
On Tue, 12 Nov 2024 18:47:46 GMT, Alan Bateman wrote: >> Removes the SecurityManager usage from Thread + friends. >> >> In Thread, the getContextClassLoader method is no longer caller-sensitive >> method. >> >> JavaLangAccess.newThreadWithAcc is removed and jdk.internal.access is no >> longer

Re: RFR: 8338383: Implement JEP 491: Synchronize Virtual Threads without Pinning

2024-11-06 Thread Yudi Zheng
On Thu, 17 Oct 2024 14:28:30 GMT, Patricio Chilano Mateo wrote: > This is the implementation of JEP 491: Synchronize Virtual Threads without > Pinning. See [JEP 491](https://bugs.openjdk.org/browse/JDK-8337395) for > further details. > > In order to make the code review easier the changes hav

Re: RFR: 8338383: Implement JEP 491: Synchronize Virtual Threads without Pinning [v12]

2024-10-28 Thread Yudi Zheng
On Fri, 25 Oct 2024 21:33:24 GMT, Patricio Chilano Mateo wrote: >> This is the implementation of JEP 491: Synchronize Virtual Threads without >> Pinning. See [JEP 491](https://bugs.openjdk.org/browse/JDK-8337395) for >> further details. >> >> In order to make the code review easier the change

Re: RFR: 8338694: x86_64 intrinsic for tanh using libm [v13]

2024-10-16 Thread Yudi Zheng
On Mon, 23 Sep 2024 19:24:51 GMT, Srinivas Vamsi Parasa wrote: >> The goal of this PR is to implement an x86_64 intrinsic for >> java.lang.Math.tanh() using libm >> >> Benchmark (ops/ms) | Stock JDK | Tanh intrinsic | Speedup >> -- | -- | -- | -- >> MathBench.tanhDouble | 70900 | 95618 | 1.35x

Re: RFR: 8329597: C2: Intrinsify Reference.clear [v9]

2024-10-15 Thread Yudi Zheng
On Wed, 9 Oct 2024 08:44:34 GMT, Aleksey Shipilev wrote: >> [JDK-8240696](https://bugs.openjdk.org/browse/JDK-8240696) added the native >> method for `Reference.clear`. The original patch skipped intrinsification of >> this method, because we thought `Reference.clear` is not on a performance >

Re: RFR: 8338694: x86_64 intrinsic for tanh using libm

2024-08-28 Thread Yudi Zheng
On Wed, 21 Aug 2024 00:25:03 GMT, Srinivas Vamsi Parasa wrote: > The goal of this PR is to implement an x86_64 intrinsic for > java.lang.Math.tanh() using libm > > Benchmark (ops/ms) | Stock JDK | Tanh intrinsic | Speedup > -- | -- | -- | -- > MathBench.tanhDouble | 70900 | 95618 | 1.35x src/

Re: RFR: 8338745: Intrinsify Continuation.pin() and Continuation.unpin() [v2]

2024-08-22 Thread Yudi Zheng
On Thu, 22 Aug 2024 11:13:17 GMT, Markus Grönlund wrote: >> Greetings, >> >> Please help review this change set that implements C2 intrinsics for >> jdk.internal.vm.Continuation.pin() and jdk.internal.vm.Continuation.unpin(). >> >> This work is a consequence of >> [JDK-8338417](https://bugs.o

Re: RFR: 8315884: New Object to ObjectMonitor mapping [v20]

2024-08-15 Thread Yudi Zheng
On Thu, 15 Aug 2024 06:12:22 GMT, Axel Boldt-Christmas wrote: >> When inflating a monitor the `ObjectMonitor*` is written directly over the >> `markWord` and any overwritten data is displaced into a displaced >> `markWord`. This is problematic for concurrent GCs which needs extra care or >> l

Re: RFR: 8315884: New Object to ObjectMonitor mapping [v5]

2024-07-11 Thread Yudi Zheng
On Wed, 10 Jul 2024 20:10:07 GMT, Axel Boldt-Christmas wrote: >> When inflating a monitor the `ObjectMonitor*` is written directly over the >> `markWord` and any overwritten data is displaced into a displaced >> `markWord`. This is problematic for concurrent GCs which needs extra care or >> l

Re: RFR: 8335553: [Graal] Compiler thread calls into jdk.internal.vm.VMSupport.decodeAndThrowThrowable and crashes in OOM situation [v2]

2024-07-09 Thread Yudi Zheng
On Tue, 9 Jul 2024 14:42:42 GMT, Doug Simon wrote: >> test/jdk/jdk/internal/vm/TestTranslatedException.java line 167: >> >>> 165: private static void assertThrowableEquals(Throwable originalIn, >>> Throwable decodedIn) { >>> 166: Throwable original = originalIn; >>> 167: Thr

Re: RFR: 8335553: [Graal] Compiler thread calls into jdk.internal.vm.VMSupport.decodeAndThrowThrowable and crashes in OOM situation [v2]

2024-07-09 Thread Yudi Zheng
On Tue, 9 Jul 2024 13:46:46 GMT, Doug Simon wrote: >> This PR addresses intermittent failures in jtreg GC stress tests. The >> failures occur under these conditions: >> 1. Using a libgraal build with assertions enabled as the top tier JIT >> compiler. Such a libgraal build will cause a VM exit

Re: RFR: 8335553: [Graal] Compiler thread calls into jdk.internal.vm.VMSupport.decodeAndThrowThrowable and crashes in OOM situation [v2]

2024-07-09 Thread Yudi Zheng
On Tue, 9 Jul 2024 13:46:46 GMT, Doug Simon wrote: >> This PR addresses intermittent failures in jtreg GC stress tests. The >> failures occur under these conditions: >> 1. Using a libgraal build with assertions enabled as the top tier JIT >> compiler. Such a libgraal build will cause a VM exit

Re: RFR: 8315884: New Object to ObjectMonitor mapping [v2]

2024-07-08 Thread Yudi Zheng
On Mon, 8 Jul 2024 12:13:07 GMT, Axel Boldt-Christmas wrote: >> When inflating a monitor the `ObjectMonitor*` is written directly over the >> `markWord` and any overwritten data is displaced into a displaced >> `markWord`. This is problematic for concurrent GCs which needs extra care or >> lo

Integrated: 8327964: Simplify BigInteger.implMultiplyToLen intrinsic

2024-05-27 Thread Yudi Zheng
On Tue, 12 Mar 2024 10:44:54 GMT, Yudi Zheng wrote: > Moving array construction within BigInteger.implMultiplyToLen intrinsic > candidate to its caller simplifies the intrinsic implementation in JIT > compiler. This pull request has now been integrated. Changeset: ed81a478 Author

Re: RFR: 8327964: Simplify BigInteger.implMultiplyToLen intrinsic [v7]

2024-05-27 Thread Yudi Zheng
On Fri, 24 May 2024 15:12:28 GMT, Yudi Zheng wrote: >> Moving array construction within BigInteger.implMultiplyToLen intrinsic >> candidate to its caller simplifies the intrinsic implementation in JIT >> compiler. > > Yudi Zheng has updated the pull request with a

Re: RFR: 8327964: Simplify BigInteger.implMultiplyToLen intrinsic [v7]

2024-05-24 Thread Yudi Zheng
> Moving array construction within BigInteger.implMultiplyToLen intrinsic > candidate to its caller simplifies the intrinsic implementation in JIT > compiler. Yudi Zheng has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev exc

Re: RFR: 8327964: Simplify BigInteger.implMultiplyToLen intrinsic [v6]

2024-05-24 Thread Yudi Zheng
On Thu, 23 May 2024 10:12:17 GMT, Bhavana Kilambi wrote: >> Yudi Zheng has updated the pull request incrementally with one additional >> commit since the last revision: >> >> address comments. > > src/hotspot/share/opto/library_call.cpp line 5925: > >>

Re: RFR: 8327964: Simplify BigInteger.implMultiplyToLen intrinsic [v6]

2024-05-22 Thread Yudi Zheng
On Wed, 22 May 2024 14:47:43 GMT, Yudi Zheng wrote: >> Moving array construction within BigInteger.implMultiplyToLen intrinsic >> candidate to its caller simplifies the intrinsic implementation in JIT >> compiler. > > Yudi Zheng has updated the pull request increment

Re: RFR: 8327964: Simplify BigInteger.implMultiplyToLen intrinsic [v5]

2024-05-22 Thread Yudi Zheng
On Wed, 17 Apr 2024 20:04:44 GMT, Dean Long wrote: >> Yudi Zheng has updated the pull request incrementally with one additional >> commit since the last revision: >> >> address comment. > > src/hotspot/cpu/x86/macroAssembler_x86.cpp line 6662: > >>

Re: RFR: 8327964: Simplify BigInteger.implMultiplyToLen intrinsic [v6]

2024-05-22 Thread Yudi Zheng
> Moving array construction within BigInteger.implMultiplyToLen intrinsic > candidate to its caller simplifies the intrinsic implementation in JIT > compiler. Yudi Zheng has updated the pull request incrementally with one additional commit since the last revision: address

Re: RFR: 8327964: Simplify BigInteger.implMultiplyToLen intrinsic [v3]

2024-05-22 Thread Yudi Zheng
On Mon, 20 May 2024 10:41:36 GMT, Bhavana Kilambi wrote: >> @dafedafe @dean-long please take a look and let me know if there are further >> issues, thanks! > > Hi @mur47x111, do you happen to have any performance results with this patch? @Bhavana-Kilambi the performance result for x86 is at ht

Re: RFR: 8327964: Simplify BigInteger.implMultiplyToLen intrinsic [v5]

2024-05-22 Thread Yudi Zheng
On Wed, 17 Apr 2024 19:33:01 GMT, Dean Long wrote: >> Yudi Zheng has updated the pull request incrementally with one additional >> commit since the last revision: >> >> address comment. > > src/hotspot/cpu/aarch64/stubGenerator_aarch64.cpp line 4670: >

Re: RFR: 8327964: Simplify BigInteger.implMultiplyToLen intrinsic [v3]

2024-04-17 Thread Yudi Zheng
On Tue, 26 Mar 2024 15:59:33 GMT, Damon Fenacci wrote: >> Yudi Zheng has updated the pull request incrementally with one additional >> commit since the last revision: >> >> address comment. > > `multiply_to_len` seems to be used by `generate_squareToLen` as wel

Re: RFR: 8327964: Simplify BigInteger.implMultiplyToLen intrinsic [v5]

2024-04-17 Thread Yudi Zheng
> Moving array construction within BigInteger.implMultiplyToLen intrinsic > candidate to its caller simplifies the intrinsic implementation in JIT > compiler. Yudi Zheng has updated the pull request incrementally with one additional commit since the last revision: addres

Re: RFR: 8327964: Simplify BigInteger.implMultiplyToLen intrinsic [v4]

2024-04-17 Thread Yudi Zheng
> Moving array construction within BigInteger.implMultiplyToLen intrinsic > candidate to its caller simplifies the intrinsic implementation in JIT > compiler. Yudi Zheng has updated the pull request incrementally with one additional commit since the last revision: addres

Re: RFR: 8327964: Simplify BigInteger.implMultiplyToLen intrinsic [v3]

2024-03-19 Thread Yudi Zheng
> Moving array construction within BigInteger.implMultiplyToLen intrinsic > candidate to its caller simplifies the intrinsic implementation in JIT > compiler. Yudi Zheng has updated the pull request incrementally with one additional commit since the last revision: addres

Re: RFR: 8327964: Simplify BigInteger.implMultiplyToLen intrinsic [v2]

2024-03-19 Thread Yudi Zheng
> Moving array construction within BigInteger.implMultiplyToLen intrinsic > candidate to its caller simplifies the intrinsic implementation in JIT > compiler. Yudi Zheng has updated the pull request incrementally with one additional commit since the last revision: addres

Re: RFR: 8327964: Simplify BigInteger.implMultiplyToLen intrinsic [v2]

2024-03-19 Thread Yudi Zheng
On Mon, 18 Mar 2024 16:55:28 GMT, Damon Fenacci wrote: > Quite a simplification! Have you checked if there are any performance > differences? Ran https://github.com/oracle/graal/blob/master/compiler/src/org.graalvm.micro.benchmarks/src/micro/benchmarks/BigIntegerBenchmark.java The results are

RFR: 8327964: Simplify BigInteger.implMultiplyToLen intrinsic

2024-03-12 Thread Yudi Zheng
Moving array construction within BigInteger.implMultiplyToLen intrinsic candidate to its caller simplifies the intrinsic implementation in JIT compiler. - Commit messages: - Simplify BigInteger.implMultiplyToLen intrinsic Changes: https://git.openjdk.org/jdk/pull/18226/files Webr

Re: RFR: 8252204: AArch64: Implement SHA3 accelerator/intrinsic [v11]

2023-08-02 Thread Yudi Zheng
On Wed, 2 Aug 2023 12:33:43 GMT, Ferenc Rakoczi wrote: >> src/hotspot/cpu/aarch64/stubGenerator_aarch64.cpp line 3473: >> >>> 3471: __ bcax(v24, __ T16B, v24, v8, v31); >>> 3472: >>> 3473: __ ld1r(v31, __ T2D, __ post(rscratch1, 8)); >> >> is it intentional to load 16 bytes and post-i

Re: RFR: 8252204: AArch64: Implement SHA3 accelerator/intrinsic [v11]

2023-08-02 Thread Yudi Zheng
On Wed, 21 Oct 2020 23:42:33 GMT, Fei Yang wrote: >> Contributed-by: ard.biesheu...@linaro.org, dong...@huawei.com >> >> This added an intrinsic for SHA3 using aarch64 v8.2 SHA3 Crypto Extensions. >> Reference implementation for core SHA-3 transform using ARMv8.2 Crypto >> Extensions: >> https: