changeset 4478:7641cf42feb0

8013214: BigApps fails due to 'fatal error: Illegal threadstate encountered: 6' Summary: Grab and drop SR_lock to get the thread to honor the safepoint protocol Reviewed-by: dcubed, coleenp
author zgu
date Tue, 07 May 2013 10:38:50 -0400
parents 0682fce0ecfb
children 127c4f0798b4
files src/share/vm/services/memBaseline.cpp
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/vm/services/memBaseline.cpp	Mon May 06 15:25:49 2013 -0400
+++ b/src/share/vm/services/memBaseline.cpp	Tue May 07 10:38:50 2013 -0400
@@ -24,7 +24,7 @@
 #include "precompiled.hpp"
 #include "memory/allocation.hpp"
 #include "runtime/safepoint.hpp"
-#include "runtime/thread.inline.hpp"
+#include "runtime/thread.hpp"
 #include "services/memBaseline.hpp"
 #include "services/memTracker.hpp"
 
@@ -157,7 +157,8 @@
 // for the safepoint
 void MemBaseline::check_safepoint(JavaThread* thr) {
   if (SafepointSynchronize::is_synchronizing()) {
-    SafepointSynchronize::block(thr);
+    // grab and drop the SR_lock to honor the safepoint protocol
+    MutexLocker ml(thr->SR_lock());
   }
 }