OSDN Git Service

Print thread name for attempting to unregister unattached thread
authorMathieu Chartier <mathieuc@google.com>
Wed, 25 Feb 2015 01:20:30 +0000 (17:20 -0800)
committerMathieu Chartier <mathieuc@google.com>
Wed, 25 Feb 2015 01:21:24 +0000 (17:21 -0800)
Bug: 18713034
Change-Id: Ic0654c6569277e5bbd6d2582140595faaa36cded

runtime/thread_list.cc

index d0f014a..83c5ffb 100644 (file)
@@ -1107,9 +1107,11 @@ void ThreadList::Unregister(Thread* self) {
     Locks::thread_list_lock_->ExclusiveLock(self);
     bool removed = true;
     if (!Contains(self)) {
+      std::string thread_name;
+      self->GetThreadName(thread_name);
       std::ostringstream os;
       DumpNativeStack(os, GetTid(), "  native: ", nullptr);
-      LOG(ERROR) << "Request to unregister unattached thread\n" << os.str();
+      LOG(ERROR) << "Request to unregister unattached thread " << thread_name << "\n" << os.str();
     } else {
       Locks::thread_suspend_count_lock_->ExclusiveLock(self);
       if (!self->IsSuspended()) {