RFR: 8323023: GenShen: Region logging test fails intermittently
William Kemper
wkemper at openjdk.org
Fri Jan 5 16:54:54 UTC 2024
On Fri, 5 Jan 2024 14:26:59 GMT, Kelvin Nilsen <kdnilsen at openjdk.org> wrote:
>> test/hotspot/jtreg/gc/shenandoah/TestShenandoahRegionLogging.java line 47:
>>
>>> 45: for (long c = 0; c < count; c++) {
>>> 46: sink = new Object();
>>> 47: Thread.sleep(1);
>>
>> Pre-existing, but: The problem with doing this sleep is that we are doing about 64K of 1ms sleeps in this tests. Even if we manage to do 1ms sleep, that is already 65 seconds spent in this test. But we might as well spend single-digit ms per sleep. For 10ms sleeps, that is 10 minutes for a test, which would be playing it close to timeout.
>>
>> So I wonder if this test should be time-bound.
>
> Would it be better to reduce the frequency of the sleep, to one in 10, for example?
The test is really just waiting for region sampling to write to the logs. I think one call to `System.gc` would suffice. I'll see if I can reduce the runtime for this test.
-------------
PR Review Comment: https://git.openjdk.org/shenandoah/pull/380#discussion_r1443115610
More information about the shenandoah-dev
mailing list