8340389: vmTestbase/gc/gctests/PhantomReference/phantom001/TestDescription.java Test exit code: 97 with -Xcomp UseAVX=3
Reviewed-by: shade, iwalulya
This commit is contained in:
parent
8e16e67492
commit
d6f8b465e4
@ -177,14 +177,15 @@ public class phantom001 extends ThreadedGCTest {
|
|||||||
// If referent is finalizable, provoke GCs and wait for finalization.
|
// If referent is finalizable, provoke GCs and wait for finalization.
|
||||||
if (type.equals("class")) {
|
if (type.equals("class")) {
|
||||||
progress("Waiting for finalization: " + type);
|
progress("Waiting for finalization: " + type);
|
||||||
|
WhiteBox.getWhiteBox().fullGC();
|
||||||
for (int checks = 0; !finalized && !shouldTerminate(); ++checks) {
|
for (int checks = 0; !finalized && !shouldTerminate(); ++checks) {
|
||||||
// There are scenarios where one WB.fillGC() isn't enough,
|
// Wait for up to 10 iterations that the finalizer has been run,
|
||||||
// but 10 iterations really ought to be sufficient.
|
// this ought to be sufficient. Full GCs and other threads might
|
||||||
|
// starve out the finalizer thread, requiring more waiting.
|
||||||
if (checks > 10) {
|
if (checks > 10) {
|
||||||
fail("Waiting for finalization: " + type);
|
fail("Waiting for finalization: " + type);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
WhiteBox.getWhiteBox().fullGC();
|
|
||||||
// Give some time for finalizer to run.
|
// Give some time for finalizer to run.
|
||||||
try {
|
try {
|
||||||
Thread.sleep(checks * 100);
|
Thread.sleep(checks * 100);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user