Re: RFR: 8353197: Document preconditions for JavaLangAccess methods [v7]

2025-05-15 Thread Per Minborg
On Mon, 12 May 2025 19:42:15 GMT, Volkan Yazici wrote: >> Document preconditions on certain `JavaLangAccess` methods that use >> operations either unsafe and/or without range checks. > > Volkan Yazici has updated the pull request with a new target base due to a > merge or a rebase. The incremen

Re: RFR: 8353197: Document preconditions for JavaLangAccess methods [v4]

2025-05-12 Thread Per Minborg
On Fri, 9 May 2025 08:31:35 GMT, Volkan Yazici wrote: >> Document preconditions on certain `JavaLangAccess` methods that use >> operations either unsafe and/or without range checks. > > Volkan Yazici has updated the pull request incrementally with one additional > commit since the last revision

Re: RFR: 8353197: Document preconditions for JavaLangAccess methods [v3]

2025-05-08 Thread Per Minborg
On Wed, 7 May 2025 18:33:11 GMT, Volkan Yazici wrote: >> Document preconditions on certain `JavaLangAccess` methods that use >> operations either unsafe and/or without range checks. > > Volkan Yazici has updated the pull request incrementally with one additional > commit since the last revision

Re: RFR: 8351565: Implement JEP 502: Stable Values (Preview)

2025-03-15 Thread Per Minborg
On Mon, 10 Mar 2025 19:45:53 GMT, Chen Liang wrote: >> Implement JEP 502. >> >> The PR passes tier1-tier3 tests. > > src/hotspot/share/ci/ciField.cpp line 255: > >> 253: static bool trust_final_non_static_fields_of_type(Symbol* signature) { >> 254: return signature == vmSymbols::java_lang_Sta

Re: RFR: 8351565: Implement JEP 502: Stable Values (Preview)

2025-03-13 Thread Per Minborg
On Tue, 11 Mar 2025 19:04:39 GMT, Chen Liang wrote: >> src/java.base/share/classes/java/lang/StableValue.java line 344: >> >>> 342: * {@linkplain java.lang.ref##reachability reachable} stable values >>> will hold their set >>> 343: * content perpetually. >>> 344: * >> >> Should the origina

Re: RFR: 8351565: Implement JEP 502: Stable Values (Preview) [v6]

2025-03-13 Thread Per Minborg
> Implement JEP 502. > > The PR passes tier1-tier3 tests. Per Minborg has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 246 commits: - Merge branch 'master' into implement-jep502 - Clean up exception messag

Re: RFR: 8351565: Implement JEP 502: Stable Values (Preview) [v5]

2025-03-13 Thread Per Minborg
> Implement JEP 502. > > The PR passes tier1-tier3 tests. Per Minborg has updated the pull request incrementally with one additional commit since the last revision: Clean up exception messages and fix comments - Changes: - all: https://git.openjdk.org/jdk/pull/23

Re: RFR: 8351565: Implement JEP 502: Stable Values (Preview) [v4]

2025-03-13 Thread Per Minborg
> Implement JEP 502. > > The PR passes tier1-tier3 tests. Per Minborg has updated the pull request incrementally with one additional commit since the last revision: Rename field - Changes: - all: https://git.openjdk.org/jdk/pull/23972/files - new: https://git.op

Re: RFR: 8351565: Implement JEP 502: Stable Values (Preview) [v3]

2025-03-13 Thread Per Minborg
> Implement JEP 502. > > The PR passes tier1-tier3 tests. Per Minborg has updated the pull request incrementally with one additional commit since the last revision: Rename method and fix comment - Changes: - all: https://git.openjdk.org/jdk/pull/23972/files - n

Re: RFR: 8351565: Implement JEP 502: Stable Values (Preview) [v2]

2025-03-13 Thread Per Minborg
> Implement JEP 502. > > The PR passes tier1-tier3 tests. Per Minborg has updated the pull request incrementally with one additional commit since the last revision: Rework reenterant logic - Changes: - all: https://git.openjdk.org/jdk/pull/23972/files - n

Re: RFR: 8351565: Implement JEP 502: Stable Values (Preview)

2025-03-13 Thread Per Minborg
On Tue, 11 Mar 2025 07:50:38 GMT, Quan Anh Mai wrote: >> Implement JEP 502. >> >> The PR passes tier1-tier3 tests. > > src/java.base/share/classes/java/util/ImmutableCollections.java line 777: > >> 775: private final IntFunction mapper; >> 776: @Stable >> 777: private fi

Re: RFR: 8351565: Implement JEP 502: Stable Values (Preview)

2025-03-13 Thread Per Minborg
On Wed, 12 Mar 2025 14:38:28 GMT, Luca Kellermann wrote: >> This is something we experimented with a bit in the past. It isn't easy to >> do in the general case. There are pros (the function and its resources that >> can be collected) and cons (e.g., mutability, visibility, complexity, etc.) >

Re: RFR: 8351565: Implement JEP 502: Stable Values (Preview)

2025-03-13 Thread Per Minborg
On Tue, 11 Mar 2025 08:44:51 GMT, Per Minborg wrote: >> What if instead you had a `@Stable` array of Object of the appropriate size, >> and populated each cell with a StableValue if the corresponding index was in >> the set, otherwise used a sentinel value. Then on the loo

Re: RFR: 8351565: Implement JEP 502: Stable Values (Preview)

2025-03-13 Thread Per Minborg
On Wed, 12 Mar 2025 14:14:59 GMT, Per Minborg wrote: >> You can probably use `acquire` only for the first `get` as it is in the fast >> path. For other I guess `volatile` is fine. > > Yeah. Maybe that could strike a balance. On an M1 Mac: Volatile: StableValueBenchmark.

Re: RFR: 8351565: Implement JEP 502: Stable Values (Preview)

2025-03-13 Thread Per Minborg
On Tue, 11 Mar 2025 00:40:31 GMT, Johannes Graham wrote: >> Indeed, a bit set predicate can be used to check input validity if it is >> necessary - I think for enums, using a `StableFunction.ofEnum` dedicated API >> might be better just because `StableValue` can access >> `Class.getEnumConstan

Re: RFR: 8351565: Implement JEP 502: Stable Values (Preview)

2025-03-13 Thread Per Minborg
On Wed, 12 Mar 2025 13:28:12 GMT, Maurizio Cimadamore wrote: >> What would be the difference between `@Stable StableValueImpl[] backing` >> and `@Stable Object[] backing`? > > It's true that the storage can be flatter here -- that said, this can also be > done as a later refactoring. One advan

Re: RFR: 8351565: Implement JEP 502: Stable Values (Preview)

2025-03-13 Thread Per Minborg
On Tue, 11 Mar 2025 16:15:10 GMT, Quan Anh Mai wrote: >> Can you please elaborate a bit more on your proposal @merykitty? > > If you have an `@Stable Object[]`, then the elements are also considered > `@Stable`. Then you can do something like: > > ReentrantLock[] locks; > > T get(int i

Re: RFR: 8351565: Implement JEP 502: Stable Values (Preview)

2025-03-13 Thread Per Minborg
On Tue, 11 Mar 2025 01:20:16 GMT, Johannes Graham wrote: >> Implement JEP 502. >> >> The PR passes tier1-tier3 tests. > > src/java.base/share/classes/java/util/ImmutableCollections.java line 772: > >> 770: >> 771: @jdk.internal.ValueBased >> 772: static final class StableList extends A

Re: RFR: 8351565: Implement JEP 502: Stable Values (Preview)

2025-03-13 Thread Per Minborg
On Mon, 10 Mar 2025 18:11:23 GMT, Per Minborg wrote: > Implement JEP 502. > > The PR passes tier1-tier3 tests. Here are the current benchmarks for Mac M1: Benchmark Mode Cnt Score Error Units StableFunctionBenchmark.function

RFR: 8351565: Implement JEP 502: Stable Values (Preview)

2025-03-13 Thread Per Minborg
Implement JEP 502. The PR passes tier1-tier3 tests. - Commit messages: - Use acquire semantics for reading rather than volatile semantics - Add missing null check - Simplify handling of sentinel, wrap, and unwrap - Fix JavaDoc issues - Fix members in StableEnumFunction - Addres

Integrated: 8344419: Use StaticProperty in some JDK classes

2024-11-26 Thread Per Minborg
On Mon, 18 Nov 2024 17:52:04 GMT, Per Minborg wrote: > This PR proposes to use `StaticProperty.javaHome()` instead of > `System.getPropoerty("java.home")` in some internal classes. This pull request has now been integrated. Changeset: fc2da15b Author:Per Minborg U

RFR: 8344419: Use StaticProperty in some JDK classes

2024-11-25 Thread Per Minborg
This PR proposes to use `StaticProperty.javaHome()` instead of `System.getPropoerty("java.home")` in some internal classes. - Commit messages: - Update copyright year - Move imports - Revert erroneous revert - Remove trailing spaces - Revert line break - Revert changes to Java

Re: RFR: 8344882: (bf) Temporary direct buffers should not count against the upper limit on direct buffer memory

2024-11-24 Thread Per Minborg
On Fri, 22 Nov 2024 23:44:11 GMT, Brian Burkhalter wrote: > Make the memory used by internal temporary direct buffers not count towards > the upper limit on direct buffer memory. Could we add some tests also? - PR Comment: https://git.openjdk.org/jdk/pull/22339#issuecomment-249708

Integrated: 8297505: Declare fields in some sun.security.pkcs11 classes as final

2022-12-12 Thread Per Minborg
On Thu, 24 Nov 2022 08:13:58 GMT, Per Minborg wrote: > This PR proposes declaring some fields as `final` to potentially unlock > performance optimisations and improve thread visibility (e.g. for GC > threads). The PR also fixes a "synchronising on a non-final field" > an

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

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

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:

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: 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: 8297519: Improve expressions and modernise code in PKCS

2022-11-30 Thread Per Minborg
On Thu, 24 Nov 2022 08:24:37 GMT, Per Minborg wrote: > During the work of another PR (https://github.com/openjdk/jdk/pull/11260), > several improvement areas were identified. These are now adressed in this > separate PR proposing the use of more modern Java constructs as well as >

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 [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 [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

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

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 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: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: 8297519: Improve expressions and modernise code [v3]

2022-11-30 Thread Per Minborg
ns that were previously > non-normative. > > > This branch has been tested and passed tier1-4 tests. Per Minborg has updated the pull request incrementally with one additional commit since the last revision: Remove switch and use pattern matching - Changes: - all: htt

Re: RFR: 8297519: Improve expressions and modernise code [v2]

2022-11-29 Thread Per Minborg
On Tue, 29 Nov 2022 16:12:11 GMT, Weijun Wang wrote: >> Per Minborg has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Update from the first round of comments > > src/jdk.crypto.cryptoki/share/classes/sun/secu

Integrated: 8297515: serialVersionUID fields are not annotated with @Serial

2022-11-29 Thread Per Minborg
On Thu, 24 Nov 2022 08:19:17 GMT, Per Minborg wrote: > This PR proposes adding `@Serial` annotations to certain fields participating > in serialisation. This pull request has now been integrated. Changeset: f05bfb15 Author: Per Minborg Committer: Julian Waters URL:

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: 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

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: 8297519: Improve expressions and modernise code [v2]

2022-11-28 Thread Per Minborg
ns that were previously > non-normative. > > > This branch has been tested and passed tier1-4 tests. Per Minborg has updated the pull request incrementally with one additional commit since the last revision: Update from the first round of comments - Changes: - all: htt

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 [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 [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 [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 [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 [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
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: 8297519: Improve expressions and modernise code

2022-11-24 Thread Per Minborg
On Thu, 24 Nov 2022 08:24:37 GMT, Per Minborg wrote: > During the work of another PR (https://github.com/openjdk/jdk/pull/11260), > several improvement areas were identified. These are now adressed in this > separate PR proposing the use of more modern Java constructs as well as >

RFR: 8297519: Improve expressions and modernise code

2022-11-24 Thread Per Minborg
During the work of another PR (https://github.com/openjdk/jdk/pull/11260), several improvement areas were identified. These are now adressed in this separate PR proposing the use of more modern Java constructs as well as simplifying a large number of logical expressions that were previously non

Re: RFR: 8297519: Improve expressions and modernise code

2022-11-24 Thread Per Minborg
On Thu, 24 Nov 2022 08:24:37 GMT, Per Minborg wrote: > During the work of another PR (https://github.com/openjdk/jdk/pull/11260), > several improvement areas were identified. These are now adressed in this > separate PR proposing the use of more modern Java constructs as well as >

RFR: 8297515: serialVersionUID fields are not annotated with @Serial

2022-11-24 Thread Per Minborg
This PR proposes adding `@Serial` annotations to certain fields participating in serialisation. - Commit messages: - Annotate serailzation fields with @Serial Changes: https://git.openjdk.org/jdk/pull/11347/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=11347&range=00 Is

RFR: 8297505: Declare fields in some sun.security.pkcs11 classes as final

2022-11-24 Thread Per Minborg
This PR proposes declaring some fields as `final` to potentially unlock performance optimisations and improve thread visibility (e.g. for GC threads). The PR also fixes a "synchronising on a non-final field" anti-pattern. - Commit messages: - Declare fields and classes final Chang

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 [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 [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 [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 [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 [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 [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 [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 [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 [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
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 [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 [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
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 [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 [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 [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

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

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

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