Re: RFR: 8329138: Convert JFR FileForceEvent to static mirror event [v2]

2024-04-15 Thread Alan Bateman
On Mon, 15 Apr 2024 20:39:26 GMT, Tim Prinzing wrote: >> test/jdk/jdk/jfr/event/io/TestAsynchronousFileChannelEvents.java line 64: >> >>> 62: >>> 63: data.flip(); >>> 64: ch.write(data, 0); >> >> This just initiates the write operation, it doesn't wait until it complete

Re: RFR: 8329581: Java launcher no longer prints a stack trace

2024-04-15 Thread Alan Bateman
On Mon, 15 Apr 2024 18:25:02 GMT, Sonia Zaldana Calles wrote: > Hi folks, > > This PR aims to fix > [JDK-8329581](https://bugs.openjdk.org/browse/JDK-8329581). > > I think the regression got introduced in > [JDK-8315458](https://bugs.openjdk.org/browse/JDK-8315458). > > In the issue link

Re: RFR: 8212895: ChronoField.INSTANT_SECONDS's range doesn't match the range of Instant [v3]

2024-04-15 Thread Jaikiran Pai
On Wed, 10 Apr 2024 16:17:32 GMT, Jaikiran Pai wrote: >> Can I please get a review of this change which proposes to fix the issue >> noted in https://bugs.openjdk.org/browse/JDK-8212895? >> >> As noted in that issue, the `ChronoField.INSTANT_SECONDS` currently is >> initialized to have a minim

Re: RFR: 8329331: Intrinsify Unsafe::setMemory [v21]

2024-04-15 Thread Sandhya Viswanathan
On Tue, 16 Apr 2024 00:04:15 GMT, Scott Gibbons wrote: >> This code makes an intrinsic stub for `Unsafe::setMemory` for x86_64. See >> [this PR](https://github.com/openjdk/jdk/pull/16760) for discussion around >> this change. >> >> Overall, making this an intrinsic improves overall performanc

Re: RFR: 8329581: Java launcher no longer prints a stack trace

2024-04-15 Thread wolfseifert
On Mon, 15 Apr 2024 18:25:02 GMT, Sonia Zaldana Calles wrote: > Hi folks, > > This PR aims to fix > [JDK-8329581](https://bugs.openjdk.org/browse/JDK-8329581). > > I think the regression got introduced in > [JDK-8315458](https://bugs.openjdk.org/browse/JDK-8315458). > > In the issue link

Re: RFR: 8329538: Accelerate P256 on x86_64 using Montgomery intrinsic [v2]

2024-04-15 Thread Jatin Bhateja
On Mon, 15 Apr 2024 22:04:14 GMT, Volodymyr Paprotski wrote: >> src/hotspot/cpu/x86/stubGenerator_x86_64_poly_mont.cpp line 394: >> >>> 392: __ lea(aLimbs, Address(aLimbs,8)); >>> 393: __ lea(bLimbs, Address(bLimbs,8)); >>> 394: __ jmp(L_DefaultLoop); >> >> Both sub and cmp are flag affec

Re: RFR: 8329138: Convert JFR FileForceEvent to static mirror event [v4]

2024-04-15 Thread Tim Prinzing
> Currently the JFR event FileForceEvent is generated by instrumenting the > sun.nio.ch.FileChannelImpl class. This needs to be changed to use the newer > mirror events with static methods. > > Added the event at jdk.internal.event.FileForceEvent, and changed > jdk.jfr.events.FileForceEvent to

Re: RFR: 8329331: Intrinsify Unsafe::setMemory [v21]

2024-04-15 Thread Scott Gibbons
> This code makes an intrinsic stub for `Unsafe::setMemory` for x86_64. See > [this PR](https://github.com/openjdk/jdk/pull/16760) for discussion around > this change. > > Overall, making this an intrinsic improves overall performance of > `Unsafe::setMemory` by up to 4x for all buffer sizes.

Re: RFR: 8329581: Java launcher no longer prints a stack trace

2024-04-15 Thread Mandy Chung
On Mon, 15 Apr 2024 18:25:02 GMT, Sonia Zaldana Calles wrote: > Hi folks, > > This PR aims to fix > [JDK-8329581](https://bugs.openjdk.org/browse/JDK-8329581). > > I think the regression got introduced in > [JDK-8315458](https://bugs.openjdk.org/browse/JDK-8315458). > > In the issue link

Re: RFR: 8329331: Intrinsify Unsafe::setMemory [v20]

2024-04-15 Thread Scott Gibbons
On Mon, 15 Apr 2024 23:06:11 GMT, Sandhya Viswanathan wrote: >> `_WIN32` is also defined for 64 bit Windows > > Thanks, I missed that. I'm changing the scheme here to c_rargX, so no need for any windows-specific stuff. I added it when I needed 4 scratch registers. - PR Review Co

Re: RFR: 8329331: Intrinsify Unsafe::setMemory [v20]

2024-04-15 Thread Sandhya Viswanathan
On Mon, 15 Apr 2024 23:01:21 GMT, Jorn Vernee wrote: >> src/hotspot/cpu/x86/stubGenerator_x86_64_arraycopy.cpp line 2686: >> >>> 2684: __ movq(rdx, rsi); >>> 2685: restore_arg_regs(); >>> 2686: #endif >> >> This is stubGenerator_x86_64.cpp 64bit specific, so WIN32 portion could be

Re: RFR: 8329331: Intrinsify Unsafe::setMemory [v20]

2024-04-15 Thread Jorn Vernee
On Mon, 15 Apr 2024 22:22:38 GMT, Sandhya Viswanathan wrote: >> Scott Gibbons has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Fix memory mark after sync to upstream > > src/hotspot/cpu/x86/stubGenerator_x86_64_arraycopy.cpp line 2686: >

Re: RFR: 8329331: Intrinsify Unsafe::setMemory [v14]

2024-04-15 Thread Sandhya Viswanathan
On Fri, 12 Apr 2024 16:47:58 GMT, Scott Gibbons wrote: >> This code makes an intrinsic stub for `Unsafe::setMemory` for x86_64. See >> [this PR](https://github.com/openjdk/jdk/pull/16760) for discussion around >> this change. >> >> Overall, making this an intrinsic improves overall performanc

Re: RFR: 8329331: Intrinsify Unsafe::setMemory [v20]

2024-04-15 Thread Sandhya Viswanathan
On Mon, 15 Apr 2024 18:43:24 GMT, Scott Gibbons wrote: >> This code makes an intrinsic stub for `Unsafe::setMemory` for x86_64. See >> [this PR](https://github.com/openjdk/jdk/pull/16760) for discussion around >> this change. >> >> Overall, making this an intrinsic improves overall performanc

Re: RFR: 8322256: Define and document GZIPInputStream concatenated stream semantics [v4]

2024-04-15 Thread Archie Cobbs
> `GZIPInputStream` supports reading data from multiple concatenated GZIP data > streams since [JDK-4691425](https://bugs.openjdk.org/browse/JDK-4691425). In > order to do this, after a GZIP trailer frame is read, it attempts to read a > GZIP header frame and, if successful, proceeds onward to d

Re: RFR: 8329538: Accelerate P256 on x86_64 using Montgomery intrinsic [v2]

2024-04-15 Thread Volodymyr Paprotski
On Fri, 5 Apr 2024 07:19:28 GMT, Jatin Bhateja wrote: >> Volodymyr Paprotski has updated the pull request incrementally with one >> additional commit since the last revision: >> >> remove use of jdk.crypto.ec > > src/hotspot/cpu/x86/stubGenerator_x86_64_poly_mont.cpp line 39: > >> 37: }; >>

Re: RFR: 8329538: Accelerate P256 on x86_64 using Montgomery intrinsic [v2]

2024-04-15 Thread Volodymyr Paprotski
On Wed, 10 Apr 2024 23:56:52 GMT, Volodymyr Paprotski wrote: > Few early comments. > > Please update the copyright year of all the modified files. > > You can even consider splitting this into two patches, Java side changes in > one and x86 optimized intrinsic in next one. Fixed all copyright

Re: RFR: 8329538: Accelerate P256 on x86_64 using Montgomery intrinsic [v2]

2024-04-15 Thread Volodymyr Paprotski
On Thu, 11 Apr 2024 17:15:21 GMT, Anthony Scarpino wrote: >>> In `ECOperations.java`, if I understand this correctly, it is to replace >>> the existing `PointMultiplier` with montgomery-based PointMuliplier. But >>> when I look at the code, I see both are still options. If I read this >>> cor

Re: RFR: 8329538: Accelerate P256 on x86_64 using Montgomery intrinsic [v3]

2024-04-15 Thread Volodymyr Paprotski
> Performance. Before: > > Benchmark(algorithm) (dataSize) (keyLength) > (provider) Mode Cnt ScoreError Units > SignatureBench.ECDSA.signSHA256withECDSA1024 256 > thrpt3 6443.934 ± 6.491 ops/s > SignatureBench.ECDSA.

Re: RFR: 8310994: Add JFR event for selection operations [v7]

2024-04-15 Thread Tim Prinzing
> Added mirror event with static methods: jdk.internal.event.SelectionEvent > that provides the duration of select calls and the count of how many keys are > available. > > Emit the event from SelectorImpl::lockAndDoSelect > > Test at jdk.jfr.event.io.TestSelectionEvents Tim Prinzing has updat

Re: RFR: 8324651: Compiler Implementation for Derived Record Creation (Preview) [v10]

2024-04-15 Thread Vicente Romero
On Tue, 9 Apr 2024 09:28:23 GMT, Jan Lahoda wrote: >> This is a patch for javac, that adds the Derived Record Creation >> expressions. The current draft specification for the feature is: >> https://cr.openjdk.org/~gbierman/jep468/jep468-20240326/specs/derived-record-creation-jls.html >> >> The

Re: RFR: 8329948: Remove string template feature [v5]

2024-04-15 Thread Andrey Kuleshov
On Thu, 11 Apr 2024 10:15:54 GMT, Maurizio Cimadamore wrote: >> This PR removes support for the string template feature from the Java >> compiler and the Java SE API, as discussed here: >> >> https://mail.openjdk.org/pipermail/amber-spec-experts/2024-April/004106.html > > Maurizio Cimadamore h

RFR: 8329581: Java launcher no longer prints a stack trace

2024-04-15 Thread Sonia Zaldana Calles
Hi folks, This PR aims to fix [JDK-8329581](https://bugs.openjdk.org/browse/JDK-8329581). I think the regression got introduced in [JDK-8315458](https://bugs.openjdk.org/browse/JDK-8315458). In the issue linked above, [LauncherHelper#getMainType](https://github.com/openjdk/jdk/pull/16461/fi

Re: RFR: 8329138: Convert JFR FileForceEvent to static mirror event [v2]

2024-04-15 Thread Tim Prinzing
On Tue, 2 Apr 2024 04:48:37 GMT, Alan Bateman wrote: >> Tim Prinzing has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Add support for AsynchronousFileChannel.force(). > > src/java.base/share/classes/jdk/internal/event/FileForceEvent.java

Re: RFR: 8329138: Convert JFR FileForceEvent to static mirror event [v3]

2024-04-15 Thread Tim Prinzing
> Currently the JFR event FileForceEvent is generated by instrumenting the > sun.nio.ch.FileChannelImpl class. This needs to be changed to use the newer > mirror events with static methods. > > Added the event at jdk.internal.event.FileForceEvent, and changed > jdk.jfr.events.FileForceEvent to

Re: RFR: 8330182: Start of release updates for JDK 24

2024-04-15 Thread Joe Darcy
On Mon, 15 Apr 2024 19:57:49 GMT, Iris Clark wrote: > The copyright year was not updated in all files *14.java. I assume that's > intentional. I'll run my copyright update script before pushing. > I've also Reviewed the associated CSRs. Thanks. > make/conf/version-numbers.conf line 36: > >>

Re: RFR: 8330279: Typo in `java.text.Bidi` class description

2024-04-15 Thread Joe Wang
On Mon, 15 Apr 2024 19:39:41 GMT, Naoto Sato wrote: > Fixing a typo in the javadoc Marked as reviewed by joehw (Reviewer). - PR Review: https://git.openjdk.org/jdk/pull/18788#pullrequestreview-2002045355

Re: RFR: 8330279: Typo in `java.text.Bidi` class description

2024-04-15 Thread Iris Clark
On Mon, 15 Apr 2024 19:39:41 GMT, Naoto Sato wrote: > Fixing a typo in the javadoc Marked as reviewed by iris (Reviewer). - PR Review: https://git.openjdk.org/jdk/pull/18788#pullrequestreview-2002041316

Re: RFR: 8330182: Start of release updates for JDK 24

2024-04-15 Thread Iris Clark
On Mon, 15 Apr 2024 19:01:08 GMT, Joe Darcy wrote: > Get JDK 24 underway. The copyright year was not updated in all files *14.java. I assume that's intentional. I've also Reviewed the associated CSRs. make/conf/version-numbers.conf line 36: > 34: DEFAULT_VERSION_EXTRA2=0 > 35: DEFAULT_VER

RFR: 8330279: Typo in `java.text.Bidi` class description

2024-04-15 Thread Naoto Sato
Fixing a typo in the javadoc - Commit messages: - initial commit Changes: https://git.openjdk.org/jdk/pull/18788/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=18788&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8330279 Stats: 2 lines in 1 file changed: 0 ins; 0

Re: RFR: 8330182: Start of release updates for JDK 24

2024-04-15 Thread Joe Darcy
On Mon, 15 Apr 2024 19:01:08 GMT, Joe Darcy wrote: > Get JDK 24 underway. This initial version of the PR intentionally excludes the creation of the new symbol files so that the fundamental code aspects of the update are easier to see. - PR Comment: https://git.openjdk.org/jdk/pul

RFR: 8330182: Start of release updates for JDK 24

2024-04-15 Thread Joe Darcy
Get JDK 24 underway. - Commit messages: - JDK-8330182: Start of release updates for JDK 24 Changes: https://git.openjdk.org/jdk/pull/18787/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=18787&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8330182 Stats: 101 lines

Re: RFR: 8329222: java.text.NumberFormat (and subclasses) spec updates

2024-04-15 Thread Naoto Sato
On Wed, 10 Apr 2024 20:16:50 GMT, Justin Lu wrote: > Please review this PR which is a large spec reformatting for > _java.text.NumberFormat_ and related subclasses, specifically DecimalFormat > and CompactNumberFormat. > > The motivation for this change was the difficulty of readability for th

Re: RFR: 8329331: Intrinsify Unsafe::setMemory [v20]

2024-04-15 Thread Scott Gibbons
> This code makes an intrinsic stub for `Unsafe::setMemory` for x86_64. See > [this PR](https://github.com/openjdk/jdk/pull/16760) for discussion around > this change. > > Overall, making this an intrinsic improves overall performance of > `Unsafe::setMemory` by up to 4x for all buffer sizes.

Re: RFR: 8329331: Intrinsify Unsafe::setMemory [v19]

2024-04-15 Thread Scott Gibbons
> This code makes an intrinsic stub for `Unsafe::setMemory` for x86_64. See > [this PR](https://github.com/openjdk/jdk/pull/16760) for discussion around > this change. > > Overall, making this an intrinsic improves overall performance of > `Unsafe::setMemory` by up to 4x for all buffer sizes.

Re: RFR: 8319516: AIX System::loadLibrary needs support to load a shared library from an archive object [v27]

2024-04-15 Thread Martin Doerr
On Mon, 15 Apr 2024 16:10:38 GMT, Suchismith Roy wrote: >> Allow support for both .a and .so files in AIX. >> If .so file is not found, allow fallback to .a extension. >> JBS Issue: [JDK-8319516](https://bugs.openjdk.org/browse/JDK-8319516) > > Suchismith Roy has updated the pull request incremen

Re: RFR: 8319516: AIX System::loadLibrary needs support to load a shared library from an archive object [v25]

2024-04-15 Thread Martin Doerr
On Mon, 15 Apr 2024 16:07:14 GMT, Suchismith Roy wrote: >> test/jdk/java/lang/RuntimeTests/loadLibrary/aix/LoadAIXLibraryFromArchiveObject.java >> line 71: >> >>> 69: } >>> 70: } >>> 71: } >> >> I think files typically have a newline at the end. > > In ClassLoader i didnt see it. P

Re: RFR: 8319516: AIX System::loadLibrary needs support to load a shared library from an archive object [v27]

2024-04-15 Thread Mandy Chung
On Mon, 15 Apr 2024 16:10:38 GMT, Suchismith Roy wrote: >> Allow support for both .a and .so files in AIX. >> If .so file is not found, allow fallback to .a extension. >> JBS Issue: [JDK-8319516](https://bugs.openjdk.org/browse/JDK-8319516) > > Suchismith Roy has updated the pull request incremen

Re: RFR: 8329331: Intrinsify Unsafe::setMemory [v18]

2024-04-15 Thread Scott Gibbons
> This code makes an intrinsic stub for `Unsafe::setMemory` for x86_64. See > [this PR](https://github.com/openjdk/jdk/pull/16760) for discussion around > this change. > > Overall, making this an intrinsic improves overall performance of > `Unsafe::setMemory` by up to 4x for all buffer sizes.

Re: RFR: 8329331: Intrinsify Unsafe::setMemory [v17]

2024-04-15 Thread Scott Gibbons
> This code makes an intrinsic stub for `Unsafe::setMemory` for x86_64. See > [this PR](https://github.com/openjdk/jdk/pull/16760) for discussion around > this change. > > Overall, making this an intrinsic improves overall performance of > `Unsafe::setMemory` by up to 4x for all buffer sizes.

Re: RFR: 8329331: Intrinsify Unsafe::setMemory [v16]

2024-04-15 Thread Scott Gibbons
> This code makes an intrinsic stub for `Unsafe::setMemory` for x86_64. See > [this PR](https://github.com/openjdk/jdk/pull/16760) for discussion around > this change. > > Overall, making this an intrinsic improves overall performance of > `Unsafe::setMemory` by up to 4x for all buffer sizes.

Re: RFR: 8329222: java.text.NumberFormat (and subclasses) spec updates

2024-04-15 Thread Naoto Sato
On Wed, 10 Apr 2024 20:16:50 GMT, Justin Lu wrote: > Please review this PR which is a large spec reformatting for > _java.text.NumberFormat_ and related subclasses, specifically DecimalFormat > and CompactNumberFormat. > > The motivation for this change was the difficulty of readability for th

Re: RFR: 8329997: Add provisions for checking memory segment alignment constraints [v3]

2024-04-15 Thread Jorn Vernee
On Mon, 15 Apr 2024 14:21:23 GMT, Per Minborg wrote: >> This PR proposes to add a new method `MemorySegment::maxByteAlignment` that >> returns the maximum byte alignment of a segment (both heap and native >> segments). >> >> Clients can then use this method to determine if a segment is properl

Re: RFR: 8196106: Support nested infinite or recursive flat mapped streams [v8]

2024-04-15 Thread Paul Sandoz
On Sat, 13 Apr 2024 14:27:12 GMT, Viktor Klang wrote: >> This PR implements Gatherer-inspired encoding of `flatMap` that shows that >> it is both competitive performance-wise as well as improve correctness. >> >> Below is the performance of `Stream::flatMap` (for reference types): >> >> Before

Re: RFR: 8319516: AIX System::loadLibrary needs support to load a shared library from an archive object [v25]

2024-04-15 Thread Suchismith Roy
On Mon, 15 Apr 2024 14:06:54 GMT, Martin Doerr wrote: >> Suchismith Roy has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Files copy > > test/jdk/java/lang/RuntimeTests/loadLibrary/aix/LoadAIXLibraryFromArchiveObject.java > line 71: > >>

Re: RFR: 8319516: AIX System::loadLibrary needs support to load a shared library from an archive object [v13]

2024-04-15 Thread Suchismith Roy
On Mon, 15 Apr 2024 14:05:24 GMT, Martin Doerr wrote: >> src/java.base/aix/classes/jdk/internal/loader/ClassLoaderHelper.java line 40: >> >>> 38: * This method returns false so that loading of shared library >>> continues if >>> 39: * libname.so is not present. >>> 40: */ >> >> The

Re: RFR: 8314592: Add shortcut to SymbolLookup::find [v4]

2024-04-15 Thread Jorn Vernee
On Mon, 15 Apr 2024 14:02:56 GMT, Per Minborg wrote: >> While `SymbolLookup` correctly uses an `Optional` return to denote whether a >> symbol has been found by the lookup or not (which enables composition of >> symbol lookups), many clients end up just calling `Optional::get`, or >> `Optional

Re: RFR: 8319516: AIX System::loadLibrary needs support to load a shared library from an archive object [v27]

2024-04-15 Thread Suchismith Roy
> Allow support for both .a and .so files in AIX. > If .so file is not found, allow fallback to .a extension. > JBS Issue: [JDK-8319516](https://bugs.openjdk.org/browse/JDK-8319516) Suchismith Roy has updated the pull request incrementally with three additional commits since the last revision:

Re: RFR: 8329420: Java 22 (and 23) launcher calls default constructor although main() is static [v2]

2024-04-15 Thread wolfseifert
On Mon, 15 Apr 2024 07:36:05 GMT, Jan Lahoda wrote: >> Consider code like: >> >> public class MainClass { >> public MainClass() { >> System.out.println("Constructor called!"); >> } >> public static void main() { >> System.out.println("main called!"); >> } >> } >>

Re: RFR: 8319516: AIX System::loadLibrary needs support to load a shared library from an archive object [v26]

2024-04-15 Thread Suchismith Roy
> Allow support for both .a and .so files in AIX. > If .so file is not found, allow fallback to .a extension. > JBS Issue: [JDK-8319516](https://bugs.openjdk.org/browse/JDK-8319516) Suchismith Roy has updated the pull request incrementally with one additional commit since the last revision: co

Re: RFR: 8319516: AIX System::loadLibrary needs support to load a shared library from an archive object [v25]

2024-04-15 Thread Suchismith Roy
On Mon, 15 Apr 2024 14:48:54 GMT, Magnus Ihse Bursie wrote: >> Suchismith Roy has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Files copy > > src/java.base/aix/classes/jdk/internal/loader/ClassLoaderHelper.java line 42: > >> 40: */ >

Integrated: 8330196: Make java/lang/invoke/defineHiddenClass/BasicTest release agnostic

2024-04-15 Thread Joe Darcy
On Fri, 12 Apr 2024 23:55:01 GMT, Joe Darcy wrote: > Straightforward test update so it doesn't have to be trivially updated for > each JDK version. This pull request has now been integrated. Changeset: da75e015 Author:Joe Darcy URL: https://git.openjdk.org/jdk/commit/da75e015b54f4f

Re: RFR: 8327247: C2 uses up to 2GB of RAM to compile complex string concat in extreme cases [v4]

2024-04-15 Thread Claes Redestad
> This patch suggests a workaround to an issue with huge SCF MH expression > trees taking excessive JIT compilation resources by reviving (part of) the > simple bytecode-generating strategy that was originally available as an > all-or-nothing strategy choice. > > Instead of reintroducing a bin

Re: RFR: 8319516: AIX System::loadLibrary needs support to load a shared library from an archive object [v25]

2024-04-15 Thread Magnus Ihse Bursie
On Mon, 15 Apr 2024 13:23:22 GMT, Suchismith Roy wrote: >> Allow support for both .a and .so files in AIX. >> If .so file is not found, allow fallback to .a extension. >> JBS Issue: [JDK-8319516](https://bugs.openjdk.org/browse/JDK-8319516) > > Suchismith Roy has updated the pull request incremen

Re: RFR: 8314592: Add shortcut to SymbolLookup::find [v4]

2024-04-15 Thread Maurizio Cimadamore
On Mon, 15 Apr 2024 14:02:56 GMT, Per Minborg wrote: >> While `SymbolLookup` correctly uses an `Optional` return to denote whether a >> symbol has been found by the lookup or not (which enables composition of >> symbol lookups), many clients end up just calling `Optional::get`, or >> `Optional

Re: RFR: 8329997: Add provisions for checking memory segment alignment constraints [v3]

2024-04-15 Thread Maurizio Cimadamore
On Mon, 15 Apr 2024 14:39:02 GMT, Maurizio Cimadamore wrote: >> Per Minborg 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 ten additional >> c

Re: RFR: 8329997: Add provisions for checking memory segment alignment constraints [v3]

2024-04-15 Thread Maurizio Cimadamore
On Mon, 15 Apr 2024 14:21:23 GMT, Per Minborg wrote: >> This PR proposes to add a new method `MemorySegment::maxByteAlignment` that >> returns the maximum byte alignment of a segment (both heap and native >> segments). >> >> Clients can then use this method to determine if a segment is properl

Re: RFR: 8327247: C2 uses up to 2GB of RAM to compile complex string concat in extreme cases [v3]

2024-04-15 Thread Claes Redestad
On Fri, 12 Apr 2024 15:06:36 GMT, Chen Liang wrote: >> I'd prefer considering such optimizations as follow-ups. We need to think >> about where to define such shared classes in a way that considers the full >> lifecycle, facilitates class unloading (one cache per classloader?) while >> still g

Re: RFR: 8329331: Intrinsify Unsafe::setMemory [v15]

2024-04-15 Thread Scott Gibbons
> This code makes an intrinsic stub for `Unsafe::setMemory` for x86_64. See > [this PR](https://github.com/openjdk/jdk/pull/16760) for discussion around > this change. > > Overall, making this an intrinsic improves overall performance of > `Unsafe::setMemory` by up to 4x for all buffer sizes.

Re: RFR: 8329997: Add provisions for checking memory segment alignment constraints [v3]

2024-04-15 Thread Per Minborg
> This PR proposes to add a new method `MemorySegment::maxByteAlignment` that > returns the maximum byte alignment of a segment (both heap and native > segments). > > Clients can then use this method to determine if a segment is properly > aligned for any given layout (e.g. following a `MemoryS

Re: RFR: 8323058: Revisit j.l.classfile.CodeBuilder API surface [v6]

2024-04-15 Thread Adam Sotona
> `java.lang.classfile.CodeBuilder` contains more than 230 API methods. > Existing ClassFile API use cases proved the concept one big CodeBuilder is > comfortable. However there are some redundancies, glitches in the naming > conventions, some frequently used methods are hard to find and some met

Re: RFR: 8319516: AIX System::loadLibrary needs support to load a shared library from an archive object [v13]

2024-04-15 Thread Martin Doerr
On Mon, 8 Apr 2024 10:27:40 GMT, Martin Doerr wrote: >> Suchismith Roy has updated the pull request incrementally with three >> additional commits since the last revision: >> >> - update tests >> - update tests >> - update tests > > src/java.base/aix/classes/jdk/internal/loader/ClassLoaderHe

Re: RFR: 8319516: AIX System::loadLibrary needs support to load a shared library from an archive object [v25]

2024-04-15 Thread Martin Doerr
On Mon, 15 Apr 2024 13:23:22 GMT, Suchismith Roy wrote: >> Allow support for both .a and .so files in AIX. >> If .so file is not found, allow fallback to .a extension. >> JBS Issue: [JDK-8319516](https://bugs.openjdk.org/browse/JDK-8319516) > > Suchismith Roy has updated the pull request incremen

Re: RFR: 8314592: Add shortcut to SymbolLookup::find [v4]

2024-04-15 Thread Per Minborg
> While `SymbolLookup` correctly uses an `Optional` return to denote whether a > symbol has been found by the lookup or not (which enables composition of > symbol lookups), many clients end up just calling `Optional::get`, or > `Optional::orElseThrow()` on the result. > > This PR proposes to ad

Re: RFR: 8319516: AIX System::loadLibrary needs support to load a shared library from an archive object [v25]

2024-04-15 Thread Jaikiran Pai
On Mon, 15 Apr 2024 13:23:22 GMT, Suchismith Roy wrote: >> Allow support for both .a and .so files in AIX. >> If .so file is not found, allow fallback to .a extension. >> JBS Issue: [JDK-8319516](https://bugs.openjdk.org/browse/JDK-8319516) > > Suchismith Roy has updated the pull request incremen

Re: RFR: 8319516: AIX System::loadLibrary needs support to load a shared library from an archive object [v25]

2024-04-15 Thread Suchismith Roy
On Mon, 15 Apr 2024 13:36:17 GMT, Jaikiran Pai wrote: > The test seems to be working fine then based on the output you noted. It > catches the issue (by failing) when the source change proposed in this PR is > absent and then verifies the change works as expected (by passing). Yes. Passes whe

Re: RFR: 8314592: Add shortcut to SymbolLookup::find [v3]

2024-04-15 Thread Maurizio Cimadamore
On Mon, 15 Apr 2024 13:48:09 GMT, Per Minborg wrote: >> While `SymbolLookup` correctly uses an `Optional` return to denote whether a >> symbol has been found by the lookup or not (which enables composition of >> symbol lookups), many clients end up just calling `Optional::get`, or >> `Optional

Re: RFR: 8314592: Add shortcut to SymbolLookup::find [v3]

2024-04-15 Thread Per Minborg
> While `SymbolLookup` correctly uses an `Optional` return to denote whether a > symbol has been found by the lookup or not (which enables composition of > symbol lookups), many clients end up just calling `Optional::get`, or > `Optional::orElseThrow()` on the result. > > This PR proposes to ad

Re: RFR: 8319516: AIX System::loadLibrary needs support to load a shared library from an archive object [v25]

2024-04-15 Thread Jaikiran Pai
On Mon, 15 Apr 2024 13:23:22 GMT, Suchismith Roy wrote: >> Allow support for both .a and .so files in AIX. >> If .so file is not found, allow fallback to .a extension. >> JBS Issue: [JDK-8319516](https://bugs.openjdk.org/browse/JDK-8319516) > > Suchismith Roy has updated the pull request incremen

Re: RFR: 8319516: AIX System::loadLibrary needs support to load a shared library from an archive object [v22]

2024-04-15 Thread Suchismith Roy
On Mon, 15 Apr 2024 13:00:57 GMT, Jaikiran Pai wrote: > > Thanks. I tried with a different shared object. > > If you undo the changes that are being proposed in this PR in the > `src/java.base/aix/classes/jdk/internal/loader/ClassLoaderHelper.java` class > (only undo that class changes), then

Re: RFR: 8319516: AIX System::loadLibrary needs support to load a shared library from an archive object [v25]

2024-04-15 Thread Suchismith Roy
> Allow support for both .a and .so files in AIX. > If .so file is not found, allow fallback to .a extension. > JBS Issue: [JDK-8319516](https://bugs.openjdk.org/browse/JDK-8319516) Suchismith Roy has updated the pull request incrementally with one additional commit since the last revision: Fi

Re: RFR: 8329997: Add provisions for checking memory segment alignment constraints [v2]

2024-04-15 Thread Maurizio Cimadamore
On Mon, 15 Apr 2024 13:17:26 GMT, Per Minborg wrote: >> test/jdk/java/foreign/TestMemoryAlignment.java line 154: >> >>> 152: Arena arena = Arena.ofConfined()) { >>> 153: var segment =channel.map(FileChannel.MapMode.READ_WRITE, >>> 0L, 32L, arena); >>> 154: a

Re: RFR: 8329997: Add provisions for checking memory segment alignment constraints [v2]

2024-04-15 Thread Per Minborg
On Mon, 15 Apr 2024 10:16:30 GMT, Maurizio Cimadamore wrote: >> Per Minborg has updated the pull request incrementally with three additional >> commits since the last revision: >> >> - Update >> src/java.base/share/classes/jdk/internal/foreign/HeapMemorySegmentImpl.java >> >>Co-autho

Re: RFR: 8319516: AIX System::loadLibrary needs support to load a shared library from an archive object [v24]

2024-04-15 Thread Suchismith Roy
> Allow support for both .a and .so files in AIX. > If .so file is not found, allow fallback to .a extension. > JBS Issue: [JDK-8319516](https://bugs.openjdk.org/browse/JDK-8319516) Suchismith Roy has updated the pull request incrementally with one additional commit since the last revision: Fi

Re: RFR: 8329997: Add provisions for checking memory segment alignment constraints [v2]

2024-04-15 Thread Maurizio Cimadamore
On Mon, 15 Apr 2024 13:05:01 GMT, Per Minborg wrote: >> src/java.base/share/classes/java/lang/foreign/MemorySegment.java line 615: >> >>> 613: * the requested byte alignment during native segment allocation)} >>> 614: * >>> 615: * The returned alignment is always an even power of

Re: RFR: 8329997: Add provisions for checking memory segment alignment constraints [v2]

2024-04-15 Thread Per Minborg
On Mon, 15 Apr 2024 10:07:31 GMT, Maurizio Cimadamore wrote: >> Per Minborg has updated the pull request incrementally with three additional >> commits since the last revision: >> >> - Update >> src/java.base/share/classes/jdk/internal/foreign/HeapMemorySegmentImpl.java >> >>Co-autho

Re: RFR: 8319516: AIX System::loadLibrary needs support to load a shared library from an archive object [v22]

2024-04-15 Thread Jaikiran Pai
On Mon, 15 Apr 2024 12:46:01 GMT, Suchismith Roy wrote: > Thanks. I tried with a different shared object. If you undo the changes that are being proposed in this PR in the `src/java.base/aix/classes/jdk/internal/loader/ClassLoaderHelper.java` class (only undo that class changes), then rebuild

Re: RFR: 8319516: AIX System::loadLibrary needs support to load a shared library from an archive object [v22]

2024-04-15 Thread Jaikiran Pai
On Mon, 15 Apr 2024 12:46:01 GMT, Suchismith Roy wrote: > Is there any documentation for ProcessTools ProcessTools, specifically `jdk.test.lib.process.ProcessTools`, is just another utility class within the JDK's repo's test directory which is made available as a jtreg `@library` (https://open

Re: RFR: 8329997: Add provisions for checking memory segment alignment constraints [v2]

2024-04-15 Thread Per Minborg
On Mon, 15 Apr 2024 10:05:44 GMT, Maurizio Cimadamore wrote: >> Per Minborg has updated the pull request incrementally with three additional >> commits since the last revision: >> >> - Update >> src/java.base/share/classes/jdk/internal/foreign/HeapMemorySegmentImpl.java >> >>Co-autho

Re: RFR: 8329862: GetApplicationHome and GetApplicationHomeFromDll enhance jli tracing

2024-04-15 Thread Matthias Baesken
On Wed, 10 Apr 2024 07:16:49 GMT, Matthias Baesken wrote: > If we expand the tracing then I think it should be consistent with the > existing tracing. What exactly do you see as inconsistent ? - PR Comment: https://git.openjdk.org/jdk/pull/18699#issuecomment-2056772309

Re: RFR: 8319516: AIX System::loadLibrary needs support to load a shared library from an archive object [v22]

2024-04-15 Thread Suchismith Roy
On Mon, 15 Apr 2024 08:30:57 GMT, Suchismith Roy wrote: >>> > Thanks! This looks like a good idea. Only the directory handling needs >>> > some modification. This version tries to load >>> > "test-support/jtreg_test_jdk_java_lang_RuntimeTests_loadLibrary_aix/scratch/0/native/libawt_headless.so"

Re: RFR: 8329997: Add provisions for checking memory segment alignment constraints [v2]

2024-04-15 Thread Per Minborg
> This PR proposes to add a new method `MemorySegment::maxByteAlignment` that > returns the maximum byte alignment of a segment (both heap and native > segments). > > Clients can then use this method to determine if a segment is properly > aligned for any given layout (e.g. following a `MemoryS

Re: RFR: 8319516: AIX System::loadLibrary needs support to load a shared library from an archive object [v23]

2024-04-15 Thread Suchismith Roy
> Allow support for both .a and .so files in AIX. > If .so file is not found, allow fallback to .a extension. > JBS Issue: [JDK-8319516](https://bugs.openjdk.org/browse/JDK-8319516) Suchismith Roy has updated the pull request incrementally with one additional commit since the last revision: Us

Integrated: 8330176: Typo in Linker javadoc

2024-04-15 Thread Per Minborg
On Mon, 15 Apr 2024 08:21:41 GMT, Per Minborg wrote: > This PR fixes a typo in the `Linker` documentation. This pull request has now been integrated. Changeset: 60d88b7a Author:Per Minborg URL: https://git.openjdk.org/jdk/commit/60d88b7ae2945724ab4db44207e3390bcff172c0 Stats: 2

Re: RFR: 8325163: Enable -Wpedantic on clang [v2]

2024-04-15 Thread Magnus Ihse Bursie
On Mon, 5 Feb 2024 10:58:17 GMT, Magnus Ihse Bursie wrote: >> Inspired by (the later backed-out) >> [JDK-8296115](https://bugs.openjdk.org/browse/JDK-8296115), I propose to >> enable `-Wpedantic` for clang. This has already found some irregularities in >> the code, like mistakenly using `#impo

Withdrawn: 8325163: Enable -Wpedantic on clang

2024-04-15 Thread Magnus Ihse Bursie
On Fri, 2 Feb 2024 15:22:03 GMT, Magnus Ihse Bursie wrote: > Inspired by (the later backed-out) > [JDK-8296115](https://bugs.openjdk.org/browse/JDK-8296115), I propose to > enable `-Wpedantic` for clang. This has already found some irregularities in > the code, like mistakenly using `#import`

Re: RFR: 8329997: Add provisions for checking memory segment alignment constraints

2024-04-15 Thread Jorn Vernee
On Mon, 15 Apr 2024 07:50:24 GMT, Per Minborg wrote: > This PR proposes to add a new method `MemorySegment::maxByteAlignment` that > returns the maximum byte alignment of a segment (both heap and native > segments). > > Clients can then use this method to determine if a segment is properly >

Re: RFR: 8329997: Add provisions for checking memory segment alignment constraints

2024-04-15 Thread Maurizio Cimadamore
On Mon, 15 Apr 2024 07:50:24 GMT, Per Minborg wrote: > This PR proposes to add a new method `MemorySegment::maxByteAlignment` that > returns the maximum byte alignment of a segment (both heap and native > segments). > > Clients can then use this method to determine if a segment is properly >

Re: RFR: 8329997: Add provisions for checking memory segment alignment constraints

2024-04-15 Thread Maurizio Cimadamore
On Mon, 15 Apr 2024 07:50:24 GMT, Per Minborg wrote: > This PR proposes to add a new method `MemorySegment::maxByteAlignment` that > returns the maximum byte alignment of a segment (both heap and native > segments). > > Clients can then use this method to determine if a segment is properly >

Re: RFR: 8329997: Add provisions for checking memory segment alignment constraints

2024-04-15 Thread Maurizio Cimadamore
On Mon, 15 Apr 2024 07:50:24 GMT, Per Minborg wrote: > This PR proposes to add a new method `MemorySegment::maxByteAlignment` that > returns the maximum byte alignment of a segment (both heap and native > segments). > > Clients can then use this method to determine if a segment is properly >

Re: RFR: 8329420: Java 22 (and 23) launcher calls default constructor although main() is static [v2]

2024-04-15 Thread Alan Bateman
On Mon, 15 Apr 2024 07:36:05 GMT, Jan Lahoda wrote: >> Consider code like: >> >> public class MainClass { >> public MainClass() { >> System.out.println("Constructor called!"); >> } >> public static void main() { >> System.out.println("main called!"); >> } >> } >>

Re: RFR: 8330176: Typo in Linker javadoc

2024-04-15 Thread Maurizio Cimadamore
On Mon, 15 Apr 2024 08:21:41 GMT, Per Minborg wrote: > This PR fixes a typo in the `Linker` documentation. Marked as reviewed by mcimadamore (Reviewer). - PR Review: https://git.openjdk.org/jdk/pull/18781#pullrequestreview-2000556281

Re: RFR: 8314592: Add shortcut to SymbolLookup::find [v2]

2024-04-15 Thread Maurizio Cimadamore
On Mon, 15 Apr 2024 08:37:55 GMT, Per Minborg wrote: >> While `SymbolLookup` correctly uses an `Optional` return to denote whether a >> symbol has been found by the lookup or not (which enables composition of >> symbol lookups), many clients end up just calling `Optional::get`, or >> `Optional

Re: RFR: 8319516: AIX System::loadLibrary needs support to load a shared library from an archive object [v22]

2024-04-15 Thread Jaikiran Pai
On Mon, 15 Apr 2024 08:30:57 GMT, Suchismith Roy wrote: >>> > Thanks! This looks like a good idea. Only the directory handling needs >>> > some modification. This version tries to load >>> > "test-support/jtreg_test_jdk_java_lang_RuntimeTests_loadLibrary_aix/scratch/0/native/libawt_headless.so"

Re: RFR: 8314592: Add shortcut to SymbolLookup::find [v2]

2024-04-15 Thread Per Minborg
> While `SymbolLookup` correctly uses an `Optional` return to denote whether a > symbol has been found by the lookup or not (which enables composition of > symbol lookups), many clients end up just calling `Optional::get`, or > `Optional::orElseThrow()` on the result. > > This PR proposes to ad

Re: RFR: 8319516: AIX System::loadLibrary needs support to load a shared library from an archive object [v22]

2024-04-15 Thread Suchismith Roy
On Thu, 11 Apr 2024 18:29:36 GMT, Suchismith Roy wrote: > > > Thanks! This looks like a good idea. Only the directory handling needs > > > some modification. This version tries to load > > > "test-support/jtreg_test_jdk_java_lang_RuntimeTests_loadLibrary_aix/scratch/0/native/libawt_headless.so"

RFR: 8330176: Typo in Linker javadoc

2024-04-15 Thread Per Minborg
This PR fixes a typo in the `Linker` documentation. - Commit messages: - Fix typo in Linker javadoc Changes: https://git.openjdk.org/jdk/pull/18781/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=18781&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8330176 Stats: 2

RFR: 8329997: Add provisions for checking memory segment alignment constraints

2024-04-15 Thread Per Minborg
This PR proposes to add a new method `MemorySegment::maxByteAlignment` that returns the maximum byte alignment of a segment (both heap and native segments). Clients can then use this method to determine if a segment is properly aligned for any given layout (e.g. following a `MemorySegment::reint

Re: RFR: 8329420: Java 22 (and 23) launcher calls default constructor although main() is static [v2]

2024-04-15 Thread Jan Lahoda
> Consider code like: > > public class MainClass { > public MainClass() { > System.out.println("Constructor called!"); > } > public static void main() { > System.out.println("main called!"); > } > } > > and compile and run it, with preview enabled, like: > > $ jav

Re: RFR: 8329420: Java 22 (and 23) launcher calls default constructor although main() is static [v2]

2024-04-15 Thread Jan Lahoda
On Sun, 14 Apr 2024 06:51:37 GMT, Alan Bateman wrote: >> Jan Lahoda has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Reflecting review feedback. > > src/java.base/share/native/libjli/java.c line 434: > >> 432: CHECK_EXCEPTION_FAIL();

  1   2   >