RFR: 8297134: Add a @sealedGraph tag to InetAddress

2022-11-16 Thread Per Minborg
This PR proposes to opt in for graphic rendering of the sealed hierarchy of the `InetAddress` class. Rendering capability was added via https://bugs.openjdk.org/browse/JDK-8295653 - Commit messages: - Add a @sealedGraph tag to InetAddress Changes: https://git.openjdk.org/jdk/pull/

Re: RFR: 8297134: Add a @sealedGraph tag to InetAddress

2022-11-16 Thread Per Minborg
On Wed, 16 Nov 2022 13:03:56 GMT, Per Minborg wrote: > This PR proposes to opt in for graphic rendering of the sealed hierarchy of > the `InetAddress` class. > > Rendering capability was added via https://bugs.openjdk.org/browse/JDK-8295653 Here is how it looks like:

Re: RFR: 8297134: Add a @sealedGraph tag to InetAddress

2022-11-16 Thread Per Minborg
On Wed, 16 Nov 2022 15:03:36 GMT, Jaikiran Pai wrote: >> Hello Per, this looks fine to me. A general question - should we be doing a >> similar thing for other classes in this module? > >> A general question - should we be doing a similar thing for other classes >> in this module? > > I just

Re: RFR: 8297134: Add a @sealedGraph tag to InetAddress

2022-11-16 Thread Per Minborg
On Wed, 16 Nov 2022 13:03:56 GMT, Per Minborg wrote: > This PR proposes to opt in for graphic rendering of the sealed hierarchy of > the `InetAddress` class. > > Rendering capability was added via https://bugs.openjdk.org/browse/JDK-8295653 Thanks for the encouraging comments. Ple

Integrated: 8297134: Add a @sealedGraph tag to InetAddress

2022-11-16 Thread Per Minborg
On Wed, 16 Nov 2022 13:03:56 GMT, Per Minborg wrote: > This PR proposes to opt in for graphic rendering of the sealed hierarchy of > the `InetAddress` class. > > Rendering capability was added via https://bugs.openjdk.org/browse/JDK-8295653 This pull request has now bee

RFR: 8296024: Usage of DIrectBuffer::address should be guarded

2022-11-21 Thread Per Minborg
This PR proposes the introduction of **guarding** of the use of `DirectBuffer::address` within the JDK. With the introduction of the Foreign Function and Memory access, it is possible to derive Buffer instances that are backed by native memory that, in turn, can be closed asynchronously by the u

Re: RFR: 8296024: Usage of DIrectBuffer::address should be guarded

2022-11-21 Thread Per Minborg
On Mon, 21 Nov 2022 11:29:07 GMT, Alan Bateman wrote: >> This PR proposes the introduction of **guarding** of the use of >> `DirectBuffer::address` within the JDK. With the introduction of the Foreign >> Function and Memory access, it is possible to derive Buffer instances that >> are backed b

Re: RFR: 8296024: Usage of DIrectBuffer::address should be guarded

2022-11-21 Thread Per Minborg
On Mon, 21 Nov 2022 11:32:35 GMT, Alan Bateman wrote: >> This PR proposes the introduction of **guarding** of the use of >> `DirectBuffer::address` within the JDK. With the introduction of the Foreign >> Function and Memory access, it is possible to derive Buffer instances that >> are backed b

Re: RFR: 8296024: Usage of DIrectBuffer::address should be guarded [v2]

2022-11-21 Thread Per Minborg
ress` method, that the use of the returned > address needs to be guarded. It can be discussed if this is preferable or not. > > This PR spawns several areas of responsibility and so, I expect more than one > reviewer before promoting the PR. Per Minborg has updated the pull request incrementally

Re: RFR: 8296024: Usage of DIrectBuffer::address should be guarded [v3]

2022-11-21 Thread Per Minborg
ress` method, that the use of the returned > address needs to be guarded. It can be discussed if this is preferable or not. > > This PR spawns several areas of responsibility and so, I expect more than one > reviewer before promoting the PR. Per Minborg has updated the pull request increm

Re: RFR: 8296024: Usage of DIrectBuffer::address should be guarded [v3]

2022-11-21 Thread Per Minborg
On Mon, 21 Nov 2022 12:19:21 GMT, Alan Bateman wrote: >> maybe just `bufferLock` and and just `acquireBuffer` ? > > Would it be possible to re-examine acquireSession returning Runnable and > acquireSessionAsAutoCloseable returning AutoCloseable. The naming is bit > awkward at most of the use si

Re: RFR: 8296024: Usage of DIrectBuffer::address should be guarded [v4]

2022-11-21 Thread Per Minborg
ress` method, that the use of the returned > address needs to be guarded. It can be discussed if this is preferable or not. > > This PR spawns several areas of responsibility and so, I expect more than one > reviewer before promoting the PR. Per Minborg has updated the pull request incre

Re: RFR: 8296024: Usage of DIrectBuffer::address should be guarded [v5]

2022-11-21 Thread Per Minborg
ress` method, that the use of the returned > address needs to be guarded. It can be discussed if this is preferable or not. > > This PR spawns several areas of responsibility and so, I expect more than one > reviewer before promoting the PR. Per Minborg has updated the pull request inc

Re: RFR: 8296024: Usage of DIrectBuffer::address should be guarded [v4]

2022-11-21 Thread Per Minborg
On Mon, 21 Nov 2022 13:32:43 GMT, ExE Boss wrote: >> Per Minborg has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Rename methods > > src/java.base/share/classes/sun/nio/ch/DirectBuffer.java line 41: &g

Re: RFR: 8296024: Usage of DIrectBuffer::address should be guarded [v6]

2022-11-21 Thread Per Minborg
ress` method, that the use of the returned > address needs to be guarded. It can be discussed if this is preferable or not. > > This PR spawns several areas of responsibility and so, I expect more than one > reviewer before promoting the PR. Per Minborg has updated the pull request incr

Re: RFR: 8296024: Usage of DIrectBuffer::address should be guarded [v7]

2022-11-21 Thread Per Minborg
ress` method, that the use of the returned > address needs to be guarded. It can be discussed if this is preferable or not. > > This PR spawns several areas of responsibility and so, I expect more than one > reviewer before promoting the PR. Per Minborg has refreshed the contents of this p

Re: RFR: 8296024: Usage of DIrectBuffer::address should be guarded [v6]

2022-11-21 Thread Per Minborg
On Mon, 21 Nov 2022 14:14:14 GMT, Alan Bateman wrote: >> Per Minborg has updated the pull request incrementally with two additional >> commits since the last revision: >> >> - Update src/java.base/share/classes/jdk/internal/access/JavaNioAccess.java >>

Re: RFR: 8296024: Usage of DIrectBuffer::address should be guarded [v8]

2022-11-21 Thread Per Minborg
ress` method, that the use of the returned > address needs to be guarded. It can be discussed if this is preferable or not. > > This PR spawns several areas of responsibility and so, I expect more than one > reviewer before promoting the PR. Per Minborg has updated the pull request increment

Re: RFR: 8296024: Usage of DIrectBuffer::address should be guarded [v4]

2022-11-21 Thread Per Minborg
On Mon, 21 Nov 2022 14:07:38 GMT, Alan Bateman wrote: >> Per Minborg has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Rename methods > > src/java.base/share/classes/java/util/zip/Adler32.java line 105: &g

Re: RFR: 8296024: Usage of DIrectBuffer::address should be guarded [v9]

2022-11-22 Thread Per Minborg
ress` method, that the use of the returned > address needs to be guarded. It can be discussed if this is preferable or not. > > This PR spawns several areas of responsibility and so, I expect more than one > reviewer before promoting the PR. Per Minborg has updated the pull request increment

Re: RFR: 8296024: Usage of DIrectBuffer::address should be guarded [v4]

2022-11-22 Thread Per Minborg
On Mon, 21 Nov 2022 20:06:20 GMT, Alan Bateman wrote: >>> > Although this looks much simpler and concise, it means "a new object is >>> > created for each invocation" >>> >>> My comment was actually to see if DirectBuffer could extend AutoCloseable >>> so that the acquire returns "this" for th

Re: RFR: 8296024: Usage of DIrectBuffer::address should be guarded [v9]

2022-11-22 Thread Per Minborg
On Tue, 22 Nov 2022 09:23:40 GMT, Maurizio Cimadamore wrote: >> Per Minborg has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Rework Acquisition > > src/java.base/share/classes/com/sun/crypto/provider/Galo

Re: RFR: 8296024: Usage of DIrectBuffer::address should be guarded [v10]

2022-11-22 Thread Per Minborg
ress` method, that the use of the returned > address needs to be guarded. It can be discussed if this is preferable or not. > > This PR spawns several areas of responsibility and so, I expect more than one > reviewer before promoting the PR. Per Minborg has updated the pull request increment

Re: RFR: 8296024: Usage of DIrectBuffer::address should be guarded [v11]

2022-11-23 Thread Per Minborg
ress` method, that the use of the returned > address needs to be guarded. It can be discussed if this is preferable or not. > > This PR spawns several areas of responsibility and so, I expect more than one > reviewer before promoting the PR. Per Minborg has updated the pull request incremen

Re: RFR: 8296024: Usage of DIrectBuffer::address should be guarded [v12]

2022-11-23 Thread Per Minborg
ress` method, that the use of the returned > address needs to be guarded. It can be discussed if this is preferable or not. > > This PR spawns several areas of responsibility and so, I expect more than one > reviewer before promoting the PR. Per Minborg has updated the pull reques

Re: RFR: 8296024: Usage of DIrectBuffer::address should be guarded [v12]

2022-11-23 Thread Per Minborg
On Wed, 23 Nov 2022 16:14:52 GMT, Maurizio Cimadamore wrote: >> Per Minborg has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Cleanup > > src/java.base/share/classes/jdk/internal/access/JavaNioAccess.java li

Re: RFR: 8296024: Usage of DIrectBuffer::address should be guarded [v13]

2022-11-24 Thread Per Minborg
ress` method, that the use of the returned > address needs to be guarded. It can be discussed if this is preferable or not. > > This PR spawns several areas of responsibility and so, I expect more than one > reviewer before promoting the PR. Per Minborg has updated the pull request increme

Re: RFR: 8296024: Usage of DIrectBuffer::address should be guarded [v13]

2022-11-24 Thread Per Minborg
On Thu, 24 Nov 2022 11:58:12 GMT, Maurizio Cimadamore wrote: >> Separately, also (optional) stylistic: the indenting on this and following >> class is a bit odd. There is a certain tendency to compress lines - e.g. to >> reach for one-liners, when in reality the body is not that trivial. If I

Re: RFR: 8296024: Usage of DIrectBuffer::address should be guarded [v13]

2022-11-24 Thread Per Minborg
On Thu, 24 Nov 2022 12:06:44 GMT, Alan Bateman wrote: >> Per Minborg has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Remove redundant method > > src/java.base/share/classes/sun/nio/ch/IOUtil.java l

Re: RFR: 8296024: Usage of DIrectBuffer::address should be guarded [v14]

2022-11-24 Thread Per Minborg
ress` method, that the use of the returned > address needs to be guarded. It can be discussed if this is preferable or not. > > This PR spawns several areas of responsibility and so, I expect more than one > reviewer before promoting the PR. Per Minborg has updated the pull request incremen

Re: RFR: 8296024: Usage of DIrectBuffer::address should be guarded [v14]

2022-11-28 Thread Per Minborg
On Thu, 24 Nov 2022 16:21:42 GMT, Per Minborg wrote: >> This PR proposes the introduction of **guarding** of the use of >> `DirectBuffer::address` within the JDK. With the introduction of the Foreign >> Function and Memory access, it is possible to derive Buffer instances t

Re: RFR: 8296024: Usage of DIrectBuffer::address should be guarded [v15]

2022-11-28 Thread Per Minborg
ress` method, that the use of the returned > address needs to be guarded. It can be discussed if this is preferable or not. > > This PR spawns several areas of responsibility and so, I expect more than one > reviewer before promoting the PR. Per Minborg has updated the pull request increm

Re: RFR: 8296024: Usage of DIrectBuffer::address should be guarded [v16]

2022-11-28 Thread Per Minborg
ress` method, that the use of the returned > address needs to be guarded. It can be discussed if this is preferable or not. > > This PR spawns several areas of responsibility and so, I expect more than one > reviewer before promoting the PR. Per Minborg has updated the pull request incre

Re: RFR: 8296024: Usage of DIrectBuffer::address should be guarded [v16]

2022-11-28 Thread Per Minborg
On Mon, 28 Nov 2022 19:35:24 GMT, Paul Sandoz wrote: > I prefer methods that do not expose the scope implementation so access is > limited to just to the acquire/release methods, but i am unsure of the > performance implications. These methods might not reliably inline, and we may > need to en

Re: RFR: 8296024: Usage of DIrectBuffer::address should be guarded [v17]

2022-11-29 Thread Per Minborg
be guarded. It can be discussed if this is preferable or not. > > This PR spawns several areas of responsibility and so, I expect more than one > reviewer before promoting the PR. Per Minborg has updated the pull request incrementally with one additional commit since the last revision: Rem

RFR: 8297778: Modernize and improve module jdk.sctp

2022-11-29 Thread Per Minborg
This PR proposes a variety of modernisations to the `jdk.sctp` module. During the fix of https://bugs.openjdk.org/browse/JDK-8296024, several improvement areas were identified including: * Replacing duplicate code segments * Making certain fields final * Using enhanced switch * Using records

Re: RFR: 8297778: Modernize and improve module jdk.sctp

2022-11-30 Thread Per Minborg
On Tue, 29 Nov 2022 17:44:18 GMT, Daniel Fuchs wrote: > It is a bit unusual to use a local class as a holder class (the typical > manner is to a have a private static final nested class) but we didn't have > local classes until recently - so maybe that's OK. I assume there's only one > version

Re: RFR: 8297778: Modernize and improve module jdk.sctp

2022-11-30 Thread Per Minborg
On Tue, 29 Nov 2022 17:08:50 GMT, Daniel Fuchs wrote: >> This PR proposes a variety of modernisations to the `jdk.sctp` module. >> >> During the fix of https://bugs.openjdk.org/browse/JDK-8296024, several >> improvement areas were identified including: >> >> * Replacing duplicate code segment

Re: RFR: 8297778: Modernize and improve module jdk.sctp

2022-11-30 Thread Per Minborg
On Tue, 29 Nov 2022 17:17:12 GMT, Daniel Fuchs wrote: >> This PR proposes a variety of modernisations to the `jdk.sctp` module. >> >> During the fix of https://bugs.openjdk.org/browse/JDK-8296024, several >> improvement areas were identified including: >> >> * Replacing duplicate code segment

Re: RFR: 8297778: Modernize and improve module jdk.sctp

2022-11-30 Thread Per Minborg
On Tue, 29 Nov 2022 20:25:19 GMT, Alan Bateman wrote: >> src/jdk.sctp/macosx/classes/sun/nio/ch/sctp/SctpChannelImpl.java line 44: >> >>> 42: * Unimplemented. >>> 43: */ >>> 44: public class SctpChannelImpl extends SctpChannel { >> >> Going a bit beyond just updating syntax; but that's a diff

Re: RFR: 8297778: Modernize and improve module jdk.sctp [v2]

2022-11-30 Thread Per Minborg
* Using enhanced switch > * Using records > * Fixing typos > * Marking fields participating in serialisation with `@Serial` > * Modernizing toString() implementations > * Using pattern matching > * Using diamond operators Per Minborg has updated the pull request increment

Re: RFR: 8297778: Modernize and improve module jdk.sctp [v3]

2022-11-30 Thread Per Minborg
* Using enhanced switch > * Using records > * Fixing typos > * Marking fields participating in serialisation with `@Serial` > * Modernizing toString() implementations > * Using pattern matching > * Using diamond operators Per Minborg has updated the pull request increment

Re: RFR: 8297778: Modernize and improve module jdk.sctp [v4]

2022-11-30 Thread Per Minborg
* Using enhanced switch > * Using records > * Fixing typos > * Marking fields participating in serialisation with `@Serial` > * Modernizing toString() implementations > * Using pattern matching > * Using diamond operators Per Minborg has updated the pull request increment

RFR: 8297822: De-duplicate code in module jdk.sctp

2022-11-30 Thread Per Minborg
This PR proposes merging logic and optimising three classes that exist for aix, maces and windows. Optimisation will reduce byte code. Below is an example for one of the many methods optimised. Before: public void implCloseSelectableChannel() throws java.io.IOException; Code: 0: new

Re: RFR: 8296024: Usage of DIrectBuffer::address should be guarded [v17]

2022-11-30 Thread Per Minborg
On Tue, 29 Nov 2022 09:40:58 GMT, Per Minborg wrote: >> This PR proposes the introduction of **guarding** of the use of >> `DirectBuffer::address` within the JDK. With the introduction of the Foreign >> Function and Memory access, it is possible to derive Buffer instances t

Re: RFR: 8297778: Modernize and improve module jdk.sctp [v5]

2022-11-30 Thread Per Minborg
* Using enhanced switch > * Using records > * Fixing typos > * Marking fields participating in serialisation with `@Serial` > * Modernizing toString() implementations > * Using pattern matching > * Using diamond operators Per Minborg has updated the pull request increment

Re: RFR: 8297822: De-duplicate code in module jdk.sctp [v2]

2022-12-01 Thread Per Minborg
n/nio/ch/sctp/UnsupportedUtil.sctpUnsupported:()Ljava/lang/UnsupportedOperationException; > 3: athrow Per Minborg has updated the pull request incrementally with one additional commit since the last revision: Fix copyrignt and add sealed classes - Changes: - all: https:/

Re: RFR: 8297822: De-duplicate code in module jdk.sctp [v3]

2022-12-01 Thread Per Minborg
n/nio/ch/sctp/UnsupportedUtil.sctpUnsupported:()Ljava/lang/UnsupportedOperationException; > 3: athrow Per Minborg has updated the pull request incrementally with one additional commit since the last revision: Move and refactor classes to reduce duplication - Changes: - all: h

Re: RFR: 8297778: Modernize and improve module jdk.sctp [v5]

2022-12-01 Thread Per Minborg
On Thu, 1 Dec 2022 10:04:38 GMT, Sergey Tsypanov wrote: >> Per Minborg has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Minor updates > > src/jdk.sctp/unix/classes/sun/nio/ch/sctp/ResultCont

Re: RFR: 8297778: Modernize and improve module jdk.sctp [v5]

2022-12-01 Thread Per Minborg
On Wed, 30 Nov 2022 18:34:15 GMT, Per Minborg wrote: >> This PR proposes a variety of modernisations to the `jdk.sctp` module. >> >> During the fix of https://bugs.openjdk.org/browse/JDK-8296024, several >> improvement areas were identified including: >>

Re: RFR: 8297778: Modernize and improve module jdk.sctp [v5]

2022-12-01 Thread Per Minborg
On Thu, 1 Dec 2022 10:07:14 GMT, Sergey Tsypanov wrote: > Btw, the same issue with volatile is present in `SctpMultiChannelImpl` and > `SctpServerChannelImpl` as well, so you could have a look into them. Fixed! - PR: https://git.openjdk.org/jdk/pull/11418

Re: RFR: 8297778: Modernize and improve module jdk.sctp [v6]

2022-12-01 Thread Per Minborg
* Using enhanced switch > * Using records > * Fixing typos > * Marking fields participating in serialisation with `@Serial` > * Modernizing toString() implementations > * Using pattern matching > * Using diamond operators Per Minborg has updated the pull request increment

Re: RFR: 8297778: Modernize and improve module jdk.sctp [v5]

2022-12-01 Thread Per Minborg
On Thu, 1 Dec 2022 13:05:39 GMT, Sergey Tsypanov wrote: > > receiverThread and senderThread are declared volatile but are always > > accessed (r/w) whilst synchronising on the stateLock. > @stsypanov Yes I am aware that this was a separate observation which is not related to the assignment of

Re: RFR: 8297778: Modernize and improve module jdk.sctp [v7]

2022-12-01 Thread Per Minborg
* Using enhanced switch > * Using records > * Fixing typos > * Marking fields participating in serialisation with `@Serial` > * Modernizing toString() implementations > * Using pattern matching > * Using diamond operators Per Minborg has updated the pull request increment

Re: RFR: 8297778: Modernize and improve module jdk.sctp [v8]

2022-12-01 Thread Per Minborg
* Using enhanced switch > * Using records > * Fixing typos > * Marking fields participating in serialisation with `@Serial` > * Modernizing toString() implementations > * Using pattern matching > * Using diamond operators Per Minborg has updated the pull request increment

Re: RFR: 8297822: De-duplicate code in module jdk.sctp [v3]

2022-12-05 Thread Per Minborg
On Thu, 1 Dec 2022 15:05:01 GMT, Daniel Fuchs wrote: > Please make sure that all related tests (as well as tier1 and tier2) pass > before integrating. We have run tests on a box where SCTP was enabled and they passed. - PR: https://git.openjdk.org/jdk/pull/11436

Re: RFR: 8297778: Modernize and improve module jdk.sctp [v9]

2022-12-06 Thread Per Minborg
* Using enhanced switch > * Using records > * Fixing typos > * Marking fields participating in serialisation with `@Serial` > * Modernizing toString() implementations > * Using pattern matching > * Using diamond operators Per Minborg has updated the pull request increment

Re: RFR: 8296024: Usage of DirectBuffer::address should be guarded [v18]

2022-12-06 Thread Per Minborg
be guarded. It can be discussed if this is preferable or not. > > This PR spawns several areas of responsibility and so, I expect more than one > reviewer before promoting the PR. Per Minborg has updated the pull request with a new target base due to a merge or a rebase. The pull request now co

Integrated: 8296024: Usage of DirectBuffer::address should be guarded

2022-12-06 Thread Per Minborg
On Mon, 21 Nov 2022 10:53:07 GMT, Per Minborg wrote: > This PR proposes the introduction of **guarding** of the use of > `DirectBuffer::address` within the JDK. With the introduction of the Foreign > Function and Memory access, it is possible to derive Buffer instances that > a

Re: RFR: 8297822: De-duplicate code in module jdk.sctp [v4]

2022-12-06 Thread Per Minborg
n/nio/ch/sctp/UnsupportedUtil.sctpUnsupported:()Ljava/lang/UnsupportedOperationException; > 3: athrow 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 reques

RFR: 8298277: Replace "session" with "scope" for FFM access

2022-12-07 Thread Per Minborg
This PR suggests renaming various names from "session" to "scope" in accordance with https://openjdk.org/jeps/434 The PRs contains changes for several sub-components. - Commit messages: - Rename session to scope Changes: https://git.openjdk.org/jdk/pull/11573/files Webrev: https:

Re: RFR: 8298277: Replace "session" with "scope" for FFM access [v2]

2022-12-08 Thread Per Minborg
> This PR suggests renaming various names from "session" to "scope" in > accordance with https://openjdk.org/jeps/434 > > The PRs contains changes for several sub-components. Per Minborg has updated the pull request incrementally with one additional commit si

Withdrawn: 8298277: Replace "session" with "scope" for FFM access

2022-12-08 Thread Per Minborg
On Wed, 7 Dec 2022 21:55:43 GMT, Per Minborg wrote: > This PR suggests renaming various names from "session" to "scope" in > accordance with https://openjdk.org/jeps/434 > > The PRs contains changes for several sub-components. This pull request has been

Re: RFR: 8298277: Replace "session" with "scope" for FFM access [v2]

2022-12-08 Thread Per Minborg
On Thu, 8 Dec 2022 08:17:44 GMT, Per Minborg wrote: >> This PR suggests renaming various names from "session" to "scope" in >> accordance with https://openjdk.org/jeps/434 >> >> The PRs contains changes for several sub-components. > > Per Minbo

Integrated: 8297778: Modernize and improve module jdk.sctp

2022-12-09 Thread Per Minborg
On Tue, 29 Nov 2022 16:46:43 GMT, Per Minborg wrote: > This PR proposes a variety of modernisations to the `jdk.sctp` module. > > During the fix of https://bugs.openjdk.org/browse/JDK-8296024, several > improvement areas were identified including: > > * Replacing dupli

Re: RFR: 8297822: De-duplicate code in module jdk.sctp [v3]

2022-12-09 Thread Per Minborg
On Thu, 1 Dec 2022 15:27:23 GMT, Alan Bateman wrote: >> Per Minborg has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Move and refactor classes to reduce duplication > > The latest update looks quite goo

Integrated: 8297822: De-duplicate code in module jdk.sctp

2022-12-12 Thread Per Minborg
On Wed, 30 Nov 2022 16:54:02 GMT, Per Minborg wrote: > This PR proposes merging logic and optimising three classes that exist for > aix, macos and windows. > > Optimisation will reduce byte code. Below is an example for one of the many > methods optimised. > > Bef

RFR: 8298589: java/net/SocketPermission/BindTest.java fails with NoClassDefFoundError: sun/nio/ch/sctp/UnsupportedUtil

2022-12-12 Thread Per Minborg
This PR fixes a typo - Commit messages: - Fix typo Changes: https://git.openjdk.org/jdk/pull/11636/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=11636&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8298589 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Pat

Integrated: 8298589: java/net/SctpSanity.java fail with NoClassDefFoundError: sun/nio/ch/sctp/UnsupportedUtil

2022-12-12 Thread Per Minborg
On Mon, 12 Dec 2022 16:56:22 GMT, Per Minborg wrote: > This PR fixes a typo This pull request has now been integrated. Changeset: 9ff85f65 Author: Per Minborg Committer: Daniel Fuchs URL: https://git.openjdk.org/jdk/commit/9ff85f65774c0a81ed10500d3591cd79b440aed0 Stats: 1 l

RFR: 8299437: Make InetSocketAddressHolder shallowly immutable

2023-01-02 Thread Per Minborg
This PR proposes to make the class `java.net.InetSocketAddress.InetSocketAddressHolder` shallowly immutable - Commit messages: - Make InetSocketAddressHolder shallowly immutable Changes: https://git.openjdk.org/jdk/pull/11809/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=

Integrated: 8299437: Make InetSocketAddressHolder shallowly immutable

2023-01-03 Thread Per Minborg
On Mon, 2 Jan 2023 09:00:43 GMT, Per Minborg wrote: > This PR proposes to make the class > `java.net.InetSocketAddress.InetSocketAddressHolder` shallowly immutable This pull request has now been integrated. Changeset: a9ce7726 Author: Per Minborg Committer: Jaikiran Pai URL:

RFR: 8315454: Add an immutable BitSet

2023-09-01 Thread Per Minborg
This PR proposes adding a new method to BitSet that provides an immutable snapshot of the set in the form of an `IntPredicate`. The predicate is eligible for constant folding. Here are some classes in the JDK that would benefit directly from constant-folding of BitSets: PoolReader (6) URLEncod

Re: RFR: 8315454: Add an immutable BitSet

2023-09-01 Thread Per Minborg
On Fri, 1 Sep 2023 08:50:42 GMT, Chen Liang wrote: > What about the missing functionalities, such as ranged get, cardinality, > next/previousSet/ClearBit? This was explored in https://github.com/openjdk/jdk/pull/15493 - PR Comment: https://git.openjdk.org/jdk/pull/15530#issuecomme

Re: RFR: 8315454: Add an immutable BitSet

2023-09-01 Thread Per Minborg
On Fri, 1 Sep 2023 09:00:32 GMT, Hannes Greule wrote: > Maybe it would make sense to start with a JDK-internal variant before > exploring potential public API? This is certainly one alternative. - PR Comment: https://git.openjdk.org/jdk/pull/15530#issuecomment-1702421871

Re: RFR: 8315454: Add an immutable BitSet [v2]

2023-09-01 Thread Per Minborg
EncodeDecode.testEncodeUTF8 61024 75 15 > 1,772 ± 0,013 1,387 ± 0,032 ms/op 21,8% (p = 0,000*) > URLEncodeDecode.testEncodeUTF8 61024 100 15 > 1,230 ± 0,009 1,140 ± 0,011 ms/op 7,3% (p = 0,000*) Per Minborg has updated the pul

Re: RFR: 8315454: Add a way to create an immutable snapshot of a BitSet [v3]

2023-09-01 Thread Per Minborg
EncodeDecode.testEncodeUTF8 61024 75 15 > 1,772 ± 0,013 1,387 ± 0,032 ms/op 21,8% (p = 0,000*) > URLEncodeDecode.testEncodeUTF8 61024 100 15 > 1,230 ± 0,009 1,140 ± 0,011 ms/op 7,3% (p = 0,000*) Per Minborg has updated the

Re: RFR: 8315454: Add a way to create an immutable snapshot of a BitSet [v4]

2023-09-03 Thread Per Minborg
EncodeDecode.testEncodeUTF8 61024 75 15 > 1,772 ± 0,013 1,387 ± 0,032 ms/op 21,8% (p = 0,000*) > URLEncodeDecode.testEncodeUTF8 61024 100 15 > 1,230 ± 0,009 1,140 ± 0,011 ms/op 7,3% (p = 0,000*) Per Minborg has updated the

Re: RFR: 8315454: Add a way to create an immutable snapshot of a BitSet [v5]

2023-09-04 Thread Per Minborg
EncodeDecode.testEncodeUTF8 61024 75 15 > 1,772 ± 0,013 1,387 ± 0,032 ms/op 21,8% (p = 0,000*) > URLEncodeDecode.testEncodeUTF8 61024 100 15 > 1,230 ± 0,009 1,140 ± 0,011 ms/op 7,3% (p = 0,000*) Per Minborg has updated the p

Integrated: 8315454: Add a way to create an immutable snapshot of a BitSet

2023-09-04 Thread Per Minborg
On Fri, 1 Sep 2023 08:21:13 GMT, Per Minborg wrote: > This PR proposes adding a new method to BitSet that provides an immutable > snapshot of the set in the form of an `IntPredicate`. > > The predicate is eligible for constant folding. > > Here are some classes in the JDK

Re: RFR: 8309259: Reduce calls to MethodHandles.lookup() in jdk.internal.net.http.Stream

2024-04-22 Thread Per Minborg
On Fri, 19 Apr 2024 12:02:43 GMT, Nizar Benalla wrote: > Please review this simple enhancement that is just reducing the number of > times we call the `MethodHandles.lookup()` method, as it can be a bit slow. > Passes tier 1-3 > > TIA Nice cleanup. LGTM. - Marked as reviewed by p

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: RFR: 8325949: Create an internal utility method for creating VarHandle instances

2024-09-13 Thread Per Minborg
On Thu, 12 Sep 2024 19:29:47 GMT, Chen Liang wrote: > I think we can elide the `Lookup` argument to perform a > always-full-permission lookup operation to simplify call sequence; or, to > elide the `recv` receiver argument as it is almost always > `lookup.lookupClass()` (except for a few lazy

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

2024-09-13 Thread Per Minborg
|5962751 | > | Delta |906| > > For 60 billion instances, this represents 54 TB. Per Minborg has updated the pull request incrementally with one additional commit since the last revision: Rename and reformat - Changes: -

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

2024-09-13 Thread Per Minborg
On Fri, 13 Sep 2024 12:40:33 GMT, Chen Liang wrote: >> Per Minborg has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Rename and reformat > > src/java.base/share/classes/jdk/internal/reflect/MethodHandlesInte

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

2024-09-16 Thread Per Minborg
| 5,905,487 | > | Delta |940| > > For 60 billion instances, this represents > 50 TB. 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

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

2024-09-17 Thread Per Minborg
On Mon, 16 Sep 2024 10:19:26 GMT, Kasper Nielsen wrote: > This would actually be super useful in a public API. I use the same "trick" > in some of my projects. Not because I care too much about the classfile size. > But it is just a lot easier on the eye. While I understand it would be conveni

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

2024-09-17 Thread Per Minborg
On Mon, 16 Sep 2024 12:01:26 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 &

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

2024-09-17 Thread Per Minborg
| 5,905,487 | > | Delta |940| > > For 60 billion instances, this represents > 50 TB. > > Tried and passed tier1-3 Per Minborg has updated the pull request incrementally with two additional commits since the last revision: - Updat

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

2024-09-17 Thread Per Minborg
| 5,905,487 | > | Delta |940| > > For 60 billion instances, this represents > 50 TB. > > Tried and passed tier1-3 Per Minborg has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev

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

2024-09-23 Thread Per Minborg
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 st

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

2024-09-20 Thread Per Minborg
On Tue, 17 Sep 2024 14:25:42 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 &

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

2024-09-20 Thread Per Minborg
| 5,905,487 | > | Delta |940| > > For 60 billion instances, this represents > 50 TB. > > Tried and passed tier1-3 Per Minborg has updated the pull request incrementally with one additional commit since the last revision: R

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

2024-09-20 Thread Per Minborg
| 5,905,487 | > | Delta |940| > > For 60 billion instances, this represents > 50 TB. > > Tried and passed tier1-3 Per Minborg has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev exclu

Re: RFR: 8356255: Add Stable Field Updaters to allow efficient lazy field evaluations

2025-05-06 Thread Per Minborg
On Mon, 5 May 2025 15:04:54 GMT, Chen Liang wrote: >> This sketch shows how "Stable Updaters" can be used to create stable >> computations of `@Stable` fields. Only one updater is needed per class, >> similar to `AtomicIntegerFieldUpdater`. > > src/java.base/share/classes/java/lang/reflect/Meth

Re: RFR: 8356255: Add Stable Field Updaters to allow efficient lazy field evaluations

2025-05-06 Thread Per Minborg
On Mon, 5 May 2025 13:41:22 GMT, Per Minborg wrote: > This sketch shows how "Stable Updaters" can be used to create stable > computations of `@Stable` fields. Only one updater is needed per class, > similar to `AtomicIntegerFieldUpdater`. Benchmarks: Benchmark

RFR: 8356255: Add Stable Field Updaters to allow efficient lazy field evaluations

2025-05-06 Thread Per Minborg
This sketch shows how "Stable Updaters" can be used to create stable computations of `@Stable` fields. Only one updater is needed per class, similar to `AtomicIntegerFieldUpdater`. - Commit messages: - Address comments - Document field alignment assumption - Add unhecked call tes

Re: RFR: 8356255: Add Stable Field Updaters to allow efficient lazy field evaluations

2025-05-06 Thread Per Minborg
On Tue, 6 May 2025 10:55:22 GMT, Chen Liang wrote: >> Do you mean for interacting with the field or computing the hash? > > Calling the method that computes hash. This would require another implementation to be written. Maybe we can add that later? - PR Review Comment: https://git

Re: RFR: 8356255: Add Stable Field Updaters to allow efficient lazy field evaluations [v2]

2025-05-06 Thread Per Minborg
> This sketch shows how "Stable Updaters" can be used to create stable > computations of `@Stable` fields. Only one updater is needed per class, > similar to `AtomicIntegerFieldUpdater`. Per Minborg has updated the pull request incrementally with one additional commit sinc

Re: RFR: 8356255: Add Stable Field Updaters to allow efficient lazy field evaluations [v4]

2025-05-07 Thread Per Minborg
> This sketch shows how "Stable Updaters" can be used to create stable > computations of `@Stable` fields. Only one updater is needed per class, > similar to `AtomicIntegerFieldUpdater`. Per Minborg has updated the pull request incrementally with two additional commits sinc

Re: RFR: 8356255: Add Stable Field Updaters to allow efficient lazy field evaluations [v5]

2025-05-07 Thread Per Minborg
> This sketch shows how "Stable Updaters" can be used to create stable > computations of `@Stable` fields. Only one updater is needed per class, > similar to `AtomicIntegerFieldUpdater`. Per Minborg has updated the pull request with a new target base due to a merge or a reba

  1   2   >