src/hotspot/share/runtime/handshake.cpp
changeset 57699 4aea554692aa
parent 55625 f7e8dbb77156
child 58679 9c3209ff7550
child 59247 56bf71d64d51
equal deleted inserted replaced
57698:9dc92e89243a 57699:4aea554692aa
   135 
   135 
   136       // We need to re-think this with SMR ThreadsList.
   136       // We need to re-think this with SMR ThreadsList.
   137       // There is an assumption in the code that the Threads_lock should be
   137       // There is an assumption in the code that the Threads_lock should be
   138       // locked during certain phases.
   138       // locked during certain phases.
   139       {
   139       {
   140         MutexLocker ml(Threads_lock, Mutex::_no_safepoint_check_flag);
   140         MutexLocker ml(Threads_lock);
   141         _target->handshake_process_by_vmthread();
   141         _target->handshake_process_by_vmthread();
   142       }
   142       }
   143     } while (!poll_for_completed_thread());
   143     } while (!poll_for_completed_thread());
   144     DEBUG_ONLY(_op->check_state();)
   144     DEBUG_ONLY(_op->check_state();)
   145   }
   145   }
   184       {
   184       {
   185           // We need to re-think this with SMR ThreadsList.
   185           // We need to re-think this with SMR ThreadsList.
   186           // There is an assumption in the code that the Threads_lock should
   186           // There is an assumption in the code that the Threads_lock should
   187           // be locked during certain phases.
   187           // be locked during certain phases.
   188           jtiwh.rewind();
   188           jtiwh.rewind();
   189           MutexLocker ml(Threads_lock, Mutex::_no_safepoint_check_flag);
   189           MutexLocker ml(Threads_lock);
   190           for (JavaThread *thr = jtiwh.next(); thr != NULL; thr = jtiwh.next()) {
   190           for (JavaThread *thr = jtiwh.next(); thr != NULL; thr = jtiwh.next()) {
   191             // A new thread on the ThreadsList will not have an operation,
   191             // A new thread on the ThreadsList will not have an operation,
   192             // hence it is skipped in handshake_process_by_vmthread.
   192             // hence it is skipped in handshake_process_by_vmthread.
   193             thr->handshake_process_by_vmthread();
   193             thr->handshake_process_by_vmthread();
   194           }
   194           }