Re: RFR: 8344332: (bf) Migrate DirectByteBuffer away from jdk.internal.ref.Cleaner [v7]

2025-07-03 Thread Brent Christian
On Sun, 29 Jun 2025 20:43:56 GMT, Kim Barrett wrote: >> This change makes java.nio no longer use jdk.internal.ref.Cleaner to manage >> native memory for Direct-X-Buffers. Instead it uses bespoke PhantomReferences >> and a dedicated ReferenceQueue. This differs from PR 22165, which proposed to >>

Re: RFR: 8344332: (bf) Migrate DirectByteBuffer away from jdk.internal.ref.Cleaner [v2]

2025-06-30 Thread Brent Christian
On Sun, 29 Jun 2025 20:34:44 GMT, Kim Barrett wrote: >> I would be in favor of renaming to avoid ambiguity. There is already >> `java.lang.ref.Cleaner` and `jdk.internal.ref.Cleaner`, and now this >> `Cleaner` is really the same thing as `java.lang.ref.Cleaner.Cleanable`. >> It could be done as

Re: RFR: 8344332: (bf) Migrate DirectByteBuffer away from jdk.internal.ref.Cleaner [v6]

2025-06-30 Thread Brent Christian
On Sun, 29 Jun 2025 20:23:53 GMT, Kim Barrett wrote: >> src/java.base/share/classes/java/nio/BufferCleaner.java line 243: >> >>> 241: return; >>> 242: } >>> 243: cleaningThread = new CleaningThread(); >> >> I think double-checked locking could work well h

Re: RFR: 8344332: (bf) Migrate DirectByteBuffer away from jdk.internal.ref.Cleaner [v2]

2025-06-27 Thread Brent Christian
On Mon, 19 May 2025 20:34:35 GMT, Kim Barrett wrote: >> src/java.base/share/classes/sun/nio/Cleaner.java line 31: >> >>> 29: * {@code Cleaner} represents an object and a cleaning action. >>> 30: */ >>> 31: public interface Cleaner { >> >> Can this be renamed NIOCleaner or NIOBufClenaer or som

Re: RFR: 8344332: (bf) Migrate DirectByteBuffer away from jdk.internal.ref.Cleaner [v6]

2025-06-27 Thread Brent Christian
On Fri, 27 Jun 2025 01:03:30 GMT, Kim Barrett wrote: >> This change makes java.nio no longer use jdk.internal.ref.Cleaner to manage >> native memory for Direct-X-Buffers. Instead it uses bespoke PhantomReferences >> and a dedicated ReferenceQueue. This differs from PR 22165, which proposed to >>

Re: RFR: 8344332: (bf) Migrate DirectByteBuffer away from jdk.internal.ref.Cleaner [v6]

2025-06-27 Thread Brent Christian
On Fri, 27 Jun 2025 01:03:30 GMT, Kim Barrett wrote: >> This change makes java.nio no longer use jdk.internal.ref.Cleaner to manage >> native memory for Direct-X-Buffers. Instead it uses bespoke PhantomReferences >> and a dedicated ReferenceQueue. This differs from PR 22165, which proposed to >>

Re: RFR: 8359182: Use @requires instead of SkippedException for MaxPath.java

2025-06-11 Thread Brent Christian
On Wed, 11 Jun 2025 07:15:43 GMT, SendaoYan wrote: > Hi all, > > I think use `@requires (os.family == "windows")` is more elegant than thow > jtreg.SkippedException in test java/io/File/MaxPath.java. > > On linux before this PR, run this test jtreg report: > > > TEST: java/io/File/MaxPath.ja

Re: RFR: 8358015: Fix SequencedMap sequenced view method specifications [v2]

2025-06-02 Thread Brent Christian
On Sat, 31 May 2025 00:47:16 GMT, Stuart Marks wrote: >> For a full explanation, see the bug report >> [JDK-8358015](https://bugs.openjdk.org/browse/JDK-8358015). >> >> This PR includes three related changes: >> * New overrides in SequencedMap view collection implementations, which >> improve

Re: RFR: 8283660: Convert com/sun/jndi/ldap/AbstractLdapNamingEnumeration.java finalizer to Cleaner [v2]

2025-05-15 Thread Brent Christian
ght consider enabling the "Hide whitespace" option on the "Files changed" > tab. To my eye, it gives a better view of the changes.** Brent Christian has updated the pull request incrementally with one additional commit since the last revision: update copyright -

Re: RFR: 8283660: Convert com/sun/jndi/ldap/AbstractLdapNamingEnumeration.java finalizer to Cleaner [v2]

2025-05-15 Thread Brent Christian
On Thu, 15 May 2025 21:35:14 GMT, Hendrik Schick wrote: >> Brent Christian has updated the pull request incrementally with one >> additional commit since the last revision: >> >> update copyright > > test/jdk/com/sun/jndi/ldap/CleanerTests/LdapEnumeratio

RFR: 8283660: Convert com/sun/jndi/ldap/AbstractLdapNamingEnumeration.java finalizer to Cleaner

2025-05-14 Thread Brent Christian
Please review this change to replace the finalizer in `AbstractLdapNamingEnumeration` with Cleaner. (The [first PR](https://github.com/openjdk/jdk/pull/8311) for this fix started some substantial discussions, leading to, among other things, the [8314480](https://bugs.openjdk.org/browse/JDK-8314

Integrated: 8356107: [java.lang] Use @requires tag instead of exiting based on os.name or separatorChar property

2025-05-13 Thread Brent Christian
On Fri, 9 May 2025 23:23:27 GMT, Brent Christian wrote: > For `java.lang` tests, use the `@requires` facility in place of checking the > `os.name` system property or `File.separatorChar`. > > Automated test results are omitted as expected. This pull request has now been integrated

Re: RFR: 8356107: [java.lang] Use @requires tag instead of exiting based on os.name or separatorChar property [v3]

2025-05-12 Thread Brent Christian
> For `java.lang` tests, use the `@requires` facility in place of checking the > `os.name` system property or `File.separatorChar`. > > Automated test results are omitted as expected. Brent Christian has updated the pull request incrementally with one additional commit since the l

Re: RFR: 8356107: [java.lang] Use @requires tag instead of exiting based on os.name or separatorChar property [v2]

2025-05-12 Thread Brent Christian
> For `java.lang` tests, use the `@requires` facility in place of checking the > `os.name` system property or `File.separatorChar`. > > Automated test results are omitted as expected. Brent Christian has updated the pull request incrementally with one additional commit since the l

Re: RFR: 8356107: [java.lang] Use @requires tag instead of exiting based on os.name or separatorChar property

2025-05-12 Thread Brent Christian
On Sat, 10 May 2025 00:25:23 GMT, Naoto Sato wrote: > I think `test/jdk/java/lang/System/NonAnsiFileEncodingTest.java` can be > removed, as it does not provide any value today OK, great! Thanks, Naoto. - PR Comment: https://git.openjdk.org/jdk/pull/25163#issuecomment-2873452048

RFR: 8356107: [java.lang] Use @requires tag instead of exiting based on os.name or separatorChar property

2025-05-09 Thread Brent Christian
For `java.lang` tests, use the `@requires` facility in place of checking the `os.name` system property or `File.separatorChar`. Automated test results are omitted as expected. - Commit messages: - add @requires Changes: https://git.openjdk.org/jdk/pull/25163/files Webrev: https:

Re: RFR: 8351443: Improve robustness of StringBuilder [v9]

2025-05-09 Thread Brent Christian
On Fri, 9 May 2025 16:41:39 GMT, Roger Riggs wrote: >> Refactor AbstractStringBuilder to maintain consistency among count, coder, >> and value buffers while the buffer capacity is being expanded and/or >> inflated from Latin1 to UTF16 representations. >> The refactoring pattern is to read and

Re: RFR: 8351443: Improve robustness of StringBuilder [v6]

2025-05-07 Thread Brent Christian
On Tue, 6 May 2025 15:23:39 GMT, Roger Riggs wrote: >> Refactor AbstractStringBuilder to maintain consistency among count, coder, >> and value buffers while the buffer capacity is being expanded and/or >> inflated from Latin1 to UTF16 representations. >> The refactoring pattern is to read and

Re: RFR: 8351443: Improve robustness of StringBuilder [v6]

2025-05-07 Thread Brent Christian
On Tue, 6 May 2025 15:23:39 GMT, Roger Riggs wrote: >> Refactor AbstractStringBuilder to maintain consistency among count, coder, >> and value buffers while the buffer capacity is being expanded and/or >> inflated from Latin1 to UTF16 representations. >> The refactoring pattern is to read and

Re: RFR: 8351443: Improve robustness of StringBuilder [v6]

2025-05-06 Thread Brent Christian
On Tue, 6 May 2025 15:23:39 GMT, Roger Riggs wrote: >> Refactor AbstractStringBuilder to maintain consistency among count, coder, >> and value buffers while the buffer capacity is being expanded and/or >> inflated from Latin1 to UTF16 representations. >> The refactoring pattern is to read and

Re: RFR: 8351443: Improve robustness of StringBuilder [v6]

2025-05-06 Thread Brent Christian
On Tue, 6 May 2025 15:23:39 GMT, Roger Riggs wrote: >> Refactor AbstractStringBuilder to maintain consistency among count, coder, >> and value buffers while the buffer capacity is being expanded and/or >> inflated from Latin1 to UTF16 representations. >> The refactoring pattern is to read and

Re: RFR: 8351443: Improve robustness of StringBuilder [v6]

2025-05-06 Thread Brent Christian
On Tue, 6 May 2025 15:23:39 GMT, Roger Riggs wrote: >> Refactor AbstractStringBuilder to maintain consistency among count, coder, >> and value buffers while the buffer capacity is being expanded and/or >> inflated from Latin1 to UTF16 representations. >> The refactoring pattern is to read and

Integrated: 8298783: java/lang/ref/FinalizerHistogramTest.java failed with "RuntimeException: MyObject is not found in test output"

2025-05-06 Thread Brent Christian
On Thu, 20 Mar 2025 22:35:23 GMT, Brent Christian wrote: > I propose some cleanups to `FinalizerHistogramTest.java` to hopefully clear > up the intermittent failures: > > * run with `othervm`: this test blocks the (global) finalizer thread, and > also requires the (global) fina

Re: RFR: 8351443: Improve robustness of StringBuilder [v5]

2025-05-05 Thread Brent Christian
On Mon, 5 May 2025 17:32:19 GMT, Roger Riggs wrote: >> Refactor AbstractStringBuilder to maintain consistency among count, coder, >> and value buffers while the buffer capacity is being expanded and/or >> inflated from Latin1 to UTF16 representations. >> The refactoring pattern is to read and

Re: RFR: 8298783: java/lang/ref/FinalizerHistogramTest.java failed with "RuntimeException: MyObject is not found in test output" [v9]

2025-05-03 Thread Brent Christian
On Sat, 3 May 2025 00:35:44 GMT, Kim Barrett wrote: >> Brent Christian has updated the pull request incrementally with one >> additional commit since the last revision: >> >> remove unneeded 'trappedCount' > > test/jdk/java/lang/ref/Final

Re: RFR: 8298783: java/lang/ref/FinalizerHistogramTest.java failed with "RuntimeException: MyObject is not found in test output" [v9]

2025-05-01 Thread Brent Christian
till waiting > to be finalized and should show up in the histogram. Brent Christian has updated the pull request incrementally with one additional commit since the last revision: remove unneeded 'trappedCount' - Changes: - all: https://git.openjdk.org/jdk/pull/24143

Re: RFR: 8298783: java/lang/ref/FinalizerHistogramTest.java failed with "RuntimeException: MyObject is not found in test output" [v7]

2025-04-30 Thread Brent Christian
On Tue, 29 Apr 2025 23:16:05 GMT, Kim Barrett wrote: >> Brent Christian has updated the pull request incrementally with one >> additional commit since the last revision: >> >> convert test to use WhiteBox > > test/jdk/java/lang/ref/FinalizerHistog

Re: RFR: 8298783: java/lang/ref/FinalizerHistogramTest.java failed with "RuntimeException: MyObject is not found in test output" [v8]

2025-04-30 Thread Brent Christian
till waiting > to be finalized and should show up in the histogram. Brent Christian has updated the pull request incrementally with one additional commit since the last revision: loop until ref proc returns false - Changes: - all: https://git.openjdk.org/jdk/pull/24143/files -

Re: RFR: 8298783: java/lang/ref/FinalizerHistogramTest.java failed with "RuntimeException: MyObject is not found in test output" [v7]

2025-04-29 Thread Brent Christian
till waiting > to be finalized and should show up in the histogram. Brent Christian has updated the pull request incrementally with one additional commit since the last revision: convert test to use WhiteBox - Changes: - all: https://git.openjdk.org/jdk/pull/24143/files - new:

Re: RFR: 8298783: java/lang/ref/FinalizerHistogramTest.java failed with "RuntimeException: MyObject is not found in test output" [v6]

2025-04-29 Thread Brent Christian
till waiting > to be finalized and should show up in the histogram. Brent Christian 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 six additional comm

Integrated: 8355632: WhiteBox.waitForReferenceProcessing() fails assert for return type

2025-04-29 Thread Brent Christian
On Fri, 25 Apr 2025 23:37:13 GMT, Brent Christian wrote: > The newly-added `WhiteBox.waitForReferenceProcessing()` (see > [8305186](https://bugs.openjdk.org/browse/JDK-8305186)) always fails with > assertions enabled. > I've updated the assertion, and also added the test I use

Re: RFR: 8355632: WhiteBox.waitForReferenceProcessing() fails assert for return type [v2]

2025-04-28 Thread Brent Christian
On Sat, 26 Apr 2025 09:22:30 GMT, Kim Barrett wrote: >> test/hotspot/jtreg/vmTestbase/gc/gctests/ReferencesGC/WaitForRefProTest.java >> line 1: >> >>> 1: /* >> >> Wrong place for this test. vmTestbase is old tests, converted from an old >> testing infrastructure. >> See the readme here: >>

Re: RFR: 8355632: WhiteBox.waitForReferenceProcessing() fails assert for return type [v2]

2025-04-28 Thread Brent Christian
h assertions enabled, apparently.) Brent Christian has updated the pull request incrementally with four additional commits since the last revision: - move test - rename test class - enable assertions on test itself - use boolean.class - Changes: - all: https://git.openjdk.org/

Re: RFR: 8355632: WhiteBox.waitForReferenceProcessing() fails assert for return type

2025-04-28 Thread Brent Christian
On Sat, 26 Apr 2025 00:10:04 GMT, Stuart Marks wrote: >> The newly-added `WhiteBox.waitForReferenceProcessing()` (see >> [8305186](https://bugs.openjdk.org/browse/JDK-8305186)) always fails with >> assertions enabled. >> I've updated the assertion, and also added the test I used locally to test

Re: RFR: 8298783: java/lang/ref/FinalizerHistogramTest.java failed with "RuntimeException: MyObject is not found in test output" [v5]

2025-04-25 Thread Brent Christian
till waiting > to be finalized and should show up in the histogram. Brent Christian 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 five additional comm

Integrated: 8305186: Reference.waitForReferenceProcessing should be more accessible to tests

2025-04-25 Thread Brent Christian
On Tue, 8 Apr 2025 20:20:56 GMT, Brent Christian wrote: > Certain specific types of tests involving GC and reference processing need to > account for the delay between a GC completing (during which the GC clears a > Reference), and the Reference being added to its associated

Re: RFR: 8305186: Reference.waitForReferenceProcessing should be more accessible to tests [v9]

2025-04-23 Thread Brent Christian
ferenceProcessing()` available to tests via the `WhiteBox` and > `ForceGC` test libraries. Brent Christian has updated the pull request incrementally with one additional commit since the last revision: t -> e - Changes: - all: https://git.openjdk.org/jdk/pull/24527/files

Re: RFR: 8305186: Reference.waitForReferenceProcessing should be more accessible to tests [v8]

2025-04-23 Thread Brent Christian
On Wed, 23 Apr 2025 06:08:59 GMT, Kim Barrett wrote: >> Brent Christian has updated the pull request incrementally with one >> additional commit since the last revision: >> >> make waitForReferenceProcessingMethod volatile > > test/lib/jdk/test/whitebox/Whi

Re: RFR: 8305186: Reference.waitForReferenceProcessing should be more accessible to tests [v8]

2025-04-22 Thread Brent Christian
ferenceProcessing()` available to tests via the `WhiteBox` and > `ForceGC` test libraries. Brent Christian has updated the pull request incrementally with one additional commit since the last revision: make waitForReferenceProcessingMethod volatile - Changes: - all: https://

Re: RFR: 8305186: Reference.waitForReferenceProcessing should be more accessible to tests [v6]

2025-04-22 Thread Brent Christian
On Mon, 14 Apr 2025 03:57:41 GMT, Kim Barrett wrote: >> test/lib/jdk/test/whitebox/WhiteBox.java line 609: >> >>> 607: throw e; >>> 608: } catch (Throwable t) { >>> 609: throw new RuntimeException(t); >> >> The only checked exceptions that are thrown by the try-body are >> `Inv

Re: RFR: 8305186: Reference.waitForReferenceProcessing should be more accessible to tests [v7]

2025-04-22 Thread Brent Christian
ferenceProcessing()` available to tests via the `WhiteBox` and > `ForceGC` test libraries. Brent Christian has updated the pull request incrementally with one additional commit since the last revision: catch IllegalAccessException instead of Throwable - Changes: - all: https://

Re: RFR: 8305186: Reference.waitForReferenceProcessing should be more accessible to tests [v6]

2025-04-11 Thread Brent Christian
ferenceProcessing()` available to tests via the `WhiteBox` and > `ForceGC` test libraries. Brent Christian has updated the pull request incrementally with two additional commits since the last revision: - Make *the method* static, also - Make Method static - Changes: - all: ht

Re: RFR: 8305186: Reference.waitForReferenceProcessing should be more accessible to tests [v5]

2025-04-11 Thread Brent Christian
On Fri, 11 Apr 2025 21:36:28 GMT, Roger Riggs wrote: >> Brent Christian has updated the pull request incrementally with one >> additional commit since the last revision: >> >> wFRP throws InterruptedException, pass through from >> InvocationTargetException; do

Re: RFR: 8354335: No longer deprecate wrapper class constructors for removal

2025-04-11 Thread Brent Christian
On Thu, 10 Apr 2025 22:05:04 GMT, Roger Riggs wrote: > Remove forRemoval = true from @Deprecated annotation of Boolean, Byte, > Character, Double, Float, Integer, Long, Short. > And add `SuppressWarnings("deprecation") `where needed; and remove > `SuppressWarnings("removal")` LGTM ---

Re: RFR: 8305186: Reference.waitForReferenceProcessing should be more accessible to tests [v3]

2025-04-11 Thread Brent Christian
On Fri, 11 Apr 2025 02:25:20 GMT, Stuart Marks wrote: >> I disagree. IMO, for a test library, it's an unnecessary burden to make >> callers catch a checked exception. > > Hm. In general, if something blocks interruptibly, it should be declared to > throw InterruptedException instead of catching

Re: RFR: 8305186: Reference.waitForReferenceProcessing should be more accessible to tests [v5]

2025-04-11 Thread Brent Christian
ferenceProcessing()` available to tests via the `WhiteBox` and > `ForceGC` test libraries. Brent Christian has updated the pull request incrementally with one additional commit since the last revision: wFRP throws InterruptedException, pass through from InvocationTargetException; don't

Re: RFR: 8305186: Reference.waitForReferenceProcessing should be more accessible to tests [v3]

2025-04-10 Thread Brent Christian
On Thu, 10 Apr 2025 05:33:18 GMT, Kim Barrett wrote: >> Brent Christian has updated the pull request incrementally with one >> additional commit since the last revision: >> >> reflection improvements > > test/lib/jdk/test/whitebox/WhiteBox.java line 572: &

Re: RFR: 8305186: Reference.waitForReferenceProcessing should be more accessible to tests [v3]

2025-04-10 Thread Brent Christian
On Thu, 10 Apr 2025 06:08:37 GMT, Kim Barrett wrote: >> Brent Christian has updated the pull request incrementally with one >> additional commit since the last revision: >> >> reflection improvements > > test/lib/jdk/test/whitebox/WhiteBox.java line 5

Re: RFR: 8305186: Reference.waitForReferenceProcessing should be more accessible to tests [v3]

2025-04-10 Thread Brent Christian
On Thu, 10 Apr 2025 05:51:04 GMT, Kim Barrett wrote: >> Brent Christian has updated the pull request incrementally with one >> additional commit since the last revision: >> >> reflection improvements > > test/lib/jdk/test/whitebox/WhiteBox.java line 570: >

Re: RFR: 8305186: Reference.waitForReferenceProcessing should be more accessible to tests [v4]

2025-04-10 Thread Brent Christian
ferenceProcessing()` available to tests via the `WhiteBox` and > `ForceGC` test libraries. Brent Christian has updated the pull request incrementally with one additional commit since the last revision: Separate method to setup Method, per Kim; also simplify exception handling --

RFR: 8305186: Reference.waitForReferenceProcessing should be more accessible to tests

2025-04-10 Thread Brent Christian
Certain specific types of tests involving GC and reference processing need to account for the delay between a GC completing (during which the GC clears a Reference), and the Reference being added to its associated queue. At present, ad hoc mechanisms (with delays/timeout) are used, but can lead

Re: RFR: 8305186: Reference.waitForReferenceProcessing should be more accessible to tests [v2]

2025-04-09 Thread Brent Christian
On Wed, 9 Apr 2025 22:34:13 GMT, Kim Barrett wrote: >> Brent Christian has updated the pull request incrementally with one >> additional commit since the last revision: >> >> only add wFRP to WhiteBox for now > > test/lib/jdk/test/whitebox/WhiteBox.java line

Re: RFR: 8305186: Reference.waitForReferenceProcessing should be more accessible to tests [v3]

2025-04-09 Thread Brent Christian
On Tue, 8 Apr 2025 21:16:22 GMT, Roger Riggs wrote: >> Brent Christian has updated the pull request incrementally with one >> additional commit since the last revision: >> >> reflection improvements > > test/lib/jdk/test/lib/util/ForceGC.java line 125: >

Re: RFR: 8305186: Reference.waitForReferenceProcessing should be more accessible to tests [v3]

2025-04-09 Thread Brent Christian
ferenceProcessing()` available to tests via the `WhiteBox` and > `ForceGC` test libraries. Brent Christian has updated the pull request incrementally with one additional commit since the last revision: reflection improvements - Changes: - all: https://git.openjdk.org

Re: RFR: 8305186: Reference.waitForReferenceProcessing should be more accessible to tests [v2]

2025-04-09 Thread Brent Christian
On Tue, 8 Apr 2025 22:44:57 GMT, Kim Barrett wrote: >> Brent Christian has updated the pull request incrementally with one >> additional commit since the last revision: >> >> only add wFRP to WhiteBox for now > > test/lib/jdk/test/lib/util/ForceGC.java line 11

Re: RFR: 8305186: Reference.waitForReferenceProcessing should be more accessible to tests [v2]

2025-04-09 Thread Brent Christian
On Tue, 8 Apr 2025 22:55:53 GMT, Brent Christian wrote: >> test/lib/jdk/test/whitebox/WhiteBox.java line 569: >> >>> 567:* This method should usually be called after a call to >>> WhiteBox.fullGC(). >>> 568:*/ >>> 569: public static vo

Re: RFR: 8305186: Reference.waitForReferenceProcessing should be more accessible to tests [v2]

2025-04-09 Thread Brent Christian
ferenceProcessing()` available to tests via the `WhiteBox` and > `ForceGC` test libraries. Brent Christian has updated the pull request incrementally with one additional commit since the last revision: only add wFRP to WhiteBox for now - Changes: - all: https://git.openjdk.org

Re: RFR: 8305186: Reference.waitForReferenceProcessing should be more accessible to tests

2025-04-08 Thread Brent Christian
On Tue, 8 Apr 2025 21:19:06 GMT, Roger Riggs wrote: >> Certain specific types of tests involving GC and reference processing need >> to account for the delay between a GC completing (during which the GC clears >> a Reference), and the Reference being added to its associated queue. At >> presen

Re: RFR: 8298783: java/lang/ref/FinalizerHistogramTest.java failed with "RuntimeException: MyObject is not found in test output" [v3]

2025-04-05 Thread Brent Christian
till waiting > to be finalized and should show up in the histogram. Brent Christian has updated the pull request incrementally with one additional commit since the last revision: 'return' not needed in lambda - Changes: - all: https://git.openjdk.org/jdk/pull/24143

Re: RFR: 8298783: java/lang/ref/FinalizerHistogramTest.java failed with "RuntimeException: MyObject is not found in test output" [v4]

2025-04-05 Thread Brent Christian
On Fri, 28 Mar 2025 09:34:58 GMT, Jaikiran Pai wrote: >> Brent Christian has updated the pull request incrementally with one >> additional commit since the last revision: >> >> convert to WeakRefs, use a RefQ, print ForceGC results > > test/jdk/java/lang/ref/Fi

Re: RFR: 8352565: Add native method implementation of Reference.get() [v2]

2025-04-01 Thread Brent Christian
On Tue, 1 Apr 2025 09:43:28 GMT, Kim Barrett wrote: >> Please review this change which adds a native method providing the >> implementation of Reference::get. Referece::get is an intrinsic candidate, >> so >> this native method implementation is only used when the intrinsic is not. >> >> Curre

Re: RFR: 8298783: java/lang/ref/FinalizerHistogramTest.java failed with "RuntimeException: MyObject is not found in test output" [v4]

2025-03-27 Thread Brent Christian
till waiting > to be finalized and should show up in the histogram. Brent Christian has updated the pull request incrementally with one additional commit since the last revision: convert to WeakRefs, use a RefQ, print ForceGC results - Changes: - all: https://git.openjdk.o

Re: RFR: 8298783: java/lang/ref/FinalizerHistogramTest.java failed with "RuntimeException: MyObject is not found in test output" [v3]

2025-03-27 Thread Brent Christian
On Thu, 27 Mar 2025 02:10:40 GMT, Jaikiran Pai wrote: >> `ForceGC` is already waiting for `trappedCount > 0`. And I would point out >> that `ForceGC` will be making several `System.gc()` calls, compared to just >> one in the original version of the test. >> >> But if there's concern that we wo

Re: RFR: 8298783: java/lang/ref/FinalizerHistogramTest.java failed with "RuntimeException: MyObject is not found in test output"

2025-03-26 Thread Brent Christian
On Fri, 21 Mar 2025 14:24:13 GMT, Mikhail Yankelevich wrote: >> I propose some cleanups to `FinalizerHistogramTest.java` to hopefully clear >> up the intermittent failures: >> >> * run with `othervm`: this test blocks the (global) finalizer thread, and >> also requires the (global) finalizer

Re: RFR: 8298783: java/lang/ref/FinalizerHistogramTest.java failed with "RuntimeException: MyObject is not found in test output" [v3]

2025-03-26 Thread Brent Christian
On Wed, 26 Mar 2025 14:49:23 GMT, Jaikiran Pai wrote: >> Brent Christian has updated the pull request incrementally with one >> additional commit since the last revision: >> >> 'return' not needed in lambda > > test/jdk/java/lang/ref/Final

Re: RFR: 8298783: java/lang/ref/FinalizerHistogramTest.java failed with "RuntimeException: MyObject is not found in test output" [v2]

2025-03-21 Thread Brent Christian
till waiting > to be finalized and should show up in the histogram. Brent Christian has updated the pull request incrementally with one additional commit since the last revision: rename counter variables to use 'Count' - Changes: - all: https://git.openjdk.org/jdk/pull/

Re: RFR: 8298783: java/lang/ref/FinalizerHistogramTest.java failed with "RuntimeException: MyObject is not found in test output" [v3]

2025-03-21 Thread Brent Christian
On Fri, 21 Mar 2025 14:24:19 GMT, Mikhail Yankelevich wrote: >> Brent Christian has updated the pull request incrementally with one >> additional commit since the last revision: >> >> 'return' not needed in lambda > > test/jdk/java/lang/ref/Final

Re: RFR: 8298783: java/lang/ref/FinalizerHistogramTest.java failed with "RuntimeException: MyObject is not found in test output" [v2]

2025-03-21 Thread Brent Christian
On Fri, 21 Mar 2025 14:24:16 GMT, Mikhail Yankelevich wrote: >> Brent Christian has updated the pull request incrementally with one >> additional commit since the last revision: >> >> rename counter variables to use 'Count' > > test/jdk/java/lang

RFR: 8298783: java/lang/ref/FinalizerHistogramTest.java failed with "RuntimeException: MyObject is not found in test output"

2025-03-20 Thread Brent Christian
I propose some cleanups to `FinalizerHistogramTest.java` to hopefully clear up the intermittent failures: * run with `othervm`: this test blocks the (global) finalizer thread, and also requires the (global) finalizer thread to enter the test's `finalize()` method * The test uses `volatile` ints,

Re: RFR: 8351374: Improve comment about queue.remove timeout in CleanerImpl.run

2025-03-13 Thread Brent Christian
On Fri, 7 Mar 2025 23:17:53 GMT, Kim Barrett wrote: > Please review this revision of a previously puzzling comment intending to > provide the rationale for a bit of non-obvious code. Changes requested by bchristi (Reviewer). - PR Review: https://git.openjdk.org/jdk/pull/23952#pullr

Re: RFR: 8351374: Improve comment about queue.remove timeout in CleanerImpl.run

2025-03-13 Thread Brent Christian
On Wed, 12 Mar 2025 19:57:23 GMT, Kim Barrett wrote: >> src/java.base/share/classes/jdk/internal/ref/CleanerImpl.java line 142: >> >>> 140: // while there are registered cleanables for other >>> objects. >>> 141: // If the application cleans all remaining cleanab

Re: RFR: 8351374: Improve comment about queue.remove timeout in CleanerImpl.run

2025-03-10 Thread Brent Christian
On Fri, 7 Mar 2025 23:17:53 GMT, Kim Barrett wrote: > Please review this revision of a previously puzzling comment intending to > provide the rationale for a bit of non-obvious code. src/java.base/share/classes/jdk/internal/ref/CleanerImpl.java line 142: > 140: // while there ar

Re: RFR: 8344332: (bf) Migrate DirectByteBuffer to use java.lang.ref.Cleaner [v13]

2025-03-04 Thread Brent Christian
On Sun, 23 Feb 2025 10:20:23 GMT, Kim Barrett wrote: > I've made a prototype that adds Cleaner.waitForCleaning() and changes > Bits.reserveMemory() to use it. > > https://github.com/openjdk/jdk/compare/master...kimbarrett:openjdk-jdk:wait-for-cleaning?expand=1 These caught my eye during my rea

Re: RFR: 8204868: java/util/zip/ZipFile/TestCleaner.java still fails with "cleaner failed to clean zipfile."

2025-02-26 Thread Brent Christian
On Mon, 24 Feb 2025 05:50:40 GMT, Jaikiran Pai wrote: > Can I please get a review of this test-only change which proposes to address > an intermittent failure in the > `test/jdk/java/util/zip/ZipFile/TestCleaner.java` test? > > This test does operations on Inflater/Deflater/ZipFile and closes

Re: RFR: 8349107: Remove RMI finalizers [v2]

2025-02-04 Thread Brent Christian
On Mon, 3 Feb 2025 19:13:10 GMT, Brent Christian wrote: >> 3 finalizers in RMI code can be removed, as they do not perform meaningful >> cleanup. >> >> **`jdk.naming.rmi/share/classes/com/sun/jndi/rmi/registry/RegistryContext`** >> >> `RegistryContext.f

Integrated: 8349107: Remove RMI finalizers

2025-02-04 Thread Brent Christian
On Sat, 1 Feb 2025 00:11:31 GMT, Brent Christian wrote: > 3 finalizers in RMI code can be removed, as they do not perform meaningful > cleanup. > > **`jdk.naming.rmi/share/classes/com/sun/jndi/rmi/registry/RegistryContext`** > > `RegistryContext.finalize()` just calls `cl

Re: RFR: 8349107: Remove RMI finalizers [v2]

2025-02-03 Thread Brent Christian
very long standing bug that `close()` should be > calling `in.close()`, in which case this evaluation will need to be revisited. Brent Christian 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

RFR: 8349107: Remove RMI finalizers

2025-01-31 Thread Brent Christian
3 finalizers in RMI code can be removed, as they do not perform meaningful cleanup. **`jdk.naming.rmi/share/classes/com/sun/jndi/rmi/registry/RegistryContext`** `RegistryContext.finalize()` just calls `close()`. The `close()` method does not perform any cleanup per se, but rather "helps the gar

Re: RFR: 8344332: (bf) Migrate DirectByteBuffer to use java.lang.ref.Cleaner [v11]

2025-01-29 Thread Brent Christian
On Wed, 29 Jan 2025 19:56:00 GMT, Aleksey Shipilev wrote: >> DirectByteBuffers are still using old `jdk.internal.ref.Cleaner` >> implementation. That implementation carries a doubly-linked list, and so >> makes DBB suffer from the same issue fixed for generic >> `java.lang.ref.Cleaner` users w

Re: RFR: 8344332: (bf) Migrate DirectByteBuffer to use java.lang.ref.Cleaner [v9]

2025-01-29 Thread Brent Christian
On Wed, 29 Jan 2025 10:58:07 GMT, Aleksey Shipilev wrote: > > > Would you mind holding off until Tuesday to give time to get that done? > > > > > > Sure, there is no rush with this PR. I'll wait. > > How is it going, @AlanBateman? Any progress on closed tests? Nearly done - in review now. --

Re: RFR: 8344332: (bf) Migrate DirectByteBuffer to use java.lang.ref.Cleaner [v9]

2025-01-24 Thread Brent Christian
On Fri, 24 Jan 2025 11:30:16 GMT, Aleksey Shipilev wrote: > Testing is still clean on my side. I would appreciate if folks can run this > through their CIs. > > I am planning to integrate this on Monday, as long as we discover no new > issues. Did the change to `test/jdk/sun/security/provide

Re: RFR: 8344332: (bf) Migrate DirectByteBuffer to use java.lang.ref.Cleaner [v9]

2025-01-23 Thread Brent Christian
On Thu, 23 Jan 2025 08:51:38 GMT, Aleksey Shipilev wrote: >> DirectByteBuffers are still using old `jdk.internal.ref.Cleaner` >> implementation. That implementation carries a doubly-linked list, and so >> makes DBB suffer from the same issue fixed for generic >> `java.lang.ref.Cleaner` users w

Re: RFR: 8344332: (bf) Migrate DirectByteBuffer to use java.lang.ref.Cleaner [v9]

2025-01-23 Thread Brent Christian
On Thu, 23 Jan 2025 08:51:38 GMT, Aleksey Shipilev wrote: >> DirectByteBuffers are still using old `jdk.internal.ref.Cleaner` >> implementation. That implementation carries a doubly-linked list, and so >> makes DBB suffer from the same issue fixed for generic >> `java.lang.ref.Cleaner` users w

Re: RFR: 8344332: (bf) Migrate DirectByteBuffer to use java.lang.ref.Cleaner [v8]

2025-01-22 Thread Brent Christian
On Wed, 22 Jan 2025 17:50:52 GMT, Aleksey Shipilev wrote: >> DirectByteBuffers are still using old `jdk.internal.ref.Cleaner` >> implementation. That implementation carries a doubly-linked list, and so >> makes DBB suffer from the same issue fixed for generic >> `java.lang.ref.Cleaner` users w

Re: RFR: 8344332: (bf) Migrate DirectByteBuffer to use java.lang.ref.Cleaner [v8]

2025-01-22 Thread Brent Christian
On Wed, 22 Jan 2025 17:50:52 GMT, Aleksey Shipilev wrote: >> DirectByteBuffers are still using old `jdk.internal.ref.Cleaner` >> implementation. That implementation carries a doubly-linked list, and so >> makes DBB suffer from the same issue fixed for generic >> `java.lang.ref.Cleaner` users w

Re: RFR: 8347047: Cleanup action passed to MemorySegment::reinterpret keeps old segment alive

2025-01-07 Thread Brent Christian
On Tue, 7 Jan 2025 10:44:22 GMT, Per Minborg wrote: > This PR proposes to eliminate the capturing of `this` in the cleanup action > of `AbstractMemorySegment::reinterpretInternal`. As a matter of style, I believe there is something to be said for writing out cleaning actions as static nested c

Integrated: 8344575: Examine usage of ReflectUtil.forName() in java.sql.rowset - XmlReaderContentHandler

2024-12-06 Thread Brent Christian
On Thu, 5 Dec 2024 21:41:28 GMT, Brent Christian wrote: > `XmlReaderContentHandler.endElement()` routes a `Class.forName()` call > through `ReflectUtil.forName()`. When > `sun.reflect.misc.ReflectUtil.forName()` calls the 1-arg `Class.forName()`, > it is doing so from `java.b

Re: RFR: 8344575: Examine usage of ReflectUtil.forName() in java.sql.rowset - XmlReaderContentHandler [v3]

2024-12-06 Thread Brent Christian
aderContentHandler` to use the 3-arg `Class.forName()` method > with a null classloader should yield equivalent behavior. Brent Christian has updated the pull request incrementally with one additional commit since the last revision: update copyright year - Changes: - all: ht

Re: RFR: 8344575: Examine usage of ReflectUtil.forName() in java.sql.rowset - XmlReaderContentHandler

2024-12-06 Thread Brent Christian
On Fri, 6 Dec 2024 05:58:55 GMT, Alan Bateman wrote: > ReflectUtil.forName can be removed as this is the last usage. Also java.base > no longer needs to export sun.reflect.misc to java.sql.rowset. Right, thanks. Done. - PR Comment: https://git.openjdk.org/jdk/pull/22585#issuecomme

Re: RFR: 8344575: Examine usage of ReflectUtil.forName() in java.sql.rowset - XmlReaderContentHandler [v2]

2024-12-06 Thread Brent Christian
aderContentHandler` to use the 3-arg `Class.forName()` method > with a null classloader should yield equivalent behavior. Brent Christian has updated the pull request incrementally with one additional commit since the last revision: Remove ReflectUtil.forName; update module info --

RFR: 8344575: Examine usage of ReflectUtil.forName() in java.sql.rowset - XmlReaderContentHandler

2024-12-05 Thread Brent Christian
`XmlReaderContentHandler.endElement()` routes a `Class.forName()` call through `ReflectUtil.forName()`. When `sun.reflect.misc.ReflectUtil.forName()` calls the 1-arg `Class.forName()`, it is doing so from `java.base`, and so using the boot loader. Changing `XmlReaderContentHandler` to use the 3

Re: RFR: 8343704: Bad GC parallelism with processing Cleaner queues [v14]

2024-12-02 Thread Brent Christian
On Wed, 27 Nov 2024 17:23:10 GMT, Aleksey Shipilev wrote: >> How about this: >> >>> ...the problem is in GC time hiccups to walk the large linked lists. >> >> Though, for this test, `CleanableList` itself is not being walked. >> >> Rather, `CleanableList` itself is a factor in as much as it ex

Re: RFR: 8343704: Bad GC parallelism with processing Cleaner queues [v16]

2024-12-02 Thread Brent Christian
On Fri, 22 Nov 2024 17:33:35 GMT, Aleksey Shipilev wrote: >> See the bug for more discussion and reproducer. This PR replaces the ad-hoc >> linked list with segmented list of arrays. Arrays are easy targets for GC. >> There are possible improvements here, most glaring is parallelism that is >>

Integrated: 8344337: SecurityManager cleanup in java.prefs module

2024-11-25 Thread Brent Christian
On Tue, 19 Nov 2024 18:52:59 GMT, Brent Christian wrote: > Remove usages of SecurityManager, doPrivildged, and AccessController from the > java.prefs module. This pull request has now been integrated. Changeset: 4d4cef80 Author: Brent Christian URL: https://git.openjdk.o

Re: RFR: 8344337: SecurityManager cleanup in java.prefs module [v6]

2024-11-25 Thread Brent Christian
On Mon, 25 Nov 2024 19:11:02 GMT, Iris Clark wrote: >> Brent Christian has updated the pull request incrementally with one >> additional commit since the last revision: >> >> spacing changes > > src/java.prefs/macosx/classes/java/util/prefs/MacOSXPreferences

Re: RFR: 8343704: Bad GC parallelism with processing Cleaner queues [v14]

2024-11-22 Thread Brent Christian
On Fri, 22 Nov 2024 06:59:45 GMT, Aleksey Shipilev wrote: >> Would this be considered a benchmark of the GC's PhantomReference >> management, then - deciding that all the `PhantomCleanerRef`s are still >> reachable, perhaps? >> >> To measure `CleanableList`'s list manipulation at GC-time, a `T

Re: RFR: 8343704: Bad GC parallelism with processing Cleaner queues [v14]

2024-11-21 Thread Brent Christian
On Thu, 21 Nov 2024 19:29:07 GMT, Aleksey Shipilev wrote: >> Ah (facepalms), I see, I thought I assigned it! Damn. Let me fix and >> re-measure. > > Redone the benchmark. We actually want all targets to be reachable, and only > expose the Cleaner-side linked lists to the test. New performance d

Re: RFR: 8344337: SecurityManager cleanup in java.prefs module [v6]

2024-11-21 Thread Brent Christian
> Remove usages of SecurityManager, doPrivildged, and AccessController from the > java.prefs module. Brent Christian has updated the pull request incrementally with one additional commit since the last revision: spacing changes - Changes: - all: https://git.openjdk.o

Re: RFR: 8344337: SecurityManager cleanup in java.prefs module [v5]

2024-11-21 Thread Brent Christian
On Thu, 21 Nov 2024 15:05:44 GMT, Roger Riggs wrote: >> Brent Christian has updated the pull request incrementally with one >> additional commit since the last revision: >> >> indentation fixes > > src/java.prefs/unix/classes/java/util/prefs/FileSystemPreferenc

Re: RFR: 8344337: SecurityManager cleanup in java.prefs module [v5]

2024-11-21 Thread Brent Christian
On Thu, 21 Nov 2024 06:50:42 GMT, Andrey Turbanov wrote: >> Brent Christian has updated the pull request incrementally with one >> additional commit since the last revision: >> >> indentation fixes > > src/java.prefs/unix/classes/java/util/prefs/FileSyst

  1   2   3   4   >