diff src/share/vm/runtime/thread.cpp @ 17706:0e6af9b390af

8028280: ParkEvent leak when running modified runThese which only loads classes Summary: Use spin lock to manage ParkEvent and PlatformEvent free lists. Reviewed-by: dholmes, fparain, dcubed, acorn
author dsimms
date Fri, 24 Jan 2014 09:28:47 +0100
parents 292050e5d5ea
children 606acabe7b5c
line wrap: on
line diff
--- a/src/share/vm/runtime/thread.cpp	Fri Feb 14 09:50:17 2014 -0800
+++ b/src/share/vm/runtime/thread.cpp	Fri Jan 24 09:28:47 2014 +0100
@@ -4446,9 +4446,7 @@
         ++ctr ;
         if ((ctr & 0xFFF) == 0 || !os::is_MP()) {
            if (Yields > 5) {
-             // Consider using a simple NakedSleep() instead.
-             // Then SpinAcquire could be called by non-JVM threads
-             Thread::current()->_ParkEvent->park(1) ;
+             os::naked_short_sleep(1);
            } else {
              os::NakedYield() ;
              ++Yields ;