diff options
author | 2019-03-09 17:49:52 +0000 | |
---|---|---|
committer | 2019-03-09 21:13:15 +0000 | |
commit | ad344b6a14feba90a06a205760e9bc766c56cab0 (patch) | |
tree | 47801fc5b432b0baf544bb8fd522a9fd3b567a7e /openjdkjvmti/deopt_manager.cc | |
parent | 739383c80684eeb41d380ca5d18e1e9a1fe9fd7f (diff) |
Revert "Remove Global deopt requirement for several jvmti events"
This reverts commit 334630ee9dffdd1932c1ee641d938f25362a4c1a.
Reason for revert: 1924-frame-pop-toggle fails on some configs.
Change-Id: I5ed3846e0dfff09c67a468f319ff516e14c44e61
Diffstat (limited to 'openjdkjvmti/deopt_manager.cc')
-rw-r--r-- | openjdkjvmti/deopt_manager.cc | 42 |
1 files changed, 0 insertions, 42 deletions
diff --git a/openjdkjvmti/deopt_manager.cc b/openjdkjvmti/deopt_manager.cc index ee77b7bb77..d456d83368 100644 --- a/openjdkjvmti/deopt_manager.cc +++ b/openjdkjvmti/deopt_manager.cc @@ -49,7 +49,6 @@ #include "nativehelper/scoped_local_ref.h" #include "runtime_callbacks.h" #include "scoped_thread_state_change-inl.h" -#include "scoped_thread_state_change.h" #include "thread-current-inl.h" #include "thread_list.h" #include "ti_phase.h" @@ -357,47 +356,6 @@ void DeoptManager::PerformGlobalUndeoptimization(art::Thread* self) { kDeoptManagerInstrumentationKey); } -jvmtiError DeoptManager::AddDeoptimizeThreadMethods(art::ScopedObjectAccessUnchecked& soa, jthread jtarget) { - art::Locks::thread_list_lock_->ExclusiveLock(soa.Self()); - art::Thread* target = nullptr; - jvmtiError err = OK; - if (!ThreadUtil::GetNativeThread(jtarget, soa, &target, &err)) { - art::Locks::thread_list_lock_->ExclusiveUnlock(soa.Self()); - return err; - } - // We don't need additional locking here because we hold the Thread_list_lock_. - target->SetForceInterpreterCount(target->ForceInterpreterCount() + 1); - if (target->ForceInterpreterCount() == 1) { - struct DeoptClosure : public art::Closure { - public: - explicit DeoptClosure(DeoptManager* man) : man_(man) {} - void Run(art::Thread* self) override REQUIRES_SHARED(art::Locks::mutator_lock_) { - man_->DeoptimizeThread(self); - } - - private: - DeoptManager* man_; - }; - DeoptClosure c(this); - target->RequestSynchronousCheckpoint(&c); - } else { - art::Locks::thread_list_lock_->ExclusiveUnlock(soa.Self()); - } - return OK; -} - -jvmtiError DeoptManager::RemoveDeoptimizeThreadMethods(art::ScopedObjectAccessUnchecked& soa, jthread jtarget) { - art::MutexLock mu(soa.Self(), *art::Locks::thread_list_lock_); - art::Thread* target = nullptr; - jvmtiError err = OK; - if (!ThreadUtil::GetNativeThread(jtarget, soa, &target, &err)) { - return err; - } - // We don't need additional locking here because we hold the Thread_list_lock_. - DCHECK_GT(target->ForceInterpreterCount(), 0u); - target->DecrementForceInterpreterCount(); - return OK; -} void DeoptManager::RemoveDeoptimizationRequester() { art::Thread* self = art::Thread::Current(); |