Extra suspend count modification failure logging.
Change-Id: I18738c94f8abe7afec588f7b91685e2cbdf7eefc
diff --git a/src/thread_list.cc b/src/thread_list.cc
index 45b7966..e8b412c 100644
--- a/src/thread_list.cc
+++ b/src/thread_list.cc
@@ -75,8 +75,10 @@
#endif
if (delta == -1 && thread->suspend_count_ <= 0) {
// This is expected if you attach a thread during a GC.
- if (!thread->IsStillStarting()) {
- LOG(FATAL) << *thread << " suspend count already zero";
+ if (UNLIKELY(!thread->IsStillStarting())) {
+ std::ostringstream ss;
+ Runtime::Current()->GetThreadList()->DumpLocked(ss);
+ LOG(FATAL) << *thread << " suspend count already zero.\n" << ss.str();
}
return;
}