changeset 13722:2d4a8d3d286b

Sweeper: make sure we only run the sweeper on java threads
author Gilles Duboscq <duboscq@ssw.jku.at>
date Tue, 21 Jan 2014 18:35:03 +0100
parents 2f944a810dd4
children 1834ae0bc965
files src/share/vm/runtime/sweeper.cpp
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/vm/runtime/sweeper.cpp	Tue Jan 21 15:26:38 2014 +0100
+++ b/src/share/vm/runtime/sweeper.cpp	Tue Jan 21 18:35:03 2014 +0100
@@ -233,7 +233,7 @@
 void NMethodSweeper::possibly_sweep() {
   assert(JavaThread::current()->thread_state() == _thread_in_vm, "must run in vm mode");
   // Only compiler threads are allowed to sweep
-  if (!MethodFlushing || !sweep_in_progress() NOT_GRAAL(|| !Thread::current()->is_Compiler_thread())) {
+  if (!MethodFlushing || !sweep_in_progress() NOT_GRAAL(|| !Thread::current()->is_Compiler_thread()) GRAAL_ONLY(|| !Thread::current()->is_Java_thread())) {
     return;
   }