< prev index next >

src/hotspot/share/runtime/deoptimization.cpp

Print this page
rev 47287 : Port 09.17.Thread_SMR_logging_update from JDK9 to JDK10
rev 47289 : eosterlund, stefank CR - refactor code into threadSMR.cpp and threadSMR.hpp

@@ -48,10 +48,11 @@
 #include "runtime/interfaceSupport.hpp"
 #include "runtime/sharedRuntime.hpp"
 #include "runtime/signature.hpp"
 #include "runtime/stubRoutines.hpp"
 #include "runtime/thread.hpp"
+#include "runtime/threadSMR.hpp"
 #include "runtime/vframe.hpp"
 #include "runtime/vframeArray.hpp"
 #include "runtime/vframe_hp.hpp"
 #include "utilities/events.hpp"
 #include "utilities/xmlstream.hpp"

@@ -1301,11 +1302,14 @@
     return;
   }
 
   assert(SafepointSynchronize::is_at_safepoint(), "must only be called from safepoint");
   GrowableArray<Handle>* objects_to_revoke = new GrowableArray<Handle>();
-  for (JavaThread* jt = Threads::first(); jt != NULL ; jt = jt->next()) {
+  {
+    ThreadsListHandle tlh;
+    JavaThreadIterator jti(tlh.list());
+    for (JavaThread* jt = jti.first(); jt != NULL; jt = jti.next()) {
     if (jt->has_last_Java_frame()) {
       StackFrameStream sfs(jt, true);
       while (!sfs.is_done()) {
         frame* cur = sfs.current();
         if (cb->contains(cur->pc())) {

@@ -1319,10 +1323,11 @@
           collect_monitors(cvf, objects_to_revoke);
         }
         sfs.next();
       }
     }
+    }
   }
   BiasedLocking::revoke_at_safepoint(objects_to_revoke);
 }
 
 
< prev index next >