8234232: [TESTBUG] gc/shenandoah/jvmti/TestHeapDump.java fails with -Xcomp

Reviewed-by: zgu
This commit is contained in:
Jie Fu 2019-11-15 20:39:26 +08:00
parent 25d178f477
commit 8211feee76

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2017, 2018, Red Hat, Inc. All rights reserved.
* Copyright (c) 2017, 2019, Red Hat, Inc. All rights reserved.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
@ -40,6 +40,8 @@
* @run main/othervm/native/timeout=300 -agentlib:TestHeapDump -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC -Xmx128m -XX:ShenandoahGCHeuristics=aggressive -XX:-UseCompressedOops TestHeapDump
*/
import java.lang.ref.Reference;
public class TestHeapDump {
private static final int NUM_ITER = 10000;
@ -86,6 +88,8 @@ public class TestHeapDump {
throw new RuntimeException("Expected " + EXPECTED_OBJECTS + " objects, but got " + numObjs);
}
}
Reference.reachabilityFence(array);
Reference.reachabilityFence(localRoot);
}
// We look for the instances of this class during the heap scan