summaryrefslogtreecommitdiff
path: root/openjdkjvmti/deopt_manager.cc
diff options
context:
space:
mode:
Diffstat (limited to 'openjdkjvmti/deopt_manager.cc')
-rw-r--r--openjdkjvmti/deopt_manager.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/openjdkjvmti/deopt_manager.cc b/openjdkjvmti/deopt_manager.cc
index 3b04ed8be8..3e3691a16a 100644
--- a/openjdkjvmti/deopt_manager.cc
+++ b/openjdkjvmti/deopt_manager.cc
@@ -487,9 +487,11 @@ void DeoptManager::AddDeoptimizationRequester() {
void DeoptManager::DeoptimizeThread(art::Thread* target) {
// We might or might not be running on the target thread (self) so get Thread::Current
// directly.
+ art::ScopedThreadSuspension sts(art::Thread::Current(), art::kSuspended);
art::gc::ScopedGCCriticalSection sgccs(art::Thread::Current(),
art::gc::GcCause::kGcCauseDebugger,
art::gc::CollectorType::kCollectorTypeDebugger);
+ art::ScopedSuspendAll ssa("Instrument thread stack");
art::Runtime::Current()->GetInstrumentation()->InstrumentThreadStack(target);
}