< prev index next >

src/hotspot/share/runtime/vm_operations.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
rev 47290 : eosterlund CR - need more inline fixes.
rev 47291 : eosterlund, stefank CR - more inline and style cleanups
rev 47292 : stefank, coleenp CR - refactor most JavaThreadIterator usage to use JavaThreadIteratorWithHandle.

*** 146,160 **** #ifndef PRODUCT void VM_DeoptimizeAll::doit() { DeoptimizationMarker dm; ! ThreadsListHandle tlh; ! JavaThreadIterator jti(tlh.list()); // deoptimize all java threads in the system if (DeoptimizeALot) { ! for (JavaThread* thread = jti.first(); thread != NULL; thread = jti.next()) { if (thread->has_last_Java_frame()) { thread->deoptimize(); } } } else if (DeoptimizeRandom) { --- 146,159 ---- #ifndef PRODUCT void VM_DeoptimizeAll::doit() { DeoptimizationMarker dm; ! JavaThreadIteratorWithHandle jtiwh; // deoptimize all java threads in the system if (DeoptimizeALot) { ! for (; JavaThread *thread = jtiwh.next(); ) { if (thread->has_last_Java_frame()) { thread->deoptimize(); } } } else if (DeoptimizeRandom) {
*** 161,171 **** // Deoptimize some selected threads and frames int tnum = os::random() & 0x3; int fnum = os::random() & 0x3; int tcount = 0; ! for (JavaThread* thread = jti.first(); thread != NULL; thread = jti.next()) { if (thread->has_last_Java_frame()) { if (tcount++ == tnum) { tcount = 0; int fcount = 0; // Deoptimize some selected frames. --- 160,170 ---- // Deoptimize some selected threads and frames int tnum = os::random() & 0x3; int fnum = os::random() & 0x3; int tcount = 0; ! for (; JavaThread *thread = jtiwh.next(); ) { if (thread->has_last_Java_frame()) { if (tcount++ == tnum) { tcount = 0; int fcount = 0; // Deoptimize some selected frames.
*** 423,435 **** int num_active = 0; _shutdown_thread = thr_cur; _vm_exited = true; // global flag ! ThreadsListHandle tlh; ! JavaThreadIterator jti(tlh.list()); ! for (JavaThread *thr = jti.first(); thr != NULL; thr = jti.next()) { if (thr!=thr_cur && thr->thread_state() == _thread_in_native) { ++num_active; thr->set_terminated(JavaThread::_vm_exited); // per-thread flag } } --- 422,432 ---- int num_active = 0; _shutdown_thread = thr_cur; _vm_exited = true; // global flag ! for (JavaThreadIteratorWithHandle jtiwh; JavaThread *thr = jtiwh.next(); ) { if (thr!=thr_cur && thr->thread_state() == _thread_in_native) { ++num_active; thr->set_terminated(JavaThread::_vm_exited); // per-thread flag } }
*** 458,474 **** int max_wait_compiler_thread = 1000; // at least 10 seconds int max_wait = max_wait_compiler_thread; int attempts = 0; ! ThreadsListHandle tlh; ! JavaThreadIterator jti(tlh.list()); while (true) { int num_active = 0; int num_active_compiler_thread = 0; ! for (JavaThread *thr = jti.first(); thr != NULL; thr = jti.next()) { if (thr!=thr_cur && thr->thread_state() == _thread_in_native) { num_active++; if (thr->is_Compiler_thread()) { num_active_compiler_thread++; } --- 455,471 ---- int max_wait_compiler_thread = 1000; // at least 10 seconds int max_wait = max_wait_compiler_thread; int attempts = 0; ! JavaThreadIteratorWithHandle jtiwh; while (true) { int num_active = 0; int num_active_compiler_thread = 0; ! jtiwh.rewind(); ! for (; JavaThread *thr = jtiwh.next(); ) { if (thr!=thr_cur && thr->thread_state() == _thread_in_native) { num_active++; if (thr->is_Compiler_thread()) { num_active_compiler_thread++; }
< prev index next >