8227528: TestAbortVMOnSafepointTimeout.java failed due to "RuntimeException: 'Safepoint sync time longer than' missing from stdout/stderr"
Summary: Biased locking was disable for this test.
Reviewed-by: dcubed, mdoerr, dholmes
--- a/test/hotspot/jtreg/runtime/Safepoint/TestAbortVMOnSafepointTimeout.java Tue Jul 30 22:16:48 2019 +0200
+++ b/test/hotspot/jtreg/runtime/Safepoint/TestAbortVMOnSafepointTimeout.java Tue Jul 30 17:31:29 2019 -0400
@@ -27,7 +27,7 @@
/*
* @test TestAbortVMOnSafepointTimeout
* @summary Check if VM can kill thread which doesn't reach safepoint.
- * @bug 8219584
+ * @bug 8219584 8227528
* @requires vm.compiler2.enabled
* @library /test/lib
* @modules java.base/jdk.internal.misc
@@ -58,8 +58,16 @@
}
public static void testWith(int sfpt_interval, int timeout_delay) throws Exception {
+ // -XX:-UseCountedLoopSafepoints - is used to prevent the loop
+ // in test_loop() to poll for safepoints.
+ // -XX:LoopStripMiningIter=0 and -XX:LoopUnrollLimit=0 - are
+ // used to prevent optimizations over the loop in test_loop()
+ // since we actually want it to provoke a safepoint timeout.
+ // -XX:-UseBiasedLocking - is used to prevent biased locking
+ // handshakes from changing the timing of this test.
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(
"-XX:+UnlockDiagnosticVMOptions",
+ "-XX:-UseBiasedLocking",
"-XX:+SafepointTimeout",
"-XX:+SafepointALot",
"-XX:+AbortVMOnSafepointTimeout",