equal
deleted
inserted
replaced
385 |
385 |
386 /** |
386 /** |
387 * Handle a safepoint request |
387 * Handle a safepoint request |
388 */ |
388 */ |
389 void NMethodSweeper::handle_safepoint_request() { |
389 void NMethodSweeper::handle_safepoint_request() { |
390 if (SafepointSynchronize::is_synchronizing()) { |
390 JavaThread* thread = JavaThread::current(); |
|
391 if (SafepointMechanism::poll(thread)) { |
391 if (PrintMethodFlushing && Verbose) { |
392 if (PrintMethodFlushing && Verbose) { |
392 tty->print_cr("### Sweep at %d out of %d, yielding to safepoint", _seen, CodeCache::nmethod_count()); |
393 tty->print_cr("### Sweep at %d out of %d, yielding to safepoint", _seen, CodeCache::nmethod_count()); |
393 } |
394 } |
394 MutexUnlockerEx mu(CodeCache_lock, Mutex::_no_safepoint_check_flag); |
395 MutexUnlockerEx mu(CodeCache_lock, Mutex::_no_safepoint_check_flag); |
395 |
396 |
396 JavaThread* thread = JavaThread::current(); |
|
397 ThreadBlockInVM tbivm(thread); |
397 ThreadBlockInVM tbivm(thread); |
398 thread->java_suspend_self(); |
398 thread->java_suspend_self(); |
399 } |
399 } |
400 } |
400 } |
401 |
401 |