From d6f8b465e47d40220bdba6bf7502de90ee9fa7f7 Mon Sep 17 00:00:00 2001 From: Thomas Schatzl Date: Thu, 17 Oct 2024 12:31:43 +0000 Subject: [PATCH] 8340389: vmTestbase/gc/gctests/PhantomReference/phantom001/TestDescription.java Test exit code: 97 with -Xcomp UseAVX=3 Reviewed-by: shade, iwalulya --- .../gc/gctests/PhantomReference/phantom001/phantom001.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/test/hotspot/jtreg/vmTestbase/gc/gctests/PhantomReference/phantom001/phantom001.java b/test/hotspot/jtreg/vmTestbase/gc/gctests/PhantomReference/phantom001/phantom001.java index d45adbf4efd..9f5fc94221e 100644 --- a/test/hotspot/jtreg/vmTestbase/gc/gctests/PhantomReference/phantom001/phantom001.java +++ b/test/hotspot/jtreg/vmTestbase/gc/gctests/PhantomReference/phantom001/phantom001.java @@ -177,14 +177,15 @@ public class phantom001 extends ThreadedGCTest { // If referent is finalizable, provoke GCs and wait for finalization. if (type.equals("class")) { progress("Waiting for finalization: " + type); + WhiteBox.getWhiteBox().fullGC(); for (int checks = 0; !finalized && !shouldTerminate(); ++checks) { - // There are scenarios where one WB.fillGC() isn't enough, - // but 10 iterations really ought to be sufficient. + // Wait for up to 10 iterations that the finalizer has been run, + // this ought to be sufficient. Full GCs and other threads might + // starve out the finalizer thread, requiring more waiting. if (checks > 10) { fail("Waiting for finalization: " + type); return; } - WhiteBox.getWhiteBox().fullGC(); // Give some time for finalizer to run. try { Thread.sleep(checks * 100);