Re: RFR: 8339677: [vectorapi] YYYXXXVector::withLaneHelper and laneHelper should use Double::doubleToRawLongBits/Float::floatToRawIntBits

2024-09-06 Thread Quan Anh Mai
On Fri, 6 Sep 2024 19:52:28 GMT, Paul Sandoz wrote: >> Hi, >> >> This patch fixes an issue where we mistakenly use `Double::doubleToLongBits` >> in `DoubleXXXVector::withLaneHelper` and `DoubleXXXVector::laneHelper`. We >> should use the raw bit version instead. >> >> Please kindly review, th

Re: RFR: 8339677: [vectorapi] YYYXXXVector::withLaneHelper and laneHelper should use Double::doubleToRawLongBits/Float::floatToRawIntBits

2024-09-06 Thread Jaikiran Pai
On Fri, 6 Sep 2024 18:31:00 GMT, Quan Anh Mai wrote: > Hi, > > This patch fixes an issue where we mistakenly use `Double::doubleToLongBits` > in `DoubleXXXVector::withLaneHelper` and `DoubleXXXVector::laneHelper`. We > should use the raw bit version instead. > > Please kindly review, thanks v

Re: RFR: 8339687: Rearrange reachabilityFence()s in jdk.test.lib.util.ForceGC

2024-09-06 Thread Stuart Marks
On Fri, 6 Sep 2024 19:57:41 GMT, Brent Christian wrote: > From the bug description: > ForceGC would be improved by moving the Reference.reachabilityFence() calls > for 'obj' and 'ref'. > > Reference.reachabilityFence(obj) is currently placed after 'obj' has been set > to null, so effectively d

Re: RFR: 8339687: Rearrange reachabilityFence()s in jdk.test.lib.util.ForceGC

2024-09-06 Thread Stuart Marks
On Fri, 6 Sep 2024 19:57:41 GMT, Brent Christian wrote: > From the bug description: > ForceGC would be improved by moving the Reference.reachabilityFence() calls > for 'obj' and 'ref'. > > Reference.reachabilityFence(obj) is currently placed after 'obj' has been set > to null, so effectively d

Re: RFR: 8339683: Simplify class data generation in InvokerBytecodeGenerator [v2]

2024-09-06 Thread Chen Liang
On Fri, 6 Sep 2024 19:55:38 GMT, Chen Liang wrote: >> Elide duplicate field CP entry creation, and reuse elements in the field CP >> entry for field generation. > > Chen Liang has updated the pull request incrementally with one additional > commit since the last revision: > > Do not try to c

Re: RFR: 8339683: Simplify class data generation in InvokerBytecodeGenerator [v2]

2024-09-06 Thread Claes Redestad
On Fri, 6 Sep 2024 19:55:38 GMT, Chen Liang wrote: >> Elide duplicate field CP entry creation, and reuse elements in the field CP >> entry for field generation. > > Chen Liang has updated the pull request incrementally with one additional > commit since the last revision: > > Do not try to c

Re: RFR: 8339644: Improve parsing of Day/Month in tzdata rules [v3]

2024-09-06 Thread Justin Lu
On Fri, 6 Sep 2024 21:49:30 GMT, Naoto Sato wrote: >> Fixing TZDB build tool to accommodate full month/day names. Recently >> released tzdb2024b included (inadvertently) full month name "April", which >> is allowed by the spec (zic.8), but never used. This will cause build >> failure of the JD

Re: RFR: 8338021: Support new unsigned and saturating vector operators in VectorAPI [v8]

2024-09-06 Thread Sandhya Viswanathan
On Fri, 6 Sep 2024 06:43:31 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: 8339644: Improve parsing of Day/Month in tzdata rules [v3]

2024-09-06 Thread Naoto Sato
On Fri, 6 Sep 2024 21:49:30 GMT, Naoto Sato wrote: >> Fixing TZDB build tool to accommodate full month/day names. Recently >> released tzdb2024b included (inadvertently) full month name "April", which >> is allowed by the spec (zic.8), but never used. This will cause build >> failure of the JD

Re: RFR: 8339644: Improve parsing of Day/Month in tzdata rules [v3]

2024-09-06 Thread Naoto Sato
> Fixing TZDB build tool to accommodate full month/day names. Recently released > tzdb2024b included (inadvertently) full month name "April", which is allowed > by the spec (zic.8), but never used. This will cause build failure of the > JDK. The proposed fix is manually tested by modifying the t

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

2024-09-06 Thread Sandhya Viswanathan
On Fri, 6 Sep 2024 21:15:07 GMT, Sandhya Viswanathan wrote: >> @vamsi-parasa don't hesitate in adding as much and explicit information >> about the original source from where the algorithm has been picked up, even >> though the PR explicitly mentions libm. Adding the link to source references

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

2024-09-06 Thread Sandhya Viswanathan
On Wed, 4 Sep 2024 01:57:42 GMT, Jatin Bhateja wrote: >> @theRealAph, this implementation is based on Intel libm math library and >> meets the accuracy requirements. The algorithm is provided in the comments. > > @vamsi-parasa don't hesitate in adding as much and explicit information > about t

Re: RFR: 8339683: Simplify class data generation in InvokerBytecodeGenerator [v2]

2024-09-06 Thread Chen Liang
On Fri, 6 Sep 2024 19:55:38 GMT, Chen Liang wrote: >> Elide duplicate field CP entry creation, and reuse elements in the field CP >> entry for field generation. > > Chen Liang has updated the pull request incrementally with one additional > commit since the last revision: > > Do not try to c

Re: RFR: 8339683: Simplify class data generation in InvokerBytecodeGenerator [v2]

2024-09-06 Thread Claes Redestad
On Fri, 6 Sep 2024 19:55:38 GMT, Chen Liang wrote: >> Elide duplicate field CP entry creation, and reuse elements in the field CP >> entry for field generation. > > Chen Liang has updated the pull request incrementally with one additional > commit since the last revision: > > Do not try to c

RFR: 8339687: Rearrange reachabilityFence()s in jdk.test.lib.util.ForceGC

2024-09-06 Thread Brent Christian
>From the bug description: ForceGC would be improved by moving the Reference.reachabilityFence() calls for 'obj' and 'ref'. Reference.reachabilityFence(obj) is currently placed after 'obj' has been set to null, so effectively does nothing. It should occur before obj = null; For Reference.reacha

Re: RFR: 8339683: Simplify class data generation in InvokerBytecodeGenerator [v2]

2024-09-06 Thread Chen Liang
> Elide duplicate field CP entry creation, and reuse elements in the field CP > entry for field generation. Chen Liang has updated the pull request incrementally with one additional commit since the last revision: Do not try to classdata non-live lambda forms in pre-generation -

Re: RFR: 8339677: [vectorapi] YYYXXXVector::withLaneHelper and laneHelper should use Double::doubleToRawLongBits/Float::floatToRawIntBits

2024-09-06 Thread Paul Sandoz
On Fri, 6 Sep 2024 18:31:00 GMT, Quan Anh Mai wrote: > Hi, > > This patch fixes an issue where we mistakenly use `Double::doubleToLongBits` > in `DoubleXXXVector::withLaneHelper` and `DoubleXXXVector::laneHelper`. We > should use the raw bit version instead. > > Please kindly review, thanks v

Re: RFR: 8338930: StringConcatFactory hardCoded string concatenation strategy [v9]

2024-09-06 Thread Shaojin Wen
> This is a follow-up to PR #20273, which improves performance when the number > of parameters exceeds 20. > > When the number of parameters is large, the possibility of reuse will be > lower, so we can use the static concat method and write the length and coder > directly into the bytecode to

RFR: 8339683: Simplify class data generation in InvokerBytecodeGenerator

2024-09-06 Thread Chen Liang
Elide duplicate field CP entry creation, and reuse elements in the field CP entry for field generation. - Commit messages: - 8339683: Simplify class data generation in InvokerBytecodeGenerator Changes: https://git.openjdk.org/jdk/pull/20896/files Webrev: https://webrevs.openjdk.o

Re: RFR: 8338021: Support new unsigned and saturating vector operators in VectorAPI [v8]

2024-09-06 Thread Sandhya Viswanathan
On Fri, 6 Sep 2024 18:39:08 GMT, Sandhya Viswanathan wrote: >> Jatin Bhateja has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Review suggestions > > src/jdk.incubator.vector/share/classes/jdk/incubator/vector/VectorMathUtils.java > line

Re: RFR: 8338021: Support new unsigned and saturating vector operators in VectorAPI [v8]

2024-09-06 Thread Sandhya Viswanathan
On Fri, 6 Sep 2024 06:43:31 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: 8339677: [vectorapi] YYYXXXVector::withLaneHelper and laneHelper should use Double::doubleToRawLongBits/Float::floatToRawIntBits

2024-09-06 Thread Quan Anh Mai
Hi, This patch fixes an issue where we mistakenly use `Double::doubleToLongBits` in `DoubleXXXVector::withLaneHelper` and `DoubleXXXVector::laneHelper`. We should use the raw bit version instead. Please kindly review, thanks very much. - Commit messages: - fix withLane and lane o

Integrated: 8339635: StringConcatFactory optimization for CompactStrings off

2024-09-06 Thread Shaojin Wen
On Tue, 27 Aug 2024 05:08:53 GMT, Shaojin Wen wrote: > A small optimization, when CompactStrings is turned off, the coder method is > not generated, which improves the startup performance This pull request has now been integrated. Changeset: fbe26293 Author:Shaojin Wen Committer: Chen Lia

Re: RFR: 8339644: Improve parsing of Day/Month in tzdata rules [v2]

2024-09-06 Thread Sean Coffey
On Fri, 6 Sep 2024 18:10:33 GMT, Naoto Sato wrote: >> Fixing TZDB build tool to accommodate full month/day names. Recently >> released tzdb2024b included (inadvertently) full month name "April", which >> is allowed by the spec (zic.8), but never used. This will cause build >> failure of the JD

Re: RFR: 8339644: Improve parsing of Day/Month in tzdata rules [v2]

2024-09-06 Thread Justin Lu
On Fri, 6 Sep 2024 18:10:33 GMT, Naoto Sato wrote: >> Fixing TZDB build tool to accommodate full month/day names. Recently >> released tzdb2024b included (inadvertently) full month name "April", which >> is allowed by the spec (zic.8), but never used. This will cause build >> failure of the JD

Re: RFR: 8339635: StringConcatFactory optimization for CompactStrings off [v2]

2024-09-06 Thread duke
On Fri, 6 Sep 2024 00:21:07 GMT, Shaojin Wen wrote: >> A small optimization, when CompactStrings is turned off, the coder method is >> not generated, which improves the startup performance > > Shaojin Wen has updated the pull request incrementally with one additional > commit since the last rev

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

2024-09-06 Thread Jatin Bhateja
On Fri, 30 Aug 2024 14:57:31 GMT, Emanuel Peter wrote: >> src/hotspot/share/opto/vectornode.cpp line 2183: >> >>> 2181: }; >>> 2182: // Targets emulating unsupported permutation for certain vector >>> types >>> 2183: // may need to message the indexes to match the users intent. >>

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

2024-09-06 Thread Jatin Bhateja
On Fri, 30 Aug 2024 14:40:35 GMT, Emanuel Peter wrote: >> Jatin Bhateja has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Adding descriptive comments > > src/hotspot/share/opto/vectornode.cpp line 2159: > >> 2157: >> 2158: vmask_type =

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

2024-09-06 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: 8339644: Improve parsing of Day/Month in tzdata rules [v2]

2024-09-06 Thread Naoto Sato
> Fixing TZDB build tool to accommodate full month/day names. Recently released > tzdb2024b included (inadvertently) full month name "April", which is allowed > by the spec (zic.8), but never used. This will cause build failure of the > JDK. The proposed fix is manually tested by modifying the t

Re: RFR: 8338021: Support new unsigned and saturating vector operators in VectorAPI [v7]

2024-09-06 Thread Paul Sandoz
On Fri, 6 Sep 2024 06:40:18 GMT, Jatin Bhateja wrote: >> src/jdk.incubator.vector/share/classes/jdk/incubator/vector/VectorMathUtils.java >> line 78: >> >>> 76: * @since 24 >>> 77: */ >>> 78: public static long addSaturating(long a, long b) { >> >> Are these public methods any Ja

Re: RFR: 8337753: Target class of upcall stub may be unloaded [v5]

2024-09-06 Thread Jorn Vernee
> As discussed in the JBS issue: > > FFM upcall stubs embed a `Method*` of the target method in the stub. This > `Method*` is read from the `LambdaForm::vmentry` field associated with the > target method handle at the time when the upcall stub is generated. The MH > instance itself is stashed i

RFR: 8339644: Improve parsing of Day/Month in tzdata rules

2024-09-06 Thread Naoto Sato
Fixing TZDB build tool to accommodate full month/day names. Recently released tzdb2024b included (inadvertently) full month name "April", which is allowed by the spec (zic.8), but never used. This will cause build failure of the JDK. The proposed fix is manually tested by modifying the tzdb file

Re: RFR: 8339574: Behavior of File.is{Directory,File,Hidden} is not documented with respect to symlinks [v4]

2024-09-06 Thread Brian Burkhalter
> Make explicit how the `java.io.File` methods `isDirectory`, `isFile`, and > `isHidden` behave when the `File` represents a symbolic link. Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision: 8339574: Revised class level doc of File

Integrated: 8338123: Linker crash when building a downcall handle with many arguments in x64

2024-09-06 Thread Jorn Vernee
On Tue, 3 Sep 2024 17:52:35 GMT, Jorn Vernee wrote: > - Adjust downcall stub sizes based on latest version. (per method described > in https://github.com/openjdk/jdk/pull/12908) > - Beef up test for large stubs to also cover this particular case. This pull request has now been integrated. Chan

Re: RFR: 8339574: Behavior of File.is{Directory,File,Hidden} is not documented with respect to symlinks [v3]

2024-09-06 Thread Brian Burkhalter
> Make explicit how the `java.io.File` methods `isDirectory`, `isFile`, and > `isHidden` behave when the `File` represents a symbolic link. Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision: 8339574: Add verbiage about links to FIS/

Re: RFR: 8339538: Wrong timeout computations in DnsClient

2024-09-06 Thread Daniel Fuchs
On Fri, 6 Sep 2024 16:28:36 GMT, Aleksei Efimov wrote: > This PR proposes the following changes to address wrong timeout computations > in the `com.sun.jndi.dns.DnsClient`: > - The `DnsClient` has been updated to use a monotonic high-resolution (nano) > clock. The existing `Timeout` test has al

RFR: 8339538: Wrong timeout computations in DnsClient

2024-09-06 Thread Aleksei Efimov
This PR proposes the following changes to address wrong timeout computations in the `com.sun.jndi.dns.DnsClient`: - The `DnsClient` has been updated to use a monotonic high-resolution (nano) clock. The existing `Timeout` test has also been updated to use the nano clock to measure observed timeou

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

2024-09-06 Thread Coleen Phillimore
> 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 > have no instances created for them don't require compressed class

Re: RFR: 8339574: Behavior of File.is{Directory,File,Hidden} is not documented with respect to symlinks

2024-09-06 Thread Brian Burkhalter
On Thu, 5 Sep 2024 21:05:38 GMT, Brian Burkhalter wrote: > Make explicit how the `java.io.File` methods `isDirectory`, `isFile`, and > `isHidden` behave when the `File` represents a symbolic link. 3a68877 addresses changes to `File` only; `FIS/FOS/RAF` are as yet unchanged. - PR C

Re: RFR: 8339574: Behavior of File.is{Directory,File,Hidden} is not documented with respect to symlinks [v2]

2024-09-06 Thread Brian Burkhalter
> Make explicit how the `java.io.File` methods `isDirectory`, `isFile`, and > `isHidden` behave when the `File` represents a symbolic link. Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision: 8339574: Add verbiage to class doc, delet

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

2024-09-06 Thread Chen Liang
On Wed, 21 Aug 2024 15:42:18 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

Withdrawn: 8336275: Move common Method and Constructor fields to Executable

2024-09-06 Thread Chen Liang
On Tue, 16 Jul 2024 03:45:36 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 CSR on

Re: RFR: 8338930: StringConcatFactory hardCoded string concatenation strategy [v8]

2024-09-06 Thread Chen Liang
On Fri, 6 Sep 2024 01:12:27 GMT, Shaojin Wen wrote: >> This is a follow-up to PR #20273, which improves performance when the number >> of parameters exceeds 20. >> >> When the number of parameters is large, the possibility of reuse will be >> lower, so we can use the static concat method and w

Re: RFR: 8339631: Fix block @jls and @jvms tags [v2]

2024-09-06 Thread Chen Liang
On Fri, 6 Sep 2024 09:16:28 GMT, Pavel Rappo wrote: >> This fixes some of the recently discovered [issues] with the block variants >> of the specification tags. While reviewing, please check the proposed >> changes against the actual specifications. Since the specifications for JDK >> 23 are n

Re: [External] : Re: [POTENTIAL BUG] Potential FIFO violation in BlockingQueue under high contention and suggestion for fair mode in ArrayBlockingQueue and LinkedBlockingQueue

2024-09-06 Thread 김민주
Dear Viktor, I hope this email finds you well. First and foremost, thank you for providing such a detailed explanation of the AQS issue. Based on Archie's suggestion, I've taken the liberty of implementing a custom ArrayBlockingQueue3 class and created a test case that attempts to reproduce th

Re: RFR: 8339531: Improve performance of MemorySegment::mismatch [v9]

2024-09-06 Thread Brett Okken
On Thu, 5 Sep 2024 17:47:16 GMT, Per Minborg wrote: >> This PR proposes to improve the performance of `MemorySegment::mismatch` by >> using Java code rather than transitioning to native code. > > Per Minborg has updated the pull request incrementally with one additional > commit since the last

Re: RFR: 8339631: Fix block @jls and @jvms tags [v2]

2024-09-06 Thread Jonathan Gibbons
On Fri, 6 Sep 2024 12:09:16 GMT, Pavel Rappo wrote: > Thoughts? My initial thought is, at least we're working with specific tags (`@jls` and `@jvms`) rather than generic HTML links (`...`), since that permits the kind of detailed analysis and checking you are doing. Preview-ness is a pervasiv

Re: RFR: 8339487: ProcessHandleImpl os_getChildren sysctl call - retry in case of ENOMEM and enhance exception message [v3]

2024-09-06 Thread Roger Riggs
On Fri, 6 Sep 2024 07:05:22 GMT, Matthias Baesken wrote: >> When running jtreg test java/lang/ProcessHandle/PermissionTest.java on >> macOS, a few times this error occurs : >> >> java.lang.RuntimeException: Cannot allocate memory >>at java.base/java.lang.ProcessHandleImpl.getProcessPids

Integrated: 8339519: Remove size field from instructions

2024-09-06 Thread Chen Liang
On Thu, 5 Sep 2024 23:02:16 GMT, Chen Liang wrote: > `AbstractInstruction` has a redundant `size` field unnecessary for the > majority of instructions. We should add this field to the 2 switch > instructions that need it only. This pull request has now been integrated. Changeset: 5b72bbf9 Aut

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

2024-09-06 Thread Coleen Phillimore
On Fri, 6 Sep 2024 11:08:02 GMT, Thomas Stuefe wrote: >> Coleen Phillimore has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Add function in Metaspace to tell you if Klass pointer is in compressible >> space. > > src/hotspot/share/memory/

Re: RFR: 8339531: Improve performance of MemorySegment::mismatch [v9]

2024-09-06 Thread Maurizio Cimadamore
On Thu, 5 Sep 2024 17:50:04 GMT, Maurizio Cimadamore wrote: >> Per Minborg has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Fix errors in a benchmark > > src/java.base/share/classes/jdk/internal/foreign/SegmentBulkOperations.java > line

Re: RFR: 8317356: Test ClassFile API if it deals with nulls correctly across the whole API [v3]

2024-09-06 Thread Adam Sotona
On Fri, 6 Sep 2024 13:39:43 GMT, Chen Liang wrote: >> The test fails if the method does not throw an exception or throws anything >> other than a NPE. That's why I added `requireNonNull` here. >> >> What exceptions would be considered ok when nulls are provided? > > I think we should prefer NPE

Re: RFR: 8317356: Test ClassFile API if it deals with nulls correctly across the whole API [v3]

2024-09-06 Thread Chen Liang
On Fri, 6 Sep 2024 12:40:15 GMT, Nizar Benalla wrote: >> src/java.base/share/classes/java/lang/classfile/AnnotationValue.java line >> 681: >> >>> 679: */ >>> 680: static AnnotationValue of(Object value) { >>> 681: requireNonNull(value); >> >> Below is a null test throwing IAE.

Integrated: 8339317: Optimize ClassFile writeBuffer

2024-09-06 Thread Shaojin Wen
On Thu, 29 Aug 2024 21:49:58 GMT, Shaojin Wen wrote: > A small optimization, optimize the BufferWriter implementation and use of > ClassFile, provide faster patchInt and skip This pull request has now been integrated. Changeset: 9ebc2ecb Author:Shaojin Wen Committer: Chen Liang URL:

Re: RFR: 8339317: Optimize ClassFile writeBuffer [v7]

2024-09-06 Thread Chen Liang
On Thu, 5 Sep 2024 22:47:00 GMT, Shaojin Wen wrote: >> A small optimization, optimize the BufferWriter implementation and use of >> ClassFile, provide faster patchInt and skip > > Shaojin Wen has updated the pull request with a new target base due to a > merge or a rebase. The pull request now

Re: RFR: 8337279: Optimize format instant [v7]

2024-09-06 Thread Jens Lidestrom
On Tue, 27 Aug 2024 23:49:50 GMT, Shaojin Wen wrote: >> By removing the redundant code logic in >> DateTimeFormatterBuilder$InstantPrinterParser#formatTo, the codeSize can be >> reduced and the performance can be improved. > > Shaojin Wen has updated the pull request with a new target base due

Re: RFR: 8311530: Deprecate jdk.jsobject module for removal

2024-09-06 Thread Kevin Rushforth
On Fri, 6 Sep 2024 01:52:10 GMT, Roger Riggs wrote: > Looks good. I'll review the CSR when its ready. Thanks. > The changes to make jdk.jsobject an upgradeable module looks right. Thanks for checking. My testing primarily focused on this aspect of the change, so it's pretty well tested. > I

Re: RFR: 8339317: Optimize ClassFile writeBuffer [v7]

2024-09-06 Thread duke
On Thu, 5 Sep 2024 22:47:00 GMT, Shaojin Wen wrote: >> A small optimization, optimize the BufferWriter implementation and use of >> ClassFile, provide faster patchInt and skip > > Shaojin Wen has updated the pull request with a new target base due to a > merge or a rebase. The pull request now

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

2024-09-06 Thread Severin Gehwolf
On Fri, 30 Aug 2024 11:05:24 GMT, Matthias Baesken wrote: >> Severin Gehwolf 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 10 additional >> co

Re: RFR: 8317356: Test ClassFile API if it deals with nulls correctly across the whole API [v3]

2024-09-06 Thread Nizar Benalla
On Fri, 6 Sep 2024 09:14:18 GMT, Adam Sotona wrote: >> Nizar Benalla has updated the pull request incrementally with one additional >> commit since the last revision: >> >> convert TestNullHostile to use JUnit Jupiter API > > src/java.base/share/classes/java/lang/classfile/AnnotationValue.jav

Re: RFR: 8339642: Reduce overheads in InvokerBytecodeGenerator

2024-09-06 Thread Claes Redestad
On Fri, 6 Sep 2024 10:01:39 GMT, Claes Redestad wrote: > - A small portion (~5%) of the instrumented overhead when spinning MH/LF > classes in `InvokeBytecodeGenerator` comes from creating the exact same > `RuntimeVisibleAnnotationsAttribute` for every method. Introducing a couple > of constan

Integrated: 8339642: Reduce overheads in InvokerBytecodeGenerator

2024-09-06 Thread Claes Redestad
On Fri, 6 Sep 2024 10:01:39 GMT, Claes Redestad wrote: > - A small portion (~5%) of the instrumented overhead when spinning MH/LF > classes in `InvokeBytecodeGenerator` comes from creating the exact same > `RuntimeVisibleAnnotationsAttribute` for every method. Introducing a couple > of constan

Re: RFR: 8339317: Optimize ClassFile writeBuffer [v7]

2024-09-06 Thread Claes Redestad
On Thu, 5 Sep 2024 22:47:00 GMT, Shaojin Wen wrote: >> A small optimization, optimize the BufferWriter implementation and use of >> ClassFile, provide faster patchInt and skip > > Shaojin Wen has updated the pull request with a new target base due to a > merge or a rebase. The pull request now

Re: RFR: 8339640: Reduce construction overheads in StringConcatFactory$InlineHiddenClassStrategy [v2]

2024-09-06 Thread Claes Redestad
On Fri, 6 Sep 2024 12:06:25 GMT, Claes Redestad wrote: >> Using the trusted `invokeBasic` method streamlines invokers and avoids >> spinning up of some type conversion handles. This reduces classes generated >> in a few scalability stress tests. > > Claes Redestad has updated the pull request i

Integrated: 8339640: Reduce construction overheads in StringConcatFactory$InlineHiddenClassStrategy

2024-09-06 Thread Claes Redestad
On Fri, 6 Sep 2024 07:39:45 GMT, Claes Redestad wrote: > Using the trusted `invokeBasic` method streamlines invokers and avoids > spinning up of some type conversion handles. This reduces classes generated > in a few scalability stress tests. This pull request has now been integrated. Changes

Re: RFR: 8339642: Reduce overheads in InvokerBytecodeGenerator

2024-09-06 Thread Claes Redestad
On Fri, 6 Sep 2024 10:42:54 GMT, Shaojin Wen wrote: >> - A small portion (~5%) of the instrumented overhead when spinning MH/LF >> classes in `InvokeBytecodeGenerator` comes from creating the exact same >> `RuntimeVisibleAnnotationsAttribute` for every method. Introducing a couple >> of consta

Re: RFR: 8339631: Fix block @jls and @jvms tags [v2]

2024-09-06 Thread Pavel Rappo
On Fri, 6 Sep 2024 09:16:28 GMT, Pavel Rappo wrote: >> This fixes some of the recently discovered [issues] with the block variants >> of the specification tags. While reviewing, please check the proposed >> changes against the actual specifications. Since the specifications for JDK >> 23 are n

Re: RFR: 8339640: Reduce construction overheads in StringConcatFactory$InlineHiddenClassStrategy [v2]

2024-09-06 Thread Chen Liang
On Fri, 6 Sep 2024 12:06:25 GMT, Claes Redestad wrote: >> Using the trusted `invokeBasic` method streamlines invokers and avoids >> spinning up of some type conversion handles. This reduces classes generated >> in a few scalability stress tests. > > Claes Redestad has updated the pull request i

Re: RFR: 8338591: Improve performance of MemorySegment::copy

2024-09-06 Thread Per Minborg
On Tue, 3 Sep 2024 07:52:44 GMT, Per Minborg wrote: > This PR proposes to handle smaller FFM copy operations with Java code rather > than transitioning to native code. This will improve performance. In this PR, > copy operations involving zero to 63 bytes will be handled by Java code. > > Here

Integrated: 8339592: Simplify and remove unused code in ObjectMethods.

2024-09-06 Thread Claes Redestad
On Thu, 5 Sep 2024 08:19:44 GMT, Claes Redestad wrote: > A few trivial(?) cleanups to `java.lang.runtime.ObjectMethods`: > - Avoid `MethodType.fromMethodDescriptorString` which needs a classloader > - Use `MethodHandles.zero` > - Remove unused static `MethodHandles` and `MethodTypes` This pull r

Re: RFR: 8339592: Simplify and remove unused code in ObjectMethods.

2024-09-06 Thread Claes Redestad
On Thu, 5 Sep 2024 08:19:44 GMT, Claes Redestad wrote: > A few trivial(?) cleanups to `java.lang.runtime.ObjectMethods`: > - Avoid `MethodType.fromMethodDescriptorString` which needs a classloader > - Use `MethodHandles.zero` > - Remove unused static `MethodHandles` and `MethodTypes` Thanks! --

Re: RFR: 8339640: Reduce construction overheads in StringConcatFactory$InlineHiddenClassStrategy [v2]

2024-09-06 Thread Claes Redestad
On Fri, 6 Sep 2024 11:56:18 GMT, Chen Liang wrote: >> Claes Redestad has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Explicitly cast to Object > > src/java.base/share/classes/java/lang/invoke/StringConcatFactory.java line > 1257: > >>

Re: RFR: 8339640: Reduce construction overheads in StringConcatFactory$InlineHiddenClassStrategy [v2]

2024-09-06 Thread Claes Redestad
> Using the trusted `invokeBasic` method streamlines invokers and avoids > spinning up of some type conversion handles. This reduces classes generated > in a few scalability stress tests. Claes Redestad has updated the pull request incrementally with one additional commit since the last revisio

Integrated: 8339168: Optimize ClassFile Util slotSize

2024-09-06 Thread Shaojin Wen
On Wed, 28 Aug 2024 13:12:35 GMT, Shaojin Wen wrote: > A small optimization to improve the performance of > jdk.internal.classfile.impl.Util#slotSize/isDoubleSlot This pull request has now been integrated. Changeset: febbd998 Author:Shaojin Wen Committer: Chen Liang URL: https://g

Re: RFR: 8339168: Optimize ClassFile Util slotSize [v8]

2024-09-06 Thread Chen Liang
On Thu, 5 Sep 2024 05:07:12 GMT, Shaojin Wen wrote: >> A small optimization to improve the performance of >> jdk.internal.classfile.impl.Util#slotSize/isDoubleSlot > > Shaojin Wen has updated the pull request incrementally with one additional > commit since the last revision: > > remove benc

Re: RFR: 8339168: Optimize ClassFile Util slotSize [v8]

2024-09-06 Thread Claes Redestad
On Thu, 5 Sep 2024 05:07:12 GMT, Shaojin Wen wrote: >> A small optimization to improve the performance of >> jdk.internal.classfile.impl.Util#slotSize/isDoubleSlot > > Shaojin Wen has updated the pull request incrementally with one additional > commit since the last revision: > > remove benc

Re: RFR: 8339640: Reduce construction overheads in StringConcatFactory$InlineHiddenClassStrategy

2024-09-06 Thread Chen Liang
On Fri, 6 Sep 2024 07:39:45 GMT, Claes Redestad wrote: > Using the trusted `invokeBasic` method streamlines invokers and avoids > spinning up of some type conversion handles. This reduces classes generated > in a few scalability stress tests. src/java.base/share/classes/java/lang/invoke/String

Re: RFR: 8339168: Optimize ClassFile Util slotSize [v8]

2024-09-06 Thread duke
On Thu, 5 Sep 2024 05:07:12 GMT, Shaojin Wen wrote: >> A small optimization to improve the performance of >> jdk.internal.classfile.impl.Util#slotSize/isDoubleSlot > > Shaojin Wen has updated the pull request incrementally with one additional > commit since the last revision: > > remove benc

Re: RFR: 8339531: Improve performance of MemorySegment::mismatch [v10]

2024-09-06 Thread Per Minborg
> This PR proposes to improve the performance of `MemorySegment::mismatch` by > using Java code rather than transitioning to native code. Per Minborg has updated the pull request incrementally with one additional commit since the last revision: Use unaligned ops and rename benchmarks ---

Re: RFR: 8339642: Reduce overheads in InvokerBytecodeGenerator

2024-09-06 Thread Chen Liang
On Fri, 6 Sep 2024 10:01:39 GMT, Claes Redestad wrote: > - A small portion (~5%) of the instrumented overhead when spinning MH/LF > classes in `InvokeBytecodeGenerator` comes from creating the exact same > `RuntimeVisibleAnnotationsAttribute` for every method. Introducing a couple > of constan

Re: RFR: 8339576: Speed up raw bytecode processing in ClassFile API [v2]

2024-09-06 Thread Chen Liang
On Thu, 5 Sep 2024 15:39:07 GMT, Chen Liang wrote: >> Currently, raw bytecode access goes through multiple wrappers, include one >> from ClassFile API and another ByteBuffer for merged big endian value reads. >> We can merge the ByteBuffer =into the ClassFile API one (RawBytecodeHelper) >> for

Re: [External] : Re: [POTENTIAL BUG] Potential FIFO violation in BlockingQueue under high contention and suggestion for fair mode in ArrayBlockingQueue and LinkedBlockingQueue

2024-09-06 Thread Viktor Klang
Hi Kim, The recent updated to AQS reacquisition has to do with behavior if for some reason there's an exception thrown (think SOE or OOM, or something like that), so it isn't really applicable in this case. 1. The queue is full, and T2 is executing put() and is waiting in Condition.await()

Re: RFR: 8339642: Reduce overheads in InvokerBytecodeGenerator

2024-09-06 Thread Shaojin Wen
On Fri, 6 Sep 2024 10:01:39 GMT, Claes Redestad wrote: > - A small portion (~5%) of the instrumented overhead when spinning MH/LF > classes in `InvokeBytecodeGenerator` comes from creating the exact same > `RuntimeVisibleAnnotationsAttribute` for every method. Introducing a couple > of constan

Integrated: 8339576: Speed up raw bytecode processing in ClassFile API

2024-09-06 Thread Chen Liang
On Wed, 4 Sep 2024 22:41:38 GMT, Chen Liang wrote: > Currently, raw bytecode access goes through multiple wrappers, include one > from ClassFile API and another ByteBuffer for merged big endian value reads. > We can merge the ByteBuffer =into the ClassFile API one (RawBytecodeHelper) > for saf

Re: RFR: 8339642: Reduce overheads in InvokerBytecodeGenerator

2024-09-06 Thread Claes Redestad
On Fri, 6 Sep 2024 10:01:39 GMT, Claes Redestad wrote: > - A small portion (~5%) of the instrumented overhead when spinning MH/LF > classes in `InvokeBytecodeGenerator` comes from creating the exact same > `RuntimeVisibleAnnotationsAttribute` for every method. Introducing a couple > of constan

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

2024-09-06 Thread Matthias Baesken
On Wed, 4 Sep 2024 17:46:00 GMT, Severin Gehwolf wrote: >> 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 >> cg

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

2024-09-06 Thread Thomas Stuefe
On Thu, 29 Aug 2024 12:08:37 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 >>

Re: RFR: 8338890: Add monitoring/management interface for the virtual thread scheduler [v3]

2024-09-06 Thread Alan Bateman
On Fri, 6 Sep 2024 10:47:29 GMT, Kevin Walls wrote: > The ObjectName String "jdk.management:type=VirtualThreadScheduler" could have > a public static final definition somewhere in future, but there is no obvious > home, e.g. java.lang.management.ManagementFactory is in the wrong package. > Som

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

2024-09-06 Thread Severin Gehwolf
On Fri, 30 Aug 2024 11:05:24 GMT, Matthias Baesken wrote: >> Severin Gehwolf 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 10 additional >> co

Re: RFR: 8338890: Add monitoring/management interface for the virtual thread scheduler [v3]

2024-09-06 Thread Kevin Walls
On Thu, 5 Sep 2024 17:54:46 GMT, Alan Bateman wrote: >> This PR proposes to add a JDK-specific monitoring and management interface >> for the virtual thread scheduler. The interface is named >> [VirtualThreadSchedulerMXBean](https://download.java.net/java/early_access/loom/docs/api/jdk.manageme

Re: RFR: 8339487: ProcessHandleImpl os_getChildren sysctl call - retry in case of ENOMEM and enhance exception message [v3]

2024-09-06 Thread Alan Bateman
On Fri, 6 Sep 2024 08:15:25 GMT, Matthias Baesken wrote: > Hi Alan, at a lot (but not all) of places ( ProcessHandleImpl_macosx.c , also > os_bsd.cpp) we test the sysctl result for < 0; maybe there was a good reason > for this ? Okay, let's go with what you have. - PR Review Comm

Re: RFR: 8339487: ProcessHandleImpl os_getChildren sysctl call - retry in case of ENOMEM and enhance exception message [v3]

2024-09-06 Thread Alan Bateman
On Fri, 6 Sep 2024 07:05:22 GMT, Matthias Baesken wrote: >> When running jtreg test java/lang/ProcessHandle/PermissionTest.java on >> macOS, a few times this error occurs : >> >> java.lang.RuntimeException: Cannot allocate memory >>at java.base/java.lang.ProcessHandleImpl.getProcessPids

RFR: 8339642: Reduce overheads in InvokerBytecodeGenerator

2024-09-06 Thread Claes Redestad
- A small portion (~5%) of the instrumented overhead when spinning MH/LF classes in `InvokeBytecodeGenerator` comes from creating the exact same `RuntimeVisibleAnnotationsAttribute` for every method. Introducing a couple of constants has a small but measurable impact. - `classDesc(MemberName.cla

Re: RFR: 8317356: Test ClassFile API if it deals with nulls correctly across the whole API [v3]

2024-09-06 Thread Adam Sotona
On Thu, 5 Sep 2024 08:49:14 GMT, Nizar Benalla wrote: >> The test is inspired from [FFM API's >> TestNulls](https://github.com/openjdk/jdk/blob/master/test/jdk/java/foreign/TestNulls.java), >> I customized their Null checking framework it to work with ClassFile API. >> >> The framework for for

Re: RFR: 8339631: Fix block @jls and @jvms tags [v2]

2024-09-06 Thread Pavel Rappo
> This fixes some of the recently discovered [issues] with the block variants > of the specification tags. While reviewing, please check the proposed changes > against the actual specifications. Since the specifications for JDK 23 are > not yet available in the HTML format, you can use the speci

Re: RFR: 8337422: spelling error in jlink documentation

2024-09-06 Thread Alan Bateman
On Fri, 6 Sep 2024 06:26:47 GMT, Athijegannathan Sundararajan wrote: > fixed spelling to be consistent with the rest of the man page. I checked the OED and it does seem to be uncountable, which makes me wonder about other places, e.g. JLS 7.7.1. - PR Comment: https://git.openjdk.

Re: RFR: 8337422: spelling error in jlink documentation

2024-09-06 Thread Pavel Rappo
On Fri, 6 Sep 2024 06:26:47 GMT, Athijegannathan Sundararajan wrote: > fixed spelling to be consistent with the rest of the man page. I'm not an expert here, but I remember vividly that "dependence" might not be a misspelling/typo in the world of modules. There are semantic differences which

Re: RFR: 8339487: ProcessHandleImpl native exceptions - include message text and last error information [v3]

2024-09-06 Thread Matthias Baesken
On Fri, 6 Sep 2024 07:55:34 GMT, Alan Bateman wrote: >> Matthias Baesken has updated the pull request incrementally with one >> additional commit since the last revision: >> >> check for ENOMEM > > src/java.base/macosx/native/libjava/ProcessHandleImpl_macosx.c line 128: > >> 126: if (err

Re: RFR: 8339640: Reduce construction overheads in StringConcatFactory$InlineHiddenClassStrategy

2024-09-06 Thread Claes Redestad
On Fri, 6 Sep 2024 07:39:45 GMT, Claes Redestad wrote: > Using the trusted `invokeBasic` method streamlines invokers and avoids > spinning up of some type conversion handles. This reduces classes generated > in a few scalability stress tests. In the Strings stress test generated by https://cl

  1   2   >