src/hotspot/share/jfr/periodic/sampling/jfrThreadSampler.cpp
changeset 57699 4aea554692aa
parent 55267 eabe64456156
child 58154 060d9d139109
child 58679 9c3209ff7550
child 58863 c16ac7a2eba4
equal deleted inserted replaced
57698:9dc92e89243a 57699:4aea554692aa
   514 
   514 
   515   {
   515   {
   516     elapsedTimer sample_time;
   516     elapsedTimer sample_time;
   517     sample_time.start();
   517     sample_time.start();
   518     {
   518     {
   519       MutexLocker tlock(Threads_lock, Mutex::_no_safepoint_check_flag);
   519       MutexLocker tlock(Threads_lock);
   520       ThreadsListHandle tlh;
   520       ThreadsListHandle tlh;
   521       // Resolve a sample session relative start position index into the thread list array.
   521       // Resolve a sample session relative start position index into the thread list array.
   522       // In cases where the last sampled thread is NULL or not-NULL but stale, find_index() returns -1.
   522       // In cases where the last sampled thread is NULL or not-NULL but stale, find_index() returns -1.
   523       _cur_index = tlh.list()->find_index_of_JavaThread(*last_thread);
   523       _cur_index = tlh.list()->find_index_of_JavaThread(*last_thread);
   524       JavaThread* current = _cur_index != -1 ? *last_thread : NULL;
   524       JavaThread* current = _cur_index != -1 ? *last_thread : NULL;