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.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/openjdkjvmti/deopt_manager.cc b/openjdkjvmti/deopt_manager.cc
index f30a21d04f..6377050d98 100644
--- a/openjdkjvmti/deopt_manager.cc
+++ b/openjdkjvmti/deopt_manager.cc
@@ -450,6 +450,8 @@ jvmtiError DeoptManager::RemoveDeoptimizeThreadMethods(art::ScopedObjectAccessUn
return OK;
}
+static constexpr const char* kInstrumentationKey = "JVMTI_DeoptRequester";
+
void DeoptManager::RemoveDeoptimizationRequester() {
art::Thread* self = art::Thread::Current();
art::ScopedThreadStateChange sts(self, art::ThreadState::kSuspended);
@@ -458,8 +460,7 @@ void DeoptManager::RemoveDeoptimizationRequester() {
deopter_count_--;
if (deopter_count_ == 0) {
ScopedDeoptimizationContext sdc(self, this);
- // TODO Give this a real key.
- art::Runtime::Current()->GetInstrumentation()->DisableDeoptimization("");
+ art::Runtime::Current()->GetInstrumentation()->DisableDeoptimization(kInstrumentationKey);
return;
} else {
deoptimization_status_lock_.ExclusiveUnlock(self);
@@ -478,7 +479,7 @@ void DeoptManager::AddDeoptimizationRequester() {
// Enable deoptimization
instrumentation->EnableDeoptimization();
// Tell instrumentation we will be deopting single threads.
- instrumentation->EnableSingleThreadDeopt();
+ instrumentation->EnableSingleThreadDeopt(kInstrumentationKey);
} else {
deoptimization_status_lock_.ExclusiveUnlock(self);
}