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