8064749: -XX:-UseCompilerSafepoints breaks safepoint rendezvous
authorshade
Thu, 13 Nov 2014 19:12:28 +0300
changeset 27662 222e6578695a
parent 27661 1ab3ff7fdd27
child 27663 8b09b5d9dc8b
8064749: -XX:-UseCompilerSafepoints breaks safepoint rendezvous Reviewed-by: dcubed, coleenp, kvn, dholmes
hotspot/src/share/vm/runtime/arguments.cpp
hotspot/src/share/vm/runtime/globals.hpp
hotspot/src/share/vm/runtime/safepoint.cpp
--- a/hotspot/src/share/vm/runtime/arguments.cpp	Wed Nov 12 20:18:13 2014 -0500
+++ b/hotspot/src/share/vm/runtime/arguments.cpp	Thu Nov 13 19:12:28 2014 +0300
@@ -313,6 +313,7 @@
   { "UseFastAccessorMethods",        JDK_Version::jdk(9), JDK_Version::jdk(10) },
   { "UseFastEmptyMethods",           JDK_Version::jdk(9), JDK_Version::jdk(10) },
 #endif // ZERO
+  { "UseCompilerSafepoints",         JDK_Version::jdk(9), JDK_Version::jdk(10) },
   { NULL, JDK_Version(0), JDK_Version(0) }
 };
 
--- a/hotspot/src/share/vm/runtime/globals.hpp	Wed Nov 12 20:18:13 2014 -0500
+++ b/hotspot/src/share/vm/runtime/globals.hpp	Thu Nov 13 19:12:28 2014 +0300
@@ -777,9 +777,6 @@
   develop(bool, TraceHandleAllocation, false,                               \
           "Print out warnings when suspiciously many handles are allocated")\
                                                                             \
-  product(bool, UseCompilerSafepoints, true,                                \
-          "Stop at safepoints in compiled code")                            \
-                                                                            \
   product(bool, FailOverToOldVerifier, true,                                \
           "Fail over to old verifier when split verifier fails")            \
                                                                             \
--- a/hotspot/src/share/vm/runtime/safepoint.cpp	Wed Nov 12 20:18:13 2014 -0500
+++ b/hotspot/src/share/vm/runtime/safepoint.cpp	Thu Nov 13 19:12:28 2014 +0300
@@ -182,7 +182,7 @@
   // Make interpreter safepoint aware
   Interpreter::notice_safepoints();
 
-  if (UseCompilerSafepoints && DeferPollingPageLoopCount < 0) {
+  if (DeferPollingPageLoopCount < 0) {
     // Make polling safepoint aware
     guarantee (PageArmed == 0, "invariant") ;
     PageArmed = 1 ;
@@ -288,7 +288,7 @@
       // 9. On windows consider using the return value from SwitchThreadTo()
       //    to drive subsequent spin/SwitchThreadTo()/Sleep(N) decisions.
 
-      if (UseCompilerSafepoints && int(iterations) == DeferPollingPageLoopCount) {
+      if (int(iterations) == DeferPollingPageLoopCount) {
          guarantee (PageArmed == 0, "invariant") ;
          PageArmed = 1 ;
          os::make_polling_page_unreadable();
@@ -1074,7 +1074,7 @@
   guarantee(_safepoint_stats != NULL,
             "not enough memory for safepoint instrumentation data");
 
-  if (UseCompilerSafepoints && DeferPollingPageLoopCount >= 0) {
+  if (DeferPollingPageLoopCount >= 0) {
     need_to_track_page_armed_status = true;
   }
   init_done = true;
@@ -1241,9 +1241,7 @@
 
   // Print out polling page sampling status.
   if (!need_to_track_page_armed_status) {
-    if (UseCompilerSafepoints) {
-      tty->print_cr("Polling page always armed");
-    }
+    tty->print_cr("Polling page always armed");
   } else {
     tty->print_cr("Defer polling page loop count = %d\n",
                  DeferPollingPageLoopCount);