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

2025-04-23 Thread Kim Barrett
On Wed, 23 Apr 2025 17:45:29 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 queue. At >> p

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

2025-04-23 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 c

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/WhiteBox.java line 605: > >> 603:

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

2025-04-22 Thread Kim Barrett
On Wed, 23 Apr 2025 00:23:57 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 queue. At >> p

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

2025-04-22 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 c

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

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

2025-04-14 Thread Kim Barrett
On Tue, 15 Apr 2025 00:00:35 GMT, Hans Boehm wrote: > > Racy initialization is fine, the field can be static and the last one (any > > racy init would all the same) wins: > > How did you conclude that? From what I can see, Method has non-final fields. > If another thread reads waitForReferenceP

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

2025-04-14 Thread Hans Boehm
On Fri, Apr 11, 2025 at 2:39 PM Roger Riggs wrote: > On Fri, 11 Apr 2025 20:09:10 GMT, Brent Christian > wrote: > > test/lib/jdk/test/whitebox/WhiteBox.java line 568: > > > 566: private Method getWaitForReferenceProcessingMethod() { > > 567: Method wfrp = waitForReferenceProcessingMethod;

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

2025-04-14 Thread Kim Barrett
On Fri, 11 Apr 2025 23:31:16 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 queue. At >> p

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

2025-04-14 Thread Kim Barrett
On Sat, 12 Apr 2025 05:47:06 GMT, Kim Barrett wrote: >> Brent Christian has updated the pull request incrementally with two >> additional commits since the last revision: >> >> - Make *the method* static, also >> - Make Method static > > test/lib/jdk/test/whitebox/WhiteBox.java line 609: > >

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

2025-04-11 Thread Kim Barrett
On Fri, 11 Apr 2025 23:31:16 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 queue. At >> p

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

2025-04-11 Thread Kim Barrett
On Fri, 11 Apr 2025 23:26:45 GMT, Brent Christian wrote: >> test/lib/jdk/test/whitebox/WhiteBox.java line 568: >> >>> 566: private Method getWaitForReferenceProcessingMethod() { >>> 567: Method wfrp = waitForReferenceProcessingMethod; >>> 568: if (wfrp == null) { >> >> Racy initializa

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

2025-04-11 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 c

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; don't check param count > > test/l

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

2025-04-11 Thread Roger Riggs
On Fri, 11 Apr 2025 20:09:10 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 queue. At >> p

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

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

2025-04-10 Thread Kim Barrett
On Thu, 10 Apr 2025 22:24:04 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 queue. At >> p

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

2025-04-10 Thread Stuart Marks
On Thu, 10 Apr 2025 22:24:04 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 queue. At >> p

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

2025-04-10 Thread Stuart Marks
On Thu, 10 Apr 2025 22:18:20 GMT, Brent Christian wrote: >> test/lib/jdk/test/whitebox/WhiteBox.java line 570: >> >>> 568:* This method should usually be called after a call to >>> WhiteBox.fullGC(). >>> 569:*/ >>> 570: public static void waitForReferenceProcessing() { >> >> Referenc

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: > >> 570: public static void waitFo

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 578: > >> 576: throw new RuntimeExce

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: > >> 568:* This method should usu

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

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 c

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

2025-04-10 Thread Kim Barrett
On Wed, 9 Apr 2025 23:12:00 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 queue. At >> pr

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 574: > >> 572: Class refC

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: > >> 123: Method[] meth

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

2025-04-09 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 c

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

2025-04-09 Thread Kim Barrett
On Wed, 9 Apr 2025 19:54:55 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 queue. At >> pr

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 117: > >> 115: * jtreg tag. >

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 void waitForReferenceProcessing() { >> >> Can the c

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

2025-04-09 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 c

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: 8305186: Reference.waitForReferenceProcessing should be more accessible to tests

2025-04-08 Thread Kim Barrett
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 queue. At > presen

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

2025-04-08 Thread Roger Riggs
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 queue. At > presen