Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(434)

Unified Diff: base/threading/platform_thread_win.cc

Issue 1980743002: Track thread activities in order to diagnose hangs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@readwrite-mmf
Patch Set: rebased Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/threading/platform_thread_posix.cc ('k') | chrome/browser/chrome_browser_field_trials_desktop.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/threading/platform_thread_win.cc
diff --git a/base/threading/platform_thread_win.cc b/base/threading/platform_thread_win.cc
index f5c136e2e215101122250f40b60623386d9b052d..2644eee520b82c0520c760addc8e9fc3415aadf2 100644
--- a/base/threading/platform_thread_win.cc
+++ b/base/threading/platform_thread_win.cc
@@ -6,6 +6,7 @@
#include <stddef.h>
+#include "base/debug/activity_tracker.h"
#include "base/debug/alias.h"
#include "base/debug/profiler.h"
#include "base/logging.h"
@@ -210,6 +211,9 @@ bool PlatformThread::CreateNonJoinableWithPriority(size_t stack_size,
// static
void PlatformThread::Join(PlatformThreadHandle thread_handle) {
+ // Record the event that this thread is blocking upon (for hang diagnosis).
+ base::debug::ScopedThreadJoinActivity thread_activity(&thread_handle);
+
DCHECK(thread_handle.platform_handle());
// TODO(willchan): Enable this check once I can get it to work for Windows
// shutdown.
« no previous file with comments | « base/threading/platform_thread_posix.cc ('k') | chrome/browser/chrome_browser_field_trials_desktop.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698