changeset 55864:80ba2f1cdd4d

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
author pchilanomate
date Tue, 30 Jul 2019 17:31:29 -0400
parents ec78fddafd88
children 98dfaf0f9442
files test/hotspot/jtreg/runtime/Safepoint/TestAbortVMOnSafepointTimeout.java
diffstat 1 files changed, 9 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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",