Add obsolete object event
Add an extension event to notify agents that an object is becoming
obsolete. This is meant to be used by agents performing allocation
tracking using the VMObjectAlloc event to let them know that an object
replacement is occurring. This event is only triggered by calls to
JVMTI functions that create obsolete objects. Normal GC actions
(including a moving compaction) will not cause this event to trigger.
Test: ./test.py --host
Bug: 134162467
Change-Id: If48b880814a751ba6c24c18d0ad116db4f8fdf64
diff --git a/openjdkjvmti/OpenjdkJvmTi.cc b/openjdkjvmti/OpenjdkJvmTi.cc
index e4ce825..3a6fcef 100644
--- a/openjdkjvmti/OpenjdkJvmTi.cc
+++ b/openjdkjvmti/OpenjdkJvmTi.cc
@@ -1532,6 +1532,7 @@
ClassUtil::Register(gEventHandler);
DumpUtil::Register(gEventHandler);
MethodUtil::Register(gEventHandler);
+ HeapExtensions::Register(gEventHandler);
SearchUtil::Register();
HeapUtil::Register();
Transformer::Setup();