src/share/vm/services/memTracker.hpp

Print this page

        

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * 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
  * published by the Free Software Foundation.

@@ -479,21 +479,13 @@
   static void check_NMT_load(Thread* thr) {
     assert(thr != NULL, "Sanity check");
     if (_slowdown_calling_thread && thr != _worker_thread) {
 #ifdef _WINDOWS
       // On Windows, os::NakedYield() does not work as well
-      // as os::yield_all()
-      os::yield_all();
+      // as short sleep.
+      os::naked_short_sleep(1);
 #else
-     // On Solaris, os::yield_all() depends on os::sleep()
-     // which requires JavaTherad in _thread_in_vm state.
-     // Transits thread to _thread_in_vm state can be dangerous
-     // if caller holds lock, as it may deadlock with Threads_lock.
-     // So use NaKedYield instead.
-     //
-     // Linux and BSD, NakedYield() and yield_all() implementations
-     // are the same.
       os::NakedYield();
 #endif
     }
   }