On Tue, 4 Apr 2023 18:42:57 GMT, Chris Plummer <cjplum...@openjdk.org> wrote:

>> test/jdk/com/sun/jdi/ThreadMemoryLeakTest.java line 74:
>> 
>>> 72:                             // that get queued up, so we need to slow 
>>> it down a bit more
>>> 73:                             // than we do for platform threads to avoid 
>>> getting OOME.
>>> 74:                             Thread.sleep(100);
>> 
>> I wonder if this time for sleep can still be not enough.
>
> I did a lot of testing on all platforms, including with product builds, but 
> yes, it is possible that on some some platforms with some flags it might not 
> be enough. I guess more testing will tell. Adjustments might be necessary. It 
> is important not too slow things down too much, or it's possible that if 
> there is a memory leak, the test won't catch it because the leak is not fast 
> enough. With the current sleep values, throughput for virtual threads is 
> still about 2x what it is for platform threads, so right now I'm not worried 
> about it having been slowed down too much.

small nit. shorter to use:
long timeToSleep = "Virtual".equals(mainWrapper) ? 100 : 50;

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

PR Review Comment: https://git.openjdk.org/jdk/pull/13246#discussion_r1157751992

Reply via email to