Index: base/threading/platform_thread_posix.cc |
diff --git a/base/threading/platform_thread_posix.cc b/base/threading/platform_thread_posix.cc |
index d8bcf923a2bde1b50847271313e47f367c6955dc..66f43a26a4ec49a9de5480ae1ed928cc4be6d8d8 100644 |
--- a/base/threading/platform_thread_posix.cc |
+++ b/base/threading/platform_thread_posix.cc |
@@ -14,6 +14,7 @@ |
#include <memory> |
+#include "base/debug/activity_tracker.h" |
#include "base/lazy_instance.h" |
#include "base/logging.h" |
#include "base/threading/platform_thread_internal_posix.h" |
@@ -202,6 +203,9 @@ bool PlatformThread::CreateNonJoinable(size_t stack_size, Delegate* delegate) { |
// static |
void PlatformThread::Join(PlatformThreadHandle thread_handle) { |
+ // Record the event that this thread is blocking upon (for hang diagonsis). |
manzagop (departed)
2016/06/16 15:19:41
typo: diagonsis
|
+ base::debug::ScopedThreadJoinActivity thread_activity(&thread_handle); |
+ |
// Joining another thread may block the current thread for a long time, since |
// the thread referred to by |thread_handle| may still be running long-lived / |
// blocking tasks. |