diff options
author | 2021-12-09 09:16:24 +0000 | |
---|---|---|
committer | 2021-12-09 13:30:45 +0000 | |
commit | 4ac8cfe0f0a53b3ecec371d0e4e702a906bb0e2b (patch) | |
tree | 7ae1c15a5de3d4931bcfdf0e3afdf544a64395ff /openjdkjvmti | |
parent | 1d7ad9066d9d92ade76c25fe842037d4fa899df7 (diff) |
Remove Instrumentation::can_use_instrumentation_trampolines_.
And cleanup how deopt_manager notifies how to do single thread deopt by
using an instrumentation key.
can_use_instrumentation_trampolines_ seems to have been used as a
workaround for an issue that doesn't manifest anymore after the cleanup.
Test: test.py
Change-Id: I6e34ef01c502a158f0a403e755c525f33bfa3ca9
Diffstat (limited to 'openjdkjvmti')
-rw-r--r-- | openjdkjvmti/deopt_manager.cc | 7 |
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); } |