On Sat, 13 Sep 2025 13:41:49 GMT, Albert Mingkun Yang <ay...@openjdk.org> wrote:

>> Improved test stability. See first comment for details.
>> 
>> Tested by running the test 25 times with every GC on every supported 
>> platform and also combined with -Xcomp.
>
> test/jdk/com/sun/jdi/JdbStopInNotificationThreadTest.java line 83:
> 
>> 81:             counter++;
>> 82:             if (counter % 1000 == 0) {
>> 83:                 System.gc();       // Encourage promotion into 
>> old/tenured generation
> 
> I wonder if `fullGC` from `WhiteBox.java` can be used here -- it would make 
> the intention to run full-gc explicit.

Given that the test does not need it to reliably promote 100% into the oldgen 
on each call, only that allocated objects work there way there over time, I 
think the System.gc() is fine. It seems to be working well with all GC's, at 
least in the context of this test.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/27266#discussion_r2346922113

Reply via email to