ART: Fix ObjectFree reporting
Free events should not be dispatched to all registered envs. They
are specific to the env that the tag came from.
Add a DispatchEvent that takes an env, add an env field to the
tagging table, and connect the two.
Update the stress test. Make it actually work with a tagging
function for the second env.
Bug: 36648696
Test: ./test.py --host -r -t 905
Change-Id: I485ef1a6a57e233a2c2128b30cae93532676b3bf
diff --git a/runtime/openjdkjvmti/OpenjdkJvmTi.cc b/runtime/openjdkjvmti/OpenjdkJvmTi.cc
index 448e1ed..39e603e 100644
--- a/runtime/openjdkjvmti/OpenjdkJvmTi.cc
+++ b/runtime/openjdkjvmti/OpenjdkJvmTi.cc
@@ -1513,8 +1513,8 @@
ArtJvmTiEnv::ArtJvmTiEnv(art::JavaVMExt* runtime, EventHandler* event_handler)
: art_vm(runtime),
local_data(nullptr),
- capabilities(),
- object_tag_table(new ObjectTagTable(event_handler)) {
+ capabilities() {
+ object_tag_table = std::unique_ptr<ObjectTagTable>(new ObjectTagTable(event_handler, this));
functions = &gJvmtiInterface;
}