diff src/share/vm/compiler/compileBroker.cpp @ 12861:1e814e391ee8

8025656: compiler/8013496/Test8013496.sh fails on assert Summary: Ensure the thread is in correct state; rewrote test in Java Reviewed-by: kvn, twisti
author anoll
date Fri, 04 Oct 2013 09:19:13 +0200
parents 510fbd28919c
children 469216acdb28
line wrap: on
line diff
--- a/src/share/vm/compiler/compileBroker.cpp	Wed Oct 02 06:17:10 2013 -0700
+++ b/src/share/vm/compiler/compileBroker.cpp	Fri Oct 04 09:19:13 2013 +0200
@@ -1953,6 +1953,10 @@
       // Since code cache is full, immediately stop new compiles
       if (CompileBroker::set_should_compile_new_jobs(CompileBroker::stop_compilation)) {
         NMethodSweeper::log_sweep("disable_compiler");
+
+        // Switch to 'vm_state'. This ensures that possibly_sweep() can be called
+        // without having to consider the state in which the current thread is.
+        ThreadInVMfromUnknown in_vm;
         NMethodSweeper::possibly_sweep();
       }
     } else {