Skip to content

Commit d6f8b46

Browse files
author
Thomas Schatzl
committedOct 17, 2024
8340389: vmTestbase/gc/gctests/PhantomReference/phantom001/TestDescription.java Test exit code: 97 with -Xcomp UseAVX=3
Reviewed-by: shade, iwalulya
1 parent 8e16e67 commit d6f8b46

File tree

1 file changed

+4
-3
lines changed
  • test/hotspot/jtreg/vmTestbase/gc/gctests/PhantomReference/phantom001

1 file changed

+4
-3
lines changed
 

‎test/hotspot/jtreg/vmTestbase/gc/gctests/PhantomReference/phantom001/phantom001.java

+4-3
Original file line numberDiff line numberDiff line change
@@ -177,14 +177,15 @@ public void run() {
177177
// If referent is finalizable, provoke GCs and wait for finalization.
178178
if (type.equals("class")) {
179179
progress("Waiting for finalization: " + type);
180+
WhiteBox.getWhiteBox().fullGC();
180181
for (int checks = 0; !finalized && !shouldTerminate(); ++checks) {
181-
// There are scenarios where one WB.fillGC() isn't enough,
182-
// but 10 iterations really ought to be sufficient.
182+
// Wait for up to 10 iterations that the finalizer has been run,
183+
// this ought to be sufficient. Full GCs and other threads might
184+
// starve out the finalizer thread, requiring more waiting.
183185
if (checks > 10) {
184186
fail("Waiting for finalization: " + type);
185187
return;
186188
}
187-
WhiteBox.getWhiteBox().fullGC();
188189
// Give some time for finalizer to run.
189190
try {
190191
Thread.sleep(checks * 100);

0 commit comments

Comments
 (0)