8025656: compiler/8013496/Test8013496.sh fails on assert

Ensure the thread is in correct state; rewrote test in Java

Reviewed-by: kvn, twisti
This commit is contained in:
Albert Noll 2013-10-04 09:19:13 +02:00
parent 02e57a0152
commit 4f459e644f
3 changed files with 57 additions and 55 deletions

View file

@ -1953,6 +1953,10 @@ void CompileBroker::handle_full_code_cache() {
// 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 {