Add more logging to Thread::SetState
In the case where SetState is used for a runnable state, add more
logging the DCHECK.
Bug: 151334951
Test: make
Change-Id: Ia1a0e60eed0815b459cbc5d1e7b60aed826245af
diff --git a/runtime/thread-inl.h b/runtime/thread-inl.h
index 0404ac9..a6da16f 100644
--- a/runtime/thread-inl.h
+++ b/runtime/thread-inl.h
@@ -114,7 +114,8 @@
}
union StateAndFlags old_state_and_flags;
old_state_and_flags.as_int = tls32_.state_and_flags.as_int;
- CHECK_NE(old_state_and_flags.as_struct.state, kRunnable);
+ CHECK_NE(old_state_and_flags.as_struct.state, kRunnable) << new_state << " " << *this << " "
+ << *Thread::Current();
tls32_.state_and_flags.as_struct.state = new_state;
return static_cast<ThreadState>(old_state_and_flags.as_struct.state);
}