src/share/vm/services/memTracker.hpp

changeset 5363
5f7a4367c787
parent 5272
1f4355cee9a2
child 5578
4c84d351cca9
equal deleted inserted replaced
5338:cedf20e2a655 5363:5f7a4367c787
468 } 468 }
469 469
470 static void check_NMT_load(Thread* thr) { 470 static void check_NMT_load(Thread* thr) {
471 assert(thr != NULL, "Sanity check"); 471 assert(thr != NULL, "Sanity check");
472 if (_slowdown_calling_thread && thr != _worker_thread) { 472 if (_slowdown_calling_thread && thr != _worker_thread) {
473 #ifdef _WINDOWS
474 // On Windows, os::NakedYield() does not work as well
475 // as os::yield_all()
473 os::yield_all(); 476 os::yield_all();
477 #else
478 // On Solaris, os::yield_all() depends on os::sleep()
479 // which requires JavaTherad in _thread_in_vm state.
480 // Transits thread to _thread_in_vm state can be dangerous
481 // if caller holds lock, as it may deadlock with Threads_lock.
482 // So use NaKedYield instead.
483 //
484 // Linux and BSD, NakedYield() and yield_all() implementations
485 // are the same.
486 os::NakedYield();
487 #endif
474 } 488 }
475 } 489 }
476 490
477 static void inc_pending_op_count() { 491 static void inc_pending_op_count() {
478 Atomic::inc(&_pending_op_count); 492 Atomic::inc(&_pending_op_count);

mercurial