hotspot/src/share/vm/runtime/sweeper.cpp
changeset 21727 4a5fc611c9a7
parent 21575 6a9645992cee
child 21767 41eaa9a17059
equal deleted inserted replaced
21726:3533814ab107 21727:4a5fc611c9a7
   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