Revert^4 "Initial support for adding virtuals with structural redefinition"
This reverts commit 2f8c1ac61b0c611d67badea70261c851ed19b82a.
If there were pending tasks to jit compile a method which is made
obsolete the JIT would CHECK fail, since the newly obsolete method is
marked DontCompile. This didn't happen with non-structural
redefinition since in that case the 'valid' ArtMethod always remains
the same.
To fix this we just have the JitTask check if the method it's
compiling is compilable and fail if it's not.
Reason for revert: Fixed JIT check failure.
Test: ./test.py --host
Bug: 134162467
Bug: 144168550
Bug: 144729319
Change-Id: Ib867b2de13bb4c2978b4538a5851c647caf0e1cc
diff --git a/openjdkjvmti/ti_heap.h b/openjdkjvmti/ti_heap.h
index 2e27cc7..ee8b4d6 100644
--- a/openjdkjvmti/ti_heap.h
+++ b/openjdkjvmti/ti_heap.h
@@ -17,6 +17,8 @@
#ifndef ART_OPENJDKJVMTI_TI_HEAP_H_
#define ART_OPENJDKJVMTI_TI_HEAP_H_
+#include <unordered_map>
+
#include "jvmti.h"
#include "base/locks.h"
@@ -24,6 +26,7 @@
namespace art {
class Thread;
template<typename T> class ObjPtr;
+class HashObjPtr;
namespace mirror {
class Object;
} // namespace mirror
@@ -88,6 +91,13 @@
static jvmtiError JNICALL ChangeArraySize(jvmtiEnv* env, jobject arr, jsize new_size);
+ static void ReplaceReferences(
+ art::Thread* self,
+ const std::unordered_map<art::ObjPtr<art::mirror::Object>,
+ art::ObjPtr<art::mirror::Object>,
+ art::HashObjPtr>& refs)
+ REQUIRES(art::Locks::mutator_lock_, art::Roles::uninterruptible_);
+
static void ReplaceReference(art::Thread* self,
art::ObjPtr<art::mirror::Object> original,
art::ObjPtr<art::mirror::Object> replacement)