hotspot/src/share/vm/runtime/safepoint.cpp
changeset 25333 078d0ef28601
parent 25328 e76f3bfdbb5b
child 25354 f6762819b488
--- a/hotspot/src/share/vm/runtime/safepoint.cpp	Sun Jun 22 21:23:32 2014 -0400
+++ b/hotspot/src/share/vm/runtime/safepoint.cpp	Mon Jun 23 06:58:26 2014 -0700
@@ -264,8 +264,8 @@
       //
       // Further complicating matters is that yield() does not work as naively expected
       // on many platforms -- yield() does not guarantee that any other ready threads
-      // will run.   As such we revert yield_all() after some number of iterations.
-      // Yield_all() is implemented as a short unconditional sleep on some platforms.
+      // will run.   As such we revert to naked_short_sleep() after some number of iterations.
+      // nakes_short_sleep() is implemented as a short unconditional sleep.
       // Typical operating systems round a "short" sleep period up to 10 msecs, so sleeping
       // can actually increase the time it takes the VM thread to detect that a system-wide
       // stop-the-world safepoint has been reached.  In a pathological scenario such as that
@@ -322,9 +322,7 @@
       if (steps < DeferThrSuspendLoopCount) {
         os::NakedYield() ;
       } else {
-        os::yield_all() ;
-        // Alternately, the VM thread could transiently depress its scheduling priority or
-        // transiently increase the priority of the tardy mutator(s).
+        os::naked_short_sleep(1);
       }
 
       iterations ++ ;