equal
deleted
inserted
replaced
520 |
520 |
521 { |
521 { |
522 elapsedTimer sample_time; |
522 elapsedTimer sample_time; |
523 sample_time.start(); |
523 sample_time.start(); |
524 { |
524 { |
525 MutexLocker tlock(Threads_lock, Mutex::_no_safepoint_check_flag); |
525 MutexLocker tlock(Threads_lock); |
526 ThreadsListHandle tlh; |
526 ThreadsListHandle tlh; |
527 // Resolve a sample session relative start position index into the thread list array. |
527 // Resolve a sample session relative start position index into the thread list array. |
528 // In cases where the last sampled thread is NULL or not-NULL but stale, find_index() returns -1. |
528 // In cases where the last sampled thread is NULL or not-NULL but stale, find_index() returns -1. |
529 _cur_index = tlh.list()->find_index_of_JavaThread(*last_thread); |
529 _cur_index = tlh.list()->find_index_of_JavaThread(*last_thread); |
530 JavaThread* current = _cur_index != -1 ? *last_thread : NULL; |
530 JavaThread* current = _cur_index != -1 ? *last_thread : NULL; |