Re: RFR: 8340081: Test java/foreign/TestLinker.java failed failed: missing permission java.lang.foreign.native.threshold.power.fill

2024-09-12 Thread Per Minborg
On Fri, 13 Sep 2024 06:49:41 GMT, Per Minborg wrote: >> Yes, the 2-arg GetIntegerAction.privilegedGetProperty would be better here, >> and it would retain the existing behavior for when the property value can't >> be parsed as a number. > > I think we need the try block anyhow as we have to dea

Integrated: 8340081: Test java/foreign/TestLinker.java failed failed: missing permission java.lang.foreign.native.threshold.power.fill

2024-09-12 Thread Per Minborg
On Fri, 13 Sep 2024 06:25:48 GMT, Per Minborg wrote: > This PR fixes a regression introduced by > https://github.com/openjdk/jdk/pull/20848 This pull request has now been integrated. Changeset: 5709c379 Author:Per Minborg URL: https://git.openjdk.org/jdk/commit/5709c379408d8919b86b

Re: RFR: 8340081: Test java/foreign/TestLinker.java failed failed: missing permission java.lang.foreign.native.threshold.power.fill

2024-09-12 Thread Per Minborg
On Fri, 13 Sep 2024 06:49:31 GMT, Alan Bateman wrote: >> src/java.base/share/classes/jdk/internal/foreign/SegmentBulkOperations.java >> line 313: >> >>> 311: // The returned value is in the interval [0, 2^30] >>> 312: static int powerOfPropertyOr(String name, int defaultPower) { >>> 313

Re: RFR: 8340081: Test java/foreign/TestLinker.java failed failed: missing permission java.lang.foreign.native.threshold.power.fill

2024-09-12 Thread Alan Bateman
On Fri, 13 Sep 2024 06:32:54 GMT, Jaikiran Pai wrote: >> This PR fixes a regression introduced by >> https://github.com/openjdk/jdk/pull/20848 > > src/java.base/share/classes/jdk/internal/foreign/SegmentBulkOperations.java > line 313: > >> 311: // The returned value is in the interval [0,

Re: RFR: 8339769: VM crash during initialization if working directory does not exist [v2]

2024-09-12 Thread Jaikiran Pai
On Thu, 12 Sep 2024 23:11:31 GMT, Justin Lu wrote: >> Please review this PR which restores the correct exception message when the >> current working directory can not be found during java startup in >> `initPhase1`. >> >> Both MacOS and Linux are expected to fail with `java.lang.Error: Propert

Re: RFR: 8340081: Test java/foreign/TestLinker.java failed failed: missing permission java.lang.foreign.native.threshold.power.fill

2024-09-12 Thread David Holmes
On Fri, 13 Sep 2024 06:25:48 GMT, Per Minborg wrote: > This PR fixes a regression introduced by > https://github.com/openjdk/jdk/pull/20848 LGTM! Thanks for the quick fix. - Marked as reviewed by dholmes (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/20983#pullrequestrev

Re: RFR: 8339769: VM crash during initialization if working directory does not exist [v2]

2024-09-12 Thread Alan Bateman
On Thu, 12 Sep 2024 23:11:31 GMT, Justin Lu wrote: >> Please review this PR which restores the correct exception message when the >> current working directory can not be found during java startup in >> `initPhase1`. >> >> Both MacOS and Linux are expected to fail with `java.lang.Error: Propert

Re: RFR: 8340081: Test java/foreign/TestLinker.java failed failed: missing permission java.lang.foreign.native.threshold.power.fill

2024-09-12 Thread Jaikiran Pai
On Fri, 13 Sep 2024 06:25:48 GMT, Per Minborg wrote: > This PR fixes a regression introduced by > https://github.com/openjdk/jdk/pull/20848 src/java.base/share/classes/jdk/internal/foreign/SegmentBulkOperations.java line 313: > 311: // The returned value is in the interval [0, 2^30] > 312

RFR: 8340081: Test java/foreign/TestLinker.java failed failed: missing permission java.lang.foreign.native.threshold.power.fill

2024-09-12 Thread Per Minborg
This PR fixes a regression introduced by https://github.com/openjdk/jdk/pull/20848 - Commit messages: - Use privilegedGetProperty Changes: https://git.openjdk.org/jdk/pull/20983/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=20983&range=00 Issue: https://bugs.openjdk.or

Re: RFR: 8339769: VM crash during initialization if working directory does not exist [v2]

2024-09-12 Thread David Holmes
On Thu, 12 Sep 2024 23:11:31 GMT, Justin Lu wrote: >> Please review this PR which restores the correct exception message when the >> current working directory can not be found during java startup in >> `initPhase1`. >> >> Both MacOS and Linux are expected to fail with `java.lang.Error: Propert

Re: RFR: 8340082: Use inline return tag in java.base

2024-09-12 Thread Iris Clark
On Fri, 13 Sep 2024 02:47:18 GMT, Joe Darcy wrote: > Candidates for this refactoring were found programmatically; the program to > find candidates is in a comment on the bug. Marked as reviewed by iris (Reviewer). - PR Review: https://git.openjdk.org/jdk/pull/20981#pullrequestrevi

RFR: 8340082: Use inline return tag in java.base

2024-09-12 Thread Joe Darcy
Candidates for this refactoring were found programmatically; the program to find candidates is in a comment on the bug. - Commit messages: - JDK-8340082: Use inline return tag in java.base Changes: https://git.openjdk.org/jdk/pull/20981/files Webrev: https://webrevs.openjdk.org/?

Re: RFR: 8340079: Modify rearrange/selectFrom Vector API methods to perform wrapIndexes instead of checkIndexes

2024-09-12 Thread Sandhya Viswanathan
On Thu, 22 Aug 2024 18:21:50 GMT, Paul Sandoz wrote: > API shapes are good! > > I see you intrinsified `selectFrom` which, IIUC, optimally generates C2 nodes > that are functionally equivalent to the Java expression > `v.rearrange(this.toShuffle())`. That way we can better generate an optimal

Re: RFR: 8340079: Modify rearrange/selectFrom Vector API methods to perform wrapIndexes instead of checkIndexes

2024-09-12 Thread Paul Sandoz
On Mon, 19 Aug 2024 21:47:23 GMT, Sandhya Viswanathan wrote: > Currently the rearrange and selectFrom APIs check shuffle indices and throw > IndexOutOfBoundsException if there is any exceptional source index in the > shuffle. This causes the generated code to be less optimal. This PR modifies

RFR: 8340079: Modify rearrange/selectFrom Vector API methods to perform wrapIndexes instead of checkIndexes

2024-09-12 Thread Sandhya Viswanathan
Currently the rearrange and selectFrom APIs check shuffle indices and throw IndexOutOfBoundsException if there is any exceptional source index in the shuffle. This causes the generated code to be less optimal. This PR modifies the rearrange/selectFrom Vector API methods to perform wrapIndexes in

Re: RFR: 8339769: VM crash during initialization if working directory does not exist [v2]

2024-09-12 Thread Justin Lu
> Please review this PR which restores the correct exception message when the > current working directory can not be found during java startup in > `initPhase1`. > > Both MacOS and Linux are expected to fail with `java.lang.Error: Properties > init: Could not determine current working directory

RFR: 8340073: Support "%z" time zone abbreviation format in TZ files

2024-09-12 Thread Naoto Sato
Yet another preparation for upgrading the time zone data to 2024b, which introduced a new abbreviation format "%z". The update includes: ... The main source files' time zone abbreviations now use %z, supported by zic since release 2015f and used in vanguard form since release 202

RFR: 8339769: VM crash during initialization if working directory does not exist

2024-09-12 Thread Justin Lu
Please review this PR which restores the correct exception message when the current working directory can not be found during java startup in `initPhase1`. Both MacOS and Linux are expected to fail with `java.lang.Error: Properties init: Could not determine current working directory` if the _use

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

2024-09-12 Thread Viktor Klang
Hi Anthony Great questions! I had typed up a long response when my email client decided the email was too large, crashed, and deleted my draft, so I'll try to recreate what I wrote from memory. >While I understand that most Gatherers will be reusable, and that it's a >desirable characteristic,

Re: RFR: 8339850: Restore the interrupt status in FileSystemPreferences.lockFile()

2024-09-12 Thread Brian Burkhalter
On Tue, 10 Sep 2024 16:37:11 GMT, sbgoog wrote: > FIleSystemPreferences.lockFile() catches an InterruptedException and just > returns false, forgetting to re-interrupt the current thread. This leaves the > caller with no way to observe that the thread was interrupted. This change > restores th

Re: RFR: 8334301: Errors in jpackage man page

2024-09-12 Thread Alexander Matveev
On Thu, 12 Sep 2024 16:14:34 GMT, Alexey Semenyuk wrote: > Correct jpackage man errors Marked as reviewed by almatvee (Reviewer). Looks good. - PR Review: https://git.openjdk.org/jdk/pull/20969#pullrequestreview-2301384752 PR Comment: https://git.openjdk.org/jdk/pull/20969#issueco

Re: RFR: 8336274: MutableBigInteger.leftShift(int) optimization [v11]

2024-09-12 Thread fabioromano1
> This implementation of MutableBigInteger.leftShift(int) optimizes the current > version, avoiding unnecessary copy of the MutableBigInteger's value content > and performing the primitive shifting only in the original portion of the > value array rather than in the value yet extended with trail

Re: RFR: 8299419: Thread.sleep(millis) may throw OOME [v3]

2024-09-12 Thread David Holmes
On Wed, 11 Sep 2024 11:42:19 GMT, Viktor Klang wrote: >> This PR applies @AlanBateman's patch from the JBS issue. > > Viktor Klang has refreshed the contents of this pull request, and previous > commits have been removed. The incremental views will show differences > compared to the previous co

Re: RFR: 8325949: Create an internal utility method for creating VarHandle instances

2024-09-12 Thread Chen Liang
On Thu, 12 Sep 2024 17:38:44 GMT, Per Minborg wrote: > This PR suggests introducing an internal class in `java.base` to simplify the > use of some `MethodHandles.Lookup` operations. > > While the utility of the methods might appear to be limited in classes with > many static `VarHandle`/`Metho

Re: RFR: 8325949: Create an internal utility method for creating VarHandle instances

2024-09-12 Thread Roger Riggs
On Thu, 12 Sep 2024 17:38:44 GMT, Per Minborg wrote: > This PR suggests introducing an internal class in `java.base` to simplify the > use of some `MethodHandles.Lookup` operations. > > While the utility of the methods might appear to be limited in classes with > many static `VarHandle`/`Metho

Integrated: 8339531: Improve performance of MemorySegment::mismatch

2024-09-12 Thread Per Minborg
On Wed, 4 Sep 2024 09:09:32 GMT, Per Minborg wrote: > This PR proposes to improve the performance of `MemorySegment::mismatch` by > using Java code rather than transitioning to native code. This pull request has now been integrated. Changeset: 81ff91ef Author:Per Minborg URL: https

RFR: 8325949: Create an internal utility method for creating VarHandle instances

2024-09-12 Thread Per Minborg
This PR suggests introducing an internal class in `java.base` to simplify the use of some `MethodHandles.Lookup` operations. While the utility of the methods might appear to be limited in classes with many static `VarHandle`/`MethodHandle` variables, it should be noted that the class files beco

Re: Stream Gatherers (JEP 473) feedback

2024-09-12 Thread Anthony Vanelverdinghe
Hi Viktor September 8, 2024 at 5:20 PM, "Viktor Klang" wrote: > > >The non-reusability is intentional here, being a drop-in replacement for > >`Stream::concat`. > > Gatherers are designed to be reusable, Streams not. So having a Gatherer > which isn't reusable would be a bit of a non-starter

Re: RFR: 8334301: Errors in jpackage man page

2024-09-12 Thread Alexey Semenyuk
On Thu, 12 Sep 2024 16:14:34 GMT, Alexey Semenyuk wrote: > Correct jpackage man errors @sashamatveev please review - PR Comment: https://git.openjdk.org/jdk/pull/20969#issuecomment-2346723922

RFR: 8334301: Errors in jpackage man page

2024-09-12 Thread Alexey Semenyuk
Correct jpackage man errors - Commit messages: - JDK-8334301: Errors in jpackage man page Changes: https://git.openjdk.org/jdk/pull/20969/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=20969&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8334301 Stats: 24 lines in

Re: RFR: 8337143: (fc, fs) Move filesystem-related native objects from libnio to libjava [v7]

2024-09-12 Thread Brian Burkhalter
On Thu, 12 Sep 2024 15:43:32 GMT, Alan Bateman wrote: > Can you hold off integrating, I plan to go over the changes soon. I don't plan to integrate until you have reviewed it. I set the minimum reviewer count to 3 to avoid doing so accidentally. - PR Comment: https://git.openjdk.o

Re: RFR: 8336881: [Linux] Support for hierarchical limits for Metrics [v8]

2024-09-12 Thread Severin Gehwolf
On Wed, 11 Sep 2024 17:52:44 GMT, Severin Gehwolf wrote: >> Please review this fix for cgroups-based metrics reporting in the >> `jdk.internal.platform` package. This fix is supposed to address wrong >> reporting of certain limits if the limits aren't set at the leaf nodes. >> >> For example,

Re: RFR: 8337143: (fc, fs) Move filesystem-related native objects from libnio to libjava [v7]

2024-09-12 Thread Alan Bateman
On Thu, 12 Sep 2024 15:38:18 GMT, Brian Burkhalter wrote: > The tests passed the JDK tiers 1-3 tests on Linux, macOS, and Windows. In any > case, I will run another round of tests before integrating. Can you hold off integrating, I plan to go over the changes soon. - PR Comment: h

Re: RFR: 8337143: (fc, fs) Move filesystem-related native objects from libnio to libjava [v5]

2024-09-12 Thread Brian Burkhalter
On Thu, 12 Sep 2024 02:05:50 GMT, Brian Burkhalter wrote: >> We don't need it in `libjava`, but `NTLMAuthentication` was (perhaps >> unwittingly) relying on it to load `net.dll` during boot phase 2. I'll move >> the load to a more appropriate location in the next commit. > > Moved to `NTLMAuthe

Re: RFR: 8337143: (fc, fs) Move filesystem-related native objects from libnio to libjava [v7]

2024-09-12 Thread Brian Burkhalter
On Thu, 12 Sep 2024 06:24:50 GMT, Daniel Jeliński wrote: > Thanks for making the changes. LGTM, assuming that tests still pass. The tests passed the JDK tiers 1-3 tests on Linux, macOS, and Windows. In any case, I will run another round of tests before integrating. > src/java.base/unix/native/

Integrated: 8339874: Avoid duplicate checking of trailing slash in ZipFile.getZipEntry

2024-09-12 Thread Eirik Bjørsnøs
On Tue, 10 Sep 2024 18:35:52 GMT, Eirik Bjørsnøs wrote: > Please review this PR which speeds up `ZipFile.getZipEntry` by removing > slash-checking logic which is already taking place during lookup in > `ZipFile.Source.getEntryPos`. > > `ZipFile.Source.getEntryPos` includes logic to match a lo

Integrated: 8339876: Move constant symbol caches to Utf8EntryImpl

2024-09-12 Thread Chen Liang
On Wed, 11 Sep 2024 23:31:33 GMT, Chen Liang wrote: > Some type descriptors are validated against generic utf8 entries, such as > field or method types; we can cache a type descriptor wrapping the content of > the utf8 entry if this entry is ever used as a type descriptor. > > This patch is mo

Integrated: 8340011: Simplify jdk.internal.classfile.impl.EntryMap

2024-09-12 Thread Claes Redestad
On Thu, 12 Sep 2024 13:26:45 GMT, Claes Redestad wrote: > Minor refactoring to avoid the need to define two anonymous classes that > override `EntryMap`. Minor speed-up in interpreter, as well. This pull request has now been integrated. Changeset: 0765917d Author:Claes Redestad URL:

Re: RFR: 8340011: Simplify jdk.internal.classfile.impl.EntryMap

2024-09-12 Thread Claes Redestad
On Thu, 12 Sep 2024 13:26:45 GMT, Claes Redestad wrote: > Minor refactoring to avoid the need to define two anonymous classes that > override `EntryMap`. Minor speed-up in interpreter, as well. Thanks! - PR Comment: https://git.openjdk.org/jdk/pull/20966#issuecomment-2346561354

Re: RFR: 8336274: MutableBigInteger.leftShift(int) optimization [v10]

2024-09-12 Thread fabioromano1
> This implementation of MutableBigInteger.leftShift(int) optimizes the current > version, avoiding unnecessary copy of the MutableBigInteger's value content > and performing the primitive shifting only in the original portion of the > value array rather than in the value yet extended with trail

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

2024-09-12 Thread Maurizio Cimadamore
On Thu, 12 Sep 2024 13:06:47 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: 8333843: Provide methods on MemorySegment to read strings with known lengths [v2]

2024-09-12 Thread Maurizio Cimadamore
On Thu, 12 Sep 2024 13:44:34 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 10 additional >> co

Re: RFR: 8333843: Provide methods on MemorySegment to read strings with known lengths [v2]

2024-09-12 Thread Maurizio Cimadamore
On Thu, 12 Sep 2024 12:44:41 GMT, Per Minborg wrote: >> This PR proposes to add a new overload to `MemorySegment::getString` whereby >> it is possible to pass in a known byte length of the content in a segment >> that should be converted to a String. This is useful in case one already >> knows

Re: RFR: 8340011: Simplify jdk.internal.classfile.impl.EntryMap

2024-09-12 Thread Chen Liang
On Thu, 12 Sep 2024 13:26:45 GMT, Claes Redestad wrote: > Minor refactoring to avoid the need to define two anonymous classes that > override `EntryMap`. Minor speed-up in interpreter, as well. Marked as reviewed by liach (Reviewer). - PR Review: https://git.openjdk.org/jdk/pull/2

RFR: 8340011: Simplify jdk.internal.classfile.impl.EntryMap

2024-09-12 Thread Claes Redestad
Minor refactoring to avoid the need to define two anonymous classes that override `EntryMap`. Minor speed-up in interpreter, as well. - Commit messages: - Simplify jdk.internal.classfile.impl.EntryMap Changes: https://git.openjdk.org/jdk/pull/20966/files Webrev: https://webrevs.o

Re: RFR: 8336274: MutableBigInteger.leftShift(int) optimization [v9]

2024-09-12 Thread Raffaello Giulietti
On Thu, 12 Sep 2024 12:27:01 GMT, fabioromano1 wrote: >> I mean something like >> >> private void primitiveRightShift(int n, int[] result, int resPos) { >> int[] val = value; >> int n2 = 32 - n; >> int c = 0; >> for (int i = 0; i < intLen; i++) { >>

Re: RFR: 8339874: Avoid duplicate checking of trailing slash in ZipFile.getZipEntry [v5]

2024-09-12 Thread Claes Redestad
On Thu, 12 Sep 2024 11:28:20 GMT, Eirik Bjørsnøs wrote: >> Please review this PR which speeds up `ZipFile.getZipEntry` by removing >> slash-checking logic which is already taking place during lookup in >> `ZipFile.Source.getEntryPos`. >> >> `ZipFile.Source.getEntryPos` includes logic to match

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

2024-09-12 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: Revert unrolling changes - Changes

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

2024-09-12 Thread Per Minborg
On Thu, 12 Sep 2024 11:34:44 GMT, Maurizio Cimadamore wrote: >> In other words, I don't think the goal of this (and related) PR is "improve >> mismatch so that it blows other alternatives - like Unsafe, or array" out of >> the water - as much as it is "make sure that using MemorySegment::misma

Re: RFR: 8336274: MutableBigInteger.leftShift(int) optimization [v7]

2024-09-12 Thread fabioromano1
On Thu, 12 Sep 2024 12:21:59 GMT, Raffaello Giulietti wrote: >> So, a test should be done for every possible path of computation of >> `MBI.leftShift()` method... > > Looking at the code of `leftShift()` alone, I roughly count a dozen or so > paths. > But if you feel confident that the random

Re: RFR: 8333843: Provide methods on MemorySegment to read strings with known lengths [v2]

2024-09-12 Thread Per Minborg
> This PR proposes to add a new overload to `MemorySegment::getString` whereby > it is possible to pass in a known byte length of the content in a segment > that should be converted to a String. This is useful in case one already > knows the byte length and thereby does not need to scan for a nu

Re: RFR: 8336274: MutableBigInteger.leftShift(int) optimization [v9]

2024-09-12 Thread fabioromano1
On Thu, 12 Sep 2024 12:01:47 GMT, Raffaello Giulietti wrote: >> Yes, it could, but the problem is that in this way the precondition `(resPos >> <= offset || resPos >= offset + intLen)` would be no longer correct, and in >> particular `resPos <= offset` is used by `MBI.leftShift()` if `result =

Re: RFR: 8336274: MutableBigInteger.leftShift(int) optimization [v7]

2024-09-12 Thread Raffaello Giulietti
On Thu, 12 Sep 2024 11:21:10 GMT, fabioromano1 wrote: >> The implementation of the shift methods in `MutableBigInteger` has several >> control flow paths, depending on whether a new `int[]` is needed, whether >> `arraycopy()` can be used, etc. >> >> Relying on random tests is good if the "sear

Re: RFR: 8339876: Move constant symbol caches to Utf8EntryImpl

2024-09-12 Thread Chen Liang
On Thu, 12 Sep 2024 07:13:08 GMT, ExE Boss wrote: >> Some type descriptors are validated against generic utf8 entries, such as >> field or method types; we can cache a type descriptor wrapping the content >> of the utf8 entry if this entry is ever used as a type descriptor. >> >> This patch is

Re: RFR: 8336274: MutableBigInteger.leftShift(int) optimization [v9]

2024-09-12 Thread Raffaello Giulietti
On Thu, 12 Sep 2024 11:23:24 GMT, fabioromano1 wrote: >> src/java.base/share/classes/java/math/MutableBigInteger.java line 722: >> >>> 720: * {@code (resPos <= offset || resPos >= offset + intLen)}. >>> 721: */ >>> 722: private final void primitiveRightShift(int n, int[] result, in

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

2024-09-12 Thread Maurizio Cimadamore
On Thu, 12 Sep 2024 10:54:47 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 two additional > commits since the las

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

2024-09-12 Thread Maurizio Cimadamore
On Thu, 12 Sep 2024 11:32:22 GMT, Maurizio Cimadamore wrote: >> src/java.base/share/classes/jdk/internal/foreign/SegmentBulkOperations.java >> line 204: >> >>> 202: // This gives about 20% performance increase for large values >>> of `length`. >>> 203: // On non-Aarch64 archit

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

2024-09-12 Thread Maurizio Cimadamore
On Thu, 12 Sep 2024 11:30:12 GMT, Maurizio Cimadamore wrote: >> Per Minborg has updated the pull request incrementally with two additional >> commits since the last revision: >> >> - Fix yet another typo >> - Fix typo > > src/java.base/share/classes/jdk/internal/foreign/SegmentBulkOperations

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

2024-09-12 Thread Per Minborg
On Thu, 12 Sep 2024 10:54:47 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 two additional > commits since the las

Re: RFR: 8339874: Avoid duplicate checking of trailing slash in ZipFile.getZipEntry [v5]

2024-09-12 Thread Eirik Bjørsnøs
On Thu, 12 Sep 2024 11:28:20 GMT, Eirik Bjørsnøs wrote: >> Please review this PR which speeds up `ZipFile.getZipEntry` by removing >> slash-checking logic which is already taking place during lookup in >> `ZipFile.Source.getEntryPos`. >> >> `ZipFile.Source.getEntryPos` includes logic to match

Re: RFR: 8339874: Avoid duplicate checking of trailing slash in ZipFile.getZipEntry [v5]

2024-09-12 Thread Lance Andersen
On Thu, 12 Sep 2024 11:28:20 GMT, Eirik Bjørsnøs wrote: >> Please review this PR which speeds up `ZipFile.getZipEntry` by removing >> slash-checking logic which is already taking place during lookup in >> `ZipFile.Source.getEntryPos`. >> >> `ZipFile.Source.getEntryPos` includes logic to match

Re: RFR: 8339874: Avoid duplicate checking of trailing slash in ZipFile.getZipEntry [v5]

2024-09-12 Thread Eirik Bjørsnøs
> Please review this PR which speeds up `ZipFile.getZipEntry` by removing > slash-checking logic which is already taking place during lookup in > `ZipFile.Source.getEntryPos`. > > `ZipFile.Source.getEntryPos` includes logic to match a lookup for "name" > against a directory entry "name/" (with

Re: RFR: 8336274: MutableBigInteger.leftShift(int) optimization [v7]

2024-09-12 Thread fabioromano1
On Thu, 12 Sep 2024 10:27:49 GMT, Raffaello Giulietti wrote: >> I see (with obvious adaptations and one more `case`). > > The implementation of the shift methods in `MutableBigInteger` has several > control flow paths, depending on whether a new `int[]` is needed, whether > `arraycopy()` can b

Re: RFR: 8336274: MutableBigInteger.leftShift(int) optimization [v9]

2024-09-12 Thread fabioromano1
On Thu, 12 Sep 2024 10:29:24 GMT, Raffaello Giulietti wrote: >> fabioromano1 has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Use supported annotation by jtreg in tests > > src/java.base/share/classes/java/math/MutableBigInteger.java lin

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

2024-09-12 Thread Francesco Nigro
On Thu, 12 Sep 2024 11:14:32 GMT, Per Minborg wrote: >>> Wdyt about the benchmark I have added at [#20829 >>> (comment)](https://github.com/openjdk/jdk/pull/20829#issuecomment-2326404582)? >>> Sadly I didn't yet run against this PR >> >> Let's see what we can do about this later. > >> Wdyt abo

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

2024-09-12 Thread Per Minborg
On Fri, 6 Sep 2024 12:05:21 GMT, Per Minborg wrote: > Wdyt about the benchmark I have added at [#20829 > (comment)](https://github.com/openjdk/jdk/pull/20829#issuecomment-2326404582)? Added https://bugs.openjdk.org/browse/JDK-833 - PR Comment: https://git.openjdk.org/jdk/pull/

Re: RFR: 8336274: MutableBigInteger.leftShift(int) optimization [v9]

2024-09-12 Thread fabioromano1
On Thu, 12 Sep 2024 10:27:39 GMT, Raffaello Giulietti wrote: >> fabioromano1 has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Use supported annotation by jtreg in tests > > src/java.base/share/classes/java/math/MutableBigInteger.java lin

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

2024-09-12 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 two additional commits since the last revision: - Fix yet another typo - Fix typo

Re: RFR: 8336274: MutableBigInteger.leftShift(int) optimization [v7]

2024-09-12 Thread Raffaello Giulietti
On Wed, 11 Sep 2024 15:34:44 GMT, Raffaello Giulietti wrote: >> The test cases of the code are the same of the test class for >> `BigInteger.shiftLeft()`. > > I see (with obvious adaptations and one more `case`). The implementation of the shift methods in `MutableBigInteger` has several contr

Re: RFR: 8336274: MutableBigInteger.leftShift(int) optimization [v9]

2024-09-12 Thread Raffaello Giulietti
On Wed, 11 Sep 2024 15:51:25 GMT, fabioromano1 wrote: >> This implementation of MutableBigInteger.leftShift(int) optimizes the >> current version, avoiding unnecessary copy of the MutableBigInteger's value >> content and performing the primitive shifting only in the original portion >> of the

Re: RFR: 8339332: Clean up the java launcher code

2024-09-12 Thread Jaikiran Pai
On Tue, 10 Sep 2024 06:15:57 GMT, Jaikiran Pai wrote: > Can I please get a review of this change which cleans up the code in the > `java` launcher? The original motivation for the change was to prevent the > `java` launcher's C code from parsing a jar's manifest when launching an > application

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

2024-09-12 Thread Per Minborg
On Fri, 6 Sep 2024 11:52:35 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: 8339531: Improve performance of MemorySegment::mismatch [v11]

2024-09-12 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 with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in

Re: RFR: 8266431: Dual-Pivot Quicksort improvements (Radix sort) [v11]

2024-09-12 Thread Laurent Bourgès
On Sun, 22 Oct 2023 17:26:52 GMT, Laurent Bourgès wrote: >> * improved mixed insertion sort (makes whole sorting faster) >> * introduced Radix which sort shows several times boost of performance and >> has linear complexity instead of n*ln(n) >> * improved merging sort for almost sorted data >>

Re: RFR: 8339332: Clean up the java launcher code

2024-09-12 Thread Eirik Bjørsnøs
On Tue, 10 Sep 2024 06:15:57 GMT, Jaikiran Pai wrote: > Can I please get a review of this change which cleans up the code in the > `java` launcher? The original motivation for the change was to prevent the > `java` launcher's C code from parsing a jar's manifest when launching an > application

Integrated: 8338747: hasIncubatorModules needs to be generated when module resolution required at startup

2024-09-12 Thread Alan Bateman
On Mon, 2 Sep 2024 12:27:21 GMT, Alan Bateman wrote: > This PR proposes changes to the ModuleBootstrap code that is used with CDS > (Ahead-of-Time Class Loading & Linking in the future). At things stand, the > module graph and boot layer can be archived at dump time (-Xshare:dump) when > the i

Re: RFR: 8339876: Move constant symbol caches to Utf8EntryImpl

2024-09-12 Thread Claes Redestad
On Wed, 11 Sep 2024 23:31:33 GMT, Chen Liang wrote: > Some type descriptors are validated against generic utf8 entries, such as > field or method types; we can cache a type descriptor wrapping the content of > the utf8 entry if this entry is ever used as a type descriptor. > > This patch is mo

Re: RFR: 8338747: hasIncubatorModules needs to be generated when module resolution required at startup

2024-09-12 Thread Alan Bateman
On Wed, 11 Sep 2024 19:15:47 GMT, Ioi Lam wrote: > The logic seems to be correct (or at least err on the side of safety and > recompute hasSplitPackages/hasIncubatorModules when we aren't 100% sure). Just to say a bit more about this. When you specify an application module path to the java lau

Re: RFR: 8339876: Move constant symbol caches to Utf8EntryImpl

2024-09-12 Thread ExE Boss
On Wed, 11 Sep 2024 23:31:33 GMT, Chen Liang wrote: > Some type descriptors are validated against generic utf8 entries, such as > field or method types; we can cache a type descriptor wrapping the content of > the utf8 entry if this entry is ever used as a type descriptor. > > This patch is mo

Re: RFR: 8339332: Clean up the java launcher code

2024-09-12 Thread Jaikiran Pai
On Thu, 12 Sep 2024 06:33:18 GMT, David Holmes wrote: >> Can I please get a review of this change which cleans up the code in the >> `java` launcher? The original motivation for the change was to prevent the >> `java` launcher's C code from parsing a jar's manifest when launching an >> applica