ART: Fix tagging
Tagging is local to the jvmtiEnv. Move from a global object tag
table to a table local to the ArtJvmtiEnv.
Bug: 31385027
Test: m test-art-host-run-test-903-hello-tagging
Change-Id: I2faeed87fd0421631fee7cd97bb7d496bf4e6338
diff --git a/runtime/openjdkjvmti/transform.cc b/runtime/openjdkjvmti/transform.cc
index 2fec631..36421b9 100644
--- a/runtime/openjdkjvmti/transform.cc
+++ b/runtime/openjdkjvmti/transform.cc
@@ -63,12 +63,13 @@
jvmtiError Transformer::RetransformClassesDirect(
ArtJvmTiEnv* env,
+ EventHandler* event_handler,
art::Thread* self,
/*in-out*/std::vector<ArtClassDefinition>* definitions) {
for (ArtClassDefinition& def : *definitions) {
jint new_len = -1;
unsigned char* new_data = nullptr;
- gEventHandler.DispatchEvent<ArtJvmtiEvent::kClassFileLoadHookRetransformable>(
+ event_handler->DispatchEvent<ArtJvmtiEvent::kClassFileLoadHookRetransformable>(
self,
GetJniEnv(env),
def.klass,
@@ -85,6 +86,7 @@
}
jvmtiError Transformer::RetransformClasses(ArtJvmTiEnv* env,
+ EventHandler* event_handler,
art::Runtime* runtime,
art::Thread* self,
jint class_count,
@@ -114,7 +116,7 @@
}
definitions.push_back(std::move(def));
}
- res = RetransformClassesDirect(env, self, &definitions);
+ res = RetransformClassesDirect(env, event_handler, self, &definitions);
if (res != OK) {
return res;
}