diff options
Diffstat (limited to 'openjdkjvmti/deopt_manager.cc')
-rw-r--r-- | openjdkjvmti/deopt_manager.cc | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/openjdkjvmti/deopt_manager.cc b/openjdkjvmti/deopt_manager.cc index a7feba81e1..3b04ed8be8 100644 --- a/openjdkjvmti/deopt_manager.cc +++ b/openjdkjvmti/deopt_manager.cc @@ -45,6 +45,7 @@ #include "gc/collector_type.h" #include "gc/heap.h" #include "gc/scoped_gc_critical_section.h" +#include "instrumentation.h" #include "jit/jit.h" #include "jni/jni_internal.h" #include "mirror/class-inl.h" @@ -472,8 +473,12 @@ void DeoptManager::AddDeoptimizationRequester() { deopter_count_++; if (deopter_count_ == 1) { ScopedDeoptimizationContext sdc(self, this); - art::Runtime::Current()->GetInstrumentation()->EnableDeoptimization(); - return; + art::instrumentation::Instrumentation* instrumentation = + art::Runtime::Current()->GetInstrumentation(); + // Enable deoptimization + instrumentation->EnableDeoptimization(); + // Tell instrumentation we will be deopting single threads. + instrumentation->EnableSingleThreadDeopt(); } else { deoptimization_status_lock_.ExclusiveUnlock(self); } |