RFR: 8338630: Test java/nio/channels/DatagramChannel/SendReceiveMaxSize.java timeout

2024-08-20 Thread SendaoYan
Hi, On linux test environments which has docker service, `ifconfig` shows that `docker0` appears to be a virtual ethernet bridge which is created by the docker host. And the `docker0` virtual ethernet bridge may cause test `java/nio/channels/DatagramChannel/SendReceiveMaxSize.java` bind `docker0

Re: RFR: 8336934: Clean up JavaLangReflectAccess [v2]

2024-08-20 Thread Chen Liang
On Thu, 25 Jul 2024 22:33:44 GMT, Chen Liang wrote: >> Removed redundant APIs in `JavaLangReflectAccess` and added general warning >> against using `SharedSecrets`. >> >> The cleanup in `JavaLangReflectAccess` is: >> - Converted `newConstructor` taking parameters to taking another constructor

Integrated: 8336934: Clean up JavaLangReflectAccess

2024-08-20 Thread Chen Liang
On Tue, 23 Jul 2024 04:10:38 GMT, Chen Liang wrote: > Removed redundant APIs in `JavaLangReflectAccess` and added general warning > against using `SharedSecrets`. > > The cleanup in `JavaLangReflectAccess` is: > - Converted `newConstructor` taking parameters to taking another constructor > and

Re: RFR: 8336934: Clean up JavaLangReflectAccess [v2]

2024-08-20 Thread Joe Darcy
On Thu, 25 Jul 2024 22:33:44 GMT, Chen Liang wrote: >> Removed redundant APIs in `JavaLangReflectAccess` and added general warning >> against using `SharedSecrets`. >> >> The cleanup in `JavaLangReflectAccess` is: >> - Converted `newConstructor` taking parameters to taking another constructor

Re: RFR: 8338677: Improve startup of memory access var handles by simplifying combinator chains

2024-08-20 Thread Chen Liang
On Tue, 20 Aug 2024 21:13:29 GMT, Maurizio Cimadamore wrote: >> src/java.base/share/classes/jdk/internal/foreign/Utils.java line 245: >> >>> 243: >>> 244: @ForceInline >>> 245: public static void checkEnclosingLayout(MemorySegment segment, >>> long offset, MemoryLayout enclosing, bool

Re: RFR: 8338677: Improve startup of memory access var handles by simplifying combinator chains

2024-08-20 Thread Maurizio Cimadamore
On Tue, 20 Aug 2024 18:31:19 GMT, Chen Liang wrote: >> This PR reduces the amount of lambda forms (LFs) which are created when >> generating var handles for simple struct field accessors. This contributes >> to the startup regression seen in >> [JDK-8337505](https://bugs.openjdk.org/browse/JDK

Re: RFR: 8337408: Use GetTempPath2 API instead of GetTempPath [v2]

2024-08-20 Thread Dhamoder Nalla
On Tue, 20 Aug 2024 16:17:24 GMT, Alan Bateman wrote: >> Dhamoder Nalla has updated the pull request incrementally with one >> additional commit since the last revision: >> >> fix missing code > > src/java.base/windows/native/libjava/java_props_md.c line 327: > >> 325: typedef DWORD (WINAPI

Re: RFR: 8338146: Improve Exchanger performance with VirtualThreads

2024-08-20 Thread Alan Bateman
On Tue, 20 Aug 2024 19:28:15 GMT, Doug Lea wrote: > However, it occurred to me that sometime soon, a version of the whole j.u.c > tck suite should be created to use virtual threads. Which would not be easy, > but might uncover something surprising? The j.u.c tests are run with JTREG_TEST_THRE

Re: RFR: 8338677: Improve startup of memory access var handles by simplifying combinator chains

2024-08-20 Thread Chen Liang
On Tue, 20 Aug 2024 15:05:24 GMT, Maurizio Cimadamore wrote: > This PR reduces the amount of lambda forms (LFs) which are created when > generating var handles for simple struct field accessors. This contributes to > the startup regression seen in > [JDK-8337505](https://bugs.openjdk.org/brow

Re: RFR: 8338146: Improve Exchanger performance with VirtualThreads

2024-08-20 Thread Doug Lea
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

Integrated: 8336756: Improve ClassFile Annotation writing

2024-08-20 Thread Chen Liang
On Mon, 19 Aug 2024 21:51:40 GMT, Chen Liang wrote: > Clean up annotation writing in classfile api: remove the redundant > `Util.Writable` interfaces. This pull request has now been integrated. Changeset: 1ebf2cf6 Author:Chen Liang URL: https://git.openjdk.org/jdk/commit/1ebf2cf639

Re: RFR: 8311302: Allow for jlinking a custom runtime without packaged modules being present [v34]

2024-08-20 Thread Severin Gehwolf
> Please review this patch which adds a jlink mode to the JDK which doesn't > need the packaged modules being present. A.k.a run-time image based jlink. > Fundamentally this patch adds an option to use `jlink` even though your JDK > install might not come with the packaged modules (directory `jm

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

2024-08-20 Thread Mark Reinhold
On Mon, 19 Aug 2024 21:19:13 GMT, Mark Reinhold wrote: > 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 > qualific

RFR: 8338677: Improve startup of memory access var handles by simplifying combinator chains

2024-08-20 Thread Maurizio Cimadamore
This PR reduces the amount of lambda forms (LFs) which are created when generating var handles for simple struct field accessors. This contributes to the startup regression seen in [JDK-8337505](https://bugs.openjdk.org/browse/JDK-8337505). There are essentially three sources of excessive var h

Re: RFR: 8333446: Add tests for hierarchical container support [v5]

2024-08-20 Thread Severin Gehwolf
> Please review this PR which adds test support for systemd slices so that bugs > like [JDK-8217338](https://bugs.openjdk.org/browse/JDK-8217338) can be > verified. The added test, `SystemdMemoryAwarenessTest` currently passes on > cgroups v1 and fails on cgroups v2 due to the way how > [JDK-82

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

2024-08-20 Thread Claes Redestad
On Tue, 20 Aug 2024 12:39:14 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: 8338545: Functional interface implementations for common pre-boot ClassFile operations [v3]

2024-08-20 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

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

2024-08-20 Thread Chen Liang
On Tue, 20 Aug 2024 12:39:14 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 [v3]

2024-08-20 Thread Chen Liang
On Tue, 20 Aug 2024 16:14:49 GMT, Shaojin Wen wrote: > Can we use record to simplify ReferenceClassDescImpl? I would say to hold on a bit; I have another WIP patch to create dedicated class desc for arrays, which may conflict with your cleanup, because arrays and components are frequently used

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

2024-08-20 Thread Shaojin Wen
On Tue, 20 Aug 2024 12:39:14 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: 8337408: Use GetTempPath2 API instead of GetTempPath [v2]

2024-08-20 Thread Alan Bateman
On Thu, 15 Aug 2024 20:28:28 GMT, Dhamoder Nalla wrote: >> Use the GetTempPath2 APIs instead of the GetTempPath APIs in native code >> across the OpenJDK repository to retrieve the temporary directory path, as >> GetTempPath2 provides enhanced security. While GetTempPath may still >> function

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

2024-08-20 Thread Shaojin Wen
On Tue, 20 Aug 2024 12:39:14 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-20 Thread Alan Bateman
On Mon, 19 Aug 2024 13:42:30 GMT, Viktor Klang wrote: > OK to merge from my perspective. Waiting for @AlanBateman to weigh in. Looks quite good, I'm just wondering if we should add some tests that exercise Exchanger with virtual threads (and a mix of virtual + platform threads). -

Re: RFR: 8301991: Convert l10n properties resource bundles to UTF-8 native [v2]

2024-08-20 Thread Naoto Sato
On Tue, 20 Aug 2024 09:07:54 GMT, Pavel Rappo wrote: >> Justin Lu has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Replace InputStreamReader with BufferedReader > > src/jdk.jartool/share/classes/sun/tools/jar/resources/jar_pt_BR.propertie

Re: RFR: 8338661: StackMapTable is invalid if frames appear in dead code [v3]

2024-08-20 Thread Chen Liang
On Tue, 20 Aug 2024 15:08:23 GMT, Adam Sotona wrote: >> ClassFile API allows to build a class with dead code and provide custom >> `StackMapTable` attribute with user-specified frames covering the dead code. >> `StackCounter` is responsible for calculation of `maxStack` and `maxLocals` >> in ce

Re: RFR: 8338661: StackMapTable is invalid if frames appear in dead code [v3]

2024-08-20 Thread Adam Sotona
> ClassFile API allows to build a class with dead code and provide custom > `StackMapTable` attribute with user-specified frames covering the dead code. > `StackCounter` is responsible for calculation of `maxStack` and `maxLocals` > in certain situations and it did not include the user-provided

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

2024-08-20 Thread Bhavana Kilambi
On Mon, 19 Aug 2024 07:19:30 GMT, Jatin Bhateja wrote: >> 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. >>

Re: RFR: 8338661: StackMapTable is invalid if frames appear in dead code [v2]

2024-08-20 Thread Adam Sotona
> ClassFile API allows to build a class with dead code and provide custom > `StackMapTable` attribute with user-specified frames covering the dead code. > `StackCounter` is responsible for calculation of `maxStack` and `maxLocals` > in certain situations and it did not include the user-provided

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

2024-08-20 Thread Chen Liang
On Tue, 20 Aug 2024 04:53:18 GMT, Chen Liang wrote: > 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 e

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

2024-08-20 Thread Chen Liang
On Tue, 20 Aug 2024 04:53:18 GMT, Chen Liang wrote: > 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 e

Re: RFR: 8338661: StackMapTable is invalid if frames appear in dead code

2024-08-20 Thread Chen Liang
On Tue, 20 Aug 2024 13:54:08 GMT, Adam Sotona wrote: > ClassFile API allows to build a class with dead code and provide custom > `StackMapTable` attribute with user-specified frames covering the dead code. > `StackCounter` is responsible for calculation of `maxStack` and `maxLocals` > in certai

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

2024-08-20 Thread Bhavana Kilambi
On Mon, 19 Aug 2024 07:19:30 GMT, Jatin Bhateja wrote: >> 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. >>

RFR: 8338661: StackMapTable is invalid if frames appear in dead code

2024-08-20 Thread Adam Sotona
ClassFile API allows to build a class with dead code and provide custom `StackMapTable` attribute with user-specified frames covering the dead code. `StackCounter` is responsible for calculation of `maxStack` and `maxLocals` in certain situations and it did not include the user-provided `StackMap

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

2024-08-20 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: 8338545: Functional interface implementations for common pre-boot ClassFile operations [v2]

2024-08-20 Thread Adam Sotona
On Tue, 20 Aug 2024 05:50:05 GMT, Chen Liang wrote: >> 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

Re: RFR: 8336756: Improve ClassFile Annotation writing

2024-08-20 Thread Adam Sotona
On Mon, 19 Aug 2024 21:51:40 GMT, Chen Liang wrote: > Clean up annotation writing in classfile api: remove the redundant > `Util.Writable` interfaces. Looks good to me. - Marked as reviewed by asotona (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/20635#pullrequestreview

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

2024-08-20 Thread Adam Sotona
On Tue, 20 Aug 2024 04:53:18 GMT, Chen Liang wrote: > 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 e

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

2024-08-20 Thread Alan Bateman
On Mon, 19 Aug 2024 21:19:13 GMT, Mark Reinhold wrote: > 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 > qualific

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

2024-08-20 Thread Claes Redestad
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: 8301991: Convert l10n properties resource bundles to UTF-8 native [v2]

2024-08-20 Thread Pavel Rappo
On Wed, 13 Sep 2023 17:38:28 GMT, Justin Lu wrote: >> JDK .properties files still use ISO-8859-1 encoding with escape sequences. >> It would improve readability to see the native characters instead of escape >> sequences (especially for the L10n process). The majority of files changed >> are l