Re: RFR: 8338545: Functional interface implementations for common pre-boot ClassFile operations [v2]

2024-08-19 Thread Chen Liang
> Some ad-hoc lambdas and classes for functional calls to ClassFile API in > early bootstrap can be replaced with a few fixed factories. This allows some > methods to be used at early bootstrap with less class loading costs. > > Depends on #20627, as this adds another fix to one of the fixes the

Integrated: 8338543: ClassBuilder withMethod builders should cache the method type symbol

2024-08-19 Thread Chen Liang
On Mon, 19 Aug 2024 15:08:05 GMT, Chen Liang wrote: > In #20611 and other investigations, we noted that > `MethodTypeDesc.ofDescriptor` is unnecessarily called due to missing caching > in ClassBuilder. This patch adds that missing caching functionality. This pull request has now been integrate

Re: RFR: 8338543: ClassBuilder withMethod builders should cache the method type symbol

2024-08-19 Thread Chen Liang
On Mon, 19 Aug 2024 15:08:05 GMT, Chen Liang wrote: > In #20611 and other investigations, we noted that > `MethodTypeDesc.ofDescriptor` is unnecessarily called due to missing caching > in ClassBuilder. This patch adds that missing caching functionality. Thanks for the review. Integrating to fa

RFR: 8338623: StackCounter adding extraneous slots for receiver invoke instructions

2024-08-19 Thread Chen Liang
StackCounter was adding return type slots before deducting receiver slot, so code like int b() { return this.hashCode(); } will be counted as having a max stack of 2. Avoid this problem by only calling `addStackSlot` once for each instruction. - Commit messages: - 8338623: StackC

Re: RFR: 8336275: Move common Method and Constructor fields to Executable [v2]

2024-08-19 Thread Chen Liang
On Wed, 17 Jul 2024 03:03:23 GMT, Chen Liang wrote: >> Move fields common to Method and Field to executable, which simplifies >> implementation. Removed useless transient modifiers as Method and Field were >> never serializable. >> >> Note to core-libs reviewers: Please review the associated C

Re: RFR: 8162500: Receiver annotations of inner classes of local classes not found at runtime

2024-08-19 Thread Chen Liang
On Tue, 16 Jul 2024 18:02:57 GMT, Chen Liang wrote: > In annotated types, local and inner class types should be annotated as > "top-level" types. For example, in the test here > > public static Class getLocalsMember() { > class Local { > class Member { >

Re: RFR: 8162500: Receiver annotations of inner classes of local classes not found at runtime

2024-08-19 Thread Joe Darcy
On Tue, 16 Jul 2024 18:02:57 GMT, Chen Liang wrote: > In annotated types, local and inner class types should be annotated as > "top-level" types. For example, in the test here > > public static Class getLocalsMember() { > class Local { > class Member { >

Re: RFR: 8336275: Move common Method and Constructor fields to Executable [v2]

2024-08-19 Thread Joe Darcy
On Wed, 17 Jul 2024 03:03:23 GMT, Chen Liang wrote: >> Move fields common to Method and Field to executable, which simplifies >> implementation. Removed useless transient modifiers as Method and Field were >> never serializable. >> >> Note to core-libs reviewers: Please review the associated C

Re: RFR: 8338532: Speed up the ClassFile API MethodTypeDesc#ofDescriptor [v2]

2024-08-19 Thread Chen Liang
On Mon, 19 Aug 2024 23:14:06 GMT, Shaojin Wen wrote: >> The current implementation of ofDescriptor puts return type and parameter >> types together in an ArrayList, and then splits them into return type and >> array of parameter types. This ArrayList creation is unnecessary, >> considering mos

Re: RFR: 8338532: Speed up the ClassFile API MethodTypeDesc#ofDescriptor [v2]

2024-08-19 Thread Shaojin Wen
> The current implementation of ofDescriptor puts return type and parameter > types together in an ArrayList, and then splits them into return type and > array of parameter types. This ArrayList creation is unnecessary, considering > most descriptors only have few parameter types. > > By splitt

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

2024-08-19 Thread Sandhya Viswanathan
On Mon, 19 Aug 2024 07:36:15 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:- >>

RFR: 8336756: Improve ClassFile Annotation writing

2024-08-19 Thread Chen Liang
Clean up annotation writing in classfile api: remove the redundant `Util.Writable` interfaces. - Commit messages: - 8336756: Improve ClassFile Annotation writing Changes: https://git.openjdk.org/jdk/pull/20635/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=20635&range=00

Re: RFR: 8338532: Speed up the ClassFile API MethodTypeDesc#ofDescriptor

2024-08-19 Thread Chen Liang
On Fri, 16 Aug 2024 08:53:38 GMT, Shaojin Wen wrote: > The current implementation of ofDescriptor puts return type and parameter > types together in an ArrayList, and then splits them into return type and > array of parameter types. This ArrayList creation is unnecessary, considering > most de

RFR: 8338611: java.lang.module specification wording not aligned with JEP 261

2024-08-19 Thread Mark Reinhold
The `java.lang.module` package specification defines the default set of root modules as “every module that is observable on the upgrade module path or among the system modules, and that exports at least one package without qualification.” There’s no need to use the term “observable” here, since

Re: [External] : Re: Stream Gatherers (JEP 473) feedback

2024-08-19 Thread Anthony Vanelverdinghe
August 15, 2024 at 1:27 PM, "Viktor Klang" wrote: > > Hi Anthony, Hi Viktor > Thanks for the input—it's much appreciated! > > Introducing yet another, user-facing, type parameter to get slightly improved > type inference is unfortunately for me a too high of a price to pay. Ideally, > type i

Re: RFR: 8338532: Speed up the ClassFile API MethodTypeDesc#ofDescriptor

2024-08-19 Thread Shaojin Wen
On Mon, 19 Aug 2024 14:43:44 GMT, Chen Liang wrote: >> I added two startup process descStrings to the benchmark, and now optimized >> the parameter type of `Ljava/lang/Object` as follows: >> >> ## 1. Benchmark script >> >> git remote add wenshao g...@github.com:wenshao/jdk.git >> git fetch wen

RFR: 8338595: Add more linesize for MIME decoder in macro bench test Base64Decode

2024-08-19 Thread Hamlin Li
Hi, Can you help to review this simple patch? Currently, lineSize linesize for MIME case in macro bench test Base64Decode is only "4", but in Base64.Encoder default linesize for MIME encoder is 76. It's helpful to add more linesize, e.g. 76 and so on. Thanks! - Commit messages: -

RFR: 8338545: Functional interface implementations for common pre-boot ClassFile operations

2024-08-19 Thread Chen Liang
Some ad-hoc lambdas and classes for functional calls to ClassFile API in early bootstrap can be replaced with a few fixed factories. This allows some methods to be used at early bootstrap with less class loading costs. Depends on #20627, as this adds another fix to one of the fixes there on `Cl

RFR: 8338139: {ClassLoading,Memory}MXBean::isVerbose methods are inconsistent with their setVerbose methods

2024-08-19 Thread Stefan Karlsson
The `ClassLoadingMXBean` and `MemoryMXBean` APIs have `setVerbose` methods to control verbose mode and `isVerbose` methods to query it. Some JCK tests expect `setVerbose(false)` to disable verbose mode and, subsequently, `isVerbose()` to return false. However, if logging to a file is enabled by

Re: RFR: 8338543: ClassBuilder withMethod builders should cache the method type symbol

2024-08-19 Thread Chen Liang
On Mon, 19 Aug 2024 15:08:05 GMT, Chen Liang wrote: > In #20611 and other investigations, we noted that > `MethodTypeDesc.ofDescriptor` is unnecessarily called due to missing caching > in ClassBuilder. This patch adds that missing caching functionality. I tested by adding a `System.out.println

Re: RFR: 8338543: ClassBuilder withMethod builders should cache the method type symbol

2024-08-19 Thread Adam Sotona
On Mon, 19 Aug 2024 15:08:05 GMT, Chen Liang wrote: > In #20611 and other investigations, we noted that > `MethodTypeDesc.ofDescriptor` is unnecessarily called due to missing caching > in ClassBuilder. This patch adds that missing caching functionality. Looks good to me, do you have any benchm

RFR: 8338543: ClassBuilder withMethod builders should cache the method type symbol

2024-08-19 Thread Chen Liang
In #20611 and other investigations, we noted that `MethodTypeDesc.ofDescriptor` is unnecessarily called due to missing caching in ClassBuilder. This patch adds that missing caching functionality. - Commit messages: - 8338543: ClassBuilder withMethod builders should cache the method

Re: RFR: 8338532: Speed up the ClassFile API MethodTypeDesc#ofDescriptor

2024-08-19 Thread Chen Liang
On Sun, 18 Aug 2024 23:40:24 GMT, Shaojin Wen wrote: >> The current implementation of ofDescriptor puts return type and parameter >> types together in an ArrayList, and then splits them into return type and >> array of parameter types. This ArrayList creation is unnecessary, >> considering mos

Re: RFR: 8338146: Improve Exchanger performance with VirtualThreads

2024-08-19 Thread Viktor Klang
On Mon, 12 Aug 2024 17:07:42 GMT, Doug Lea wrote: > The Exchanger class uses spin-waits that are hostile to some uses of > VirtualThreads. Improving this requires a means of estimating whether there > are many VirtualThreads with few carriers, which can be supported by adding a > method in cla

Withdrawn: 8329596: Add test for virtual threads invoking synchronized native methods

2024-08-19 Thread duke
On Wed, 3 Apr 2024 10:52:10 GMT, Alan Bateman wrote: > This is a test-only addition to add a test for virtual threads invoking a > synchronized native method and invoking a native method that enter/exits a > monitor with JNI MonitorEnter/MonitorExit. The test has been in the loom repo > for so

Withdrawn: 8330988: Implementation of 8288293: Windows/gcc Port for hsdis

2024-08-19 Thread duke
On Tue, 23 Apr 2024 13:56:32 GMT, Julian Waters wrote: > WIP > > This changeset contains hsdis for Windows/gcc Port. It supports both the > binutils and capstone backends, though the LLVM backend is left out due to > compatibility issues encountered during the build. Currently, which gcc > di

Integrated: 8338564: Remove obsolete AbstractNamedEntry::equals method

2024-08-19 Thread Adam Sotona
On Mon, 19 Aug 2024 08:54:24 GMT, Adam Sotona wrote: > Method > `jdk.internal.classfile.impl.AbstractPoolEntry.AbstractNamedEntry::equals` > implementation is invalid. > Fortunately it is overridden with valid implementation in all its sub types > and it can be removed. > > This patch removes

Re: RFR: 8338564: Remove obsolete AbstractNamedEntry::equals method

2024-08-19 Thread Chen Liang
On Mon, 19 Aug 2024 08:54:24 GMT, Adam Sotona wrote: > Method > `jdk.internal.classfile.impl.AbstractPoolEntry.AbstractNamedEntry::equals` > implementation is invalid. > Fortunately it is overridden with valid implementation in all its sub types > and it can be removed. > > This patch removes

Withdrawn: 8322420: [Linux] cgroup v2: Limits in parent nested control groups are not detected

2024-08-19 Thread Jan Kratochvil
On Thu, 28 Dec 2023 12:55:22 GMT, Jan Kratochvil wrote: > The testcase requires root permissions. > > Fix by Severin Gehwolf. > Testcase by Jan Kratochvil. This pull request has been closed without being integrated. - PR: https://git.openjdk.org/jdk/pull/17198

Re: RFR: 8322420: [Linux] cgroup v2: Limits in parent nested control groups are not detected [v21]

2024-08-19 Thread Severin Gehwolf
On Mon, 19 Aug 2024 08:12:25 GMT, Jan Kratochvil wrote: > As we cannot find an agreement even on the comment in the testcase and this > pull request will have soon an anniversary, proposing: > > * check-in the fix from a separate pull request as it is whole your fix > anyway > * I wil

Re: RFR: 8338532: Speed up the ClassFile API MethodTypeDesc#ofDescriptor

2024-08-19 Thread Shaojin Wen
On Mon, 19 Aug 2024 06:39:26 GMT, Shaojin Wen wrote: >> I think you can add a case where the parameters are all these vulnerable >> names like `Ljava/lang/Objecq;` and repeat 8 times, and see how big a >> negative impact these close mismatches have. > > The scenario of `Ljava/lang/Objecq` does

RFR: 8338564: Remove obsolete AbstractNamedEntry::equals method

2024-08-19 Thread Adam Sotona
Method `jdk.internal.classfile.impl.AbstractPoolEntry.AbstractNamedEntry::equals` implementation is invalid. Fortunately it is overridden with valid implementation in all its sub types and it can be removed. This patch removes the obsolete an invalid method implementation. Please review. Than

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

2024-08-19 Thread Aleksey Shipilev
On Fri, 19 Jul 2024 15:52:14 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: 8322420: [Linux] cgroup v2: Limits in parent nested control groups are not detected [v21]

2024-08-19 Thread Jan Kratochvil
On Sat, 17 Aug 2024 05:29:31 GMT, Jan Kratochvil wrote: >> The testcase requires root permissions. >> >> Fix by Severin Gehwolf. >> Testcase by Jan Kratochvil. > > Jan Kratochvil has updated the pull request with a new target base due to a > merge or a rebase. The pull request now contains 12

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

2024-08-19 Thread Jatin Bhateja
> 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:- > Using index values stored in the lanes of "this" vector, assembl

Re: RFR: 8338021: Support saturating vector operators in VectorAPI [v4]

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