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

Unified Diff: base/process/process_posix.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/debug/task_annotator.cc ('k') | base/process/process_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/process/process_posix.cc
diff --git a/base/process/process_posix.cc b/base/process/process_posix.cc
index ade82e5ce663be75a4bd376f060d8ad8354fc4b1..a9d745eeead1cfa6c426b4e974cbf2ede034a159 100644
--- a/base/process/process_posix.cc
+++ b/base/process/process_posix.cc
@@ -9,6 +9,7 @@
#include <sys/resource.h>
#include <sys/wait.h>
+#include "base/debug/activity_tracker.h"
#include "base/files/scoped_file.h"
#include "base/logging.h"
#include "base/posix/eintr_wrapper.h"
@@ -354,6 +355,9 @@ bool Process::WaitForExit(int* exit_code) {
}
bool Process::WaitForExitWithTimeout(TimeDelta timeout, int* exit_code) {
+ // Record the event that this thread is blocking upon (for hang diagnosis).
+ base::debug::ScopedProcessWaitActivity process_activity(this);
+
return WaitForExitWithTimeoutImpl(Handle(), exit_code, timeout);
}
« no previous file with comments | « base/debug/task_annotator.cc ('k') | base/process/process_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698