Add more info to who called SuspendAll
Helps diagnose related jank.
Change-Id: I38191cdda723c6f0355d0197c494a3dff2b6653c
diff --git a/runtime/debugger.cc b/runtime/debugger.cc
index 9f2a09b..6296cf5 100644
--- a/runtime/debugger.cc
+++ b/runtime/debugger.cc
@@ -644,7 +644,7 @@
}
Runtime* runtime = Runtime::Current();
- runtime->GetThreadList()->SuspendAll();
+ runtime->GetThreadList()->SuspendAll(__FUNCTION__);
Thread* self = Thread::Current();
ThreadState old_state = self->SetStateUnsafe(kRunnable);
CHECK_NE(old_state, kRunnable);
@@ -668,7 +668,7 @@
// to kRunnable to avoid scoped object access transitions. Remove the debugger as a listener
// and clear the object registry.
Runtime* runtime = Runtime::Current();
- runtime->GetThreadList()->SuspendAll();
+ runtime->GetThreadList()->SuspendAll(__FUNCTION__);
Thread* self = Thread::Current();
ThreadState old_state = self->SetStateUnsafe(kRunnable);
@@ -819,7 +819,7 @@
Thread* self = Thread::Current();
CHECK_EQ(self->GetState(), kRunnable);
self->TransitionFromRunnableToSuspended(kSuspended);
- Runtime::Current()->GetThreadList()->SuspendAll();
+ Runtime::Current()->GetThreadList()->SuspendAll(__FUNCTION__);
MonitorInfo monitor_info(o);
@@ -3135,7 +3135,7 @@
self->TransitionFromRunnableToSuspended(kWaitingForDeoptimization);
// We need to suspend mutator threads first.
Runtime* const runtime = Runtime::Current();
- runtime->GetThreadList()->SuspendAll();
+ runtime->GetThreadList()->SuspendAll(__FUNCTION__);
const ThreadState old_state = self->SetStateUnsafe(kRunnable);
{
MutexLock mu(self, *Locks::deoptimization_lock_);
@@ -4436,7 +4436,7 @@
// RosAlloc's internal logic doesn't know to release and reacquire the heap bitmap lock.
self->TransitionFromRunnableToSuspended(kSuspended);
ThreadList* tl = Runtime::Current()->GetThreadList();
- tl->SuspendAll();
+ tl->SuspendAll(__FUNCTION__);
{
ReaderMutexLock mu(self, *Locks::heap_bitmap_lock_);
space->AsRosAllocSpace()->Walk(HeapChunkContext::HeapChunkJavaCallback, &context);
@@ -4452,7 +4452,7 @@
heap->IncrementDisableMovingGC(self);
self->TransitionFromRunnableToSuspended(kSuspended);
ThreadList* tl = Runtime::Current()->GetThreadList();
- tl->SuspendAll();
+ tl->SuspendAll(__FUNCTION__);
ReaderMutexLock mu(self, *Locks::heap_bitmap_lock_);
context.SetChunkOverhead(0);
space->AsRegionSpace()->Walk(BumpPointerSpaceCallback, &context);