Revert "Revert "ART: Start RuntimeCallbacks""
This reverts commit bf6331a45f730e1f1044af2ce43bceda660ae6fc.
Switch to using the mutator lock.
Bug: 31684920
Test: m test-art-host-gtest-runtime_callbacks_test
Test: art/tools/run-jdwp-tests.sh --mode=host --debug
Change-Id: I6ce0f71de2aa9f90cd23cfca7723a793b560b16b
diff --git a/runtime/debugger.cc b/runtime/debugger.cc
index 006476b..6da7e3a 100644
--- a/runtime/debugger.cc
+++ b/runtime/debugger.cc
@@ -320,6 +320,8 @@
size_t Dbg::exception_catch_event_ref_count_ = 0;
uint32_t Dbg::instrumentation_events_ = 0;
+Dbg::DbgThreadLifecycleCallback Dbg::thread_lifecycle_callback_;
+
// Breakpoints.
static std::vector<Breakpoint> gBreakpoints GUARDED_BY(Locks::breakpoint_lock_);
@@ -5135,4 +5137,12 @@
}
}
+void Dbg::DbgThreadLifecycleCallback::ThreadStart(Thread* self) {
+ Dbg::PostThreadStart(self);
+}
+
+void Dbg::DbgThreadLifecycleCallback::ThreadDeath(Thread* self) {
+ Dbg::PostThreadDeath(self);
+}
+
} // namespace art