aboutsummaryrefslogtreecommitdiff
path: root/src/share/vm/compiler/compileBroker.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/share/vm/compiler/compileBroker.cpp')
-rw-r--r--src/share/vm/compiler/compileBroker.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/share/vm/compiler/compileBroker.cpp b/src/share/vm/compiler/compileBroker.cpp
index 594c58b5d..8040224f7 100644
--- a/src/share/vm/compiler/compileBroker.cpp
+++ b/src/share/vm/compiler/compileBroker.cpp
@@ -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 {