--- a/hotspot/src/share/vm/runtime/sweeper.cpp Mon Nov 18 12:26:51 2013 -0800
+++ b/hotspot/src/share/vm/runtime/sweeper.cpp Thu Nov 14 19:27:07 2013 +0100
@@ -231,7 +231,8 @@
*/
void NMethodSweeper::possibly_sweep() {
assert(JavaThread::current()->thread_state() == _thread_in_vm, "must run in vm mode");
- if (!MethodFlushing || !sweep_in_progress()) {
+ // Only compiler threads are allowed to sweep
+ if (!MethodFlushing || !sweep_in_progress() || !Thread::current()->is_Compiler_thread()) {
return;
}