comparison src/share/vm/runtime/sweeper.cpp @ 13383:938e1e64e28f

8028306: nsk stress tests, CodeCache fills, then safepoint asserts Summary: Move handle_full_code_cache() out of block that forbids safepoints Reviewed-by: kvn, iveresov
author anoll
date Thu, 14 Nov 2013 19:27:07 +0100
parents 78da3894b86f
children 86e6d691f2e1
comparison
equal deleted inserted replaced
13382:570aaefce624 13383:938e1e64e28f
229 * (2) There are sufficient state changes in/since the last sweep. 229 * (2) There are sufficient state changes in/since the last sweep.
230 * (3) We have not been sweeping for 'some time' 230 * (3) We have not been sweeping for 'some time'
231 */ 231 */
232 void NMethodSweeper::possibly_sweep() { 232 void NMethodSweeper::possibly_sweep() {
233 assert(JavaThread::current()->thread_state() == _thread_in_vm, "must run in vm mode"); 233 assert(JavaThread::current()->thread_state() == _thread_in_vm, "must run in vm mode");
234 if (!MethodFlushing || !sweep_in_progress()) { 234 // Only compiler threads are allowed to sweep
235 if (!MethodFlushing || !sweep_in_progress() || !Thread::current()->is_Compiler_thread()) {
235 return; 236 return;
236 } 237 }
237 238
238 // If there was no state change while nmethod sweeping, 'should_sweep' will be false. 239 // If there was no state change while nmethod sweeping, 'should_sweep' will be false.
239 // This is one of the two places where should_sweep can be set to true. The general 240 // This is one of the two places where should_sweep can be set to true. The general