--- old/test/hotspot/jtreg/gc/z/TestHighUsage.java 2019-05-31 09:42:04.438255171 +0200 +++ new/test/hotspot/jtreg/gc/z/TestHighUsage.java 2019-05-31 09:42:04.219248152 +0200 @@ -74,6 +74,14 @@ dummy = new byte[128 * K]; } else { // High allocation rate + + // Before inducing an allocation spike, give the GC time to + // complete a cycle. This is needed in case the test system + // is starved on CPU, in which case the GC might not otherwise + // be able to complete a cycle before the allocation spike + // happens, resulting in an allocation stall. + Thread.sleep(50000); + dummy = new byte[8 * M]; } @@ -93,7 +101,7 @@ "-Xmx128M", "-XX:ParallelGCThreads=1", "-XX:ConcGCThreads=1", - "-Xlog:gc", + "-Xlog:gc,gc+start", Test.class.getName() }) .shouldNotContain("Allocation Stall") .shouldContain("High Usage")