Revert^4 "Remove Global deopt requirement for several jvmti events"
It was possible for the top frame of a thread to enter the
artQuickToInterpreterBridge during runtime shutdown. This could be
caused by the libjdwp agent. If this happens the caller of the frame
will be 'null', which could cause a segv if not detected correctly.
This reverts commit 939798e6a565a92e597136c589428e89c28bffd5.
Reason for revert: Fixed issue that could cause crash during process
shutdown.
Test: ./art/tools/run-libjdwp-tests.sh --mode=host
Test: ./test.py --host
Change-Id: I2aad1705c761edb4ed788cec4fc8a3068d67aee5
diff --git a/openjdkjvmti/deopt_manager.h b/openjdkjvmti/deopt_manager.h
index 856f3f4..4c4a774 100644
--- a/openjdkjvmti/deopt_manager.h
+++ b/openjdkjvmti/deopt_manager.h
@@ -38,8 +38,11 @@
#include "base/mutex.h"
#include "runtime_callbacks.h"
+#include <jvmti.h>
+
namespace art {
class ArtMethod;
+class ScopedObjectAccessUnchecked;
namespace mirror {
class Class;
} // namespace mirror
@@ -98,6 +101,14 @@
REQUIRES(!deoptimization_status_lock_, !art::Roles::uninterruptible_)
REQUIRES_SHARED(art::Locks::mutator_lock_);
+ jvmtiError AddDeoptimizeThreadMethods(art::ScopedObjectAccessUnchecked& soa, jthread thread)
+ REQUIRES(!deoptimization_status_lock_, !art::Roles::uninterruptible_)
+ REQUIRES_SHARED(art::Locks::mutator_lock_);
+
+ jvmtiError RemoveDeoptimizeThreadMethods(art::ScopedObjectAccessUnchecked& soa, jthread thread)
+ REQUIRES(!deoptimization_status_lock_, !art::Roles::uninterruptible_)
+ REQUIRES_SHARED(art::Locks::mutator_lock_);
+
void DeoptimizeThread(art::Thread* target) REQUIRES_SHARED(art::Locks::mutator_lock_);
void DeoptimizeAllThreads() REQUIRES_SHARED(art::Locks::mutator_lock_);