Revert "ART: Start RuntimeCallbacks"
jdwp tests failing with:
STDERR> dalvikvm32 E 01-18 23:14:50 12180 12198 thread-inl.h:137] holding "runtime callbacks lock" at point where thread suspension is expected
Bug: 31684920
This reverts commit 13093d455b8266338fd713b04261c58e9dc2b164.
Change-Id: I94e4154e273d006eecdd485607dcfd96392d6a00
diff --git a/runtime/thread.cc b/runtime/thread.cc
index bf69e10..40b6d73 100644
--- a/runtime/thread.cc
+++ b/runtime/thread.cc
@@ -431,10 +431,7 @@
ArtField* priorityField = jni::DecodeArtField(WellKnownClasses::java_lang_Thread_priority);
self->SetNativePriority(priorityField->GetInt(self->tlsPtr_.opeer));
- {
- ReaderMutexLock mu(self, *Locks::runtime_callbacks_lock_);
- runtime->GetRuntimeCallbacks().ThreadStart(self);
- }
+ Dbg::PostThreadStart(self);
// Invoke the 'run' method of our java.lang.Thread.
ObjPtr<mirror::Object> receiver = self->tlsPtr_.opeer;
@@ -796,8 +793,7 @@
{
ScopedObjectAccess soa(self);
- ReaderMutexLock mu(self, *Locks::runtime_callbacks_lock_);
- runtime->GetRuntimeCallbacks().ThreadStart(self);
+ Dbg::PostThreadStart(self);
}
return self;
@@ -1933,12 +1929,7 @@
jni::DecodeArtField(WellKnownClasses::java_lang_Thread_nativePeer)
->SetLong<false>(tlsPtr_.opeer, 0);
}
- Runtime* runtime = Runtime::Current();
- if (runtime != nullptr) {
- ReaderMutexLock mu(self, *Locks::runtime_callbacks_lock_);
- runtime->GetRuntimeCallbacks().ThreadDeath(self);
- }
-
+ Dbg::PostThreadDeath(self);
// Thread.join() is implemented as an Object.wait() on the Thread.lock object. Signal anyone
// who is waiting.