comparison src/share/vm/runtime/sweeper.cpp @ 13715:810f2c413ace

In a Graal-enabled VM, run the Sweeper even if the current thread is not a compiler thread.
author Gilles Duboscq <duboscq@ssw.jku.at>
date Mon, 20 Jan 2014 19:50:17 +0100
parents 02f27ecb4f3a
children 2d4a8d3d286b
comparison
equal deleted inserted replaced
13714:b270b954ba9a 13715:810f2c413ace
231 * (3) We have not been sweeping for 'some time' 231 * (3) We have not been sweeping for 'some time'
232 */ 232 */
233 void NMethodSweeper::possibly_sweep() { 233 void NMethodSweeper::possibly_sweep() {
234 assert(JavaThread::current()->thread_state() == _thread_in_vm, "must run in vm mode"); 234 assert(JavaThread::current()->thread_state() == _thread_in_vm, "must run in vm mode");
235 // Only compiler threads are allowed to sweep 235 // Only compiler threads are allowed to sweep
236 if (!MethodFlushing || !sweep_in_progress() || !Thread::current()->is_Compiler_thread()) { 236 if (!MethodFlushing || !sweep_in_progress() NOT_GRAAL(|| !Thread::current()->is_Compiler_thread())) {
237 return; 237 return;
238 } 238 }
239 239
240 // If there was no state change while nmethod sweeping, 'should_sweep' will be false. 240 // If there was no state change while nmethod sweeping, 'should_sweep' will be false.
241 // This is one of the two places where should_sweep can be set to true. The general 241 // This is one of the two places where should_sweep can be set to true. The general