equal
deleted
inserted
replaced
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; |