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

Unified Diff: base/synchronization/lock_impl_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: addressed review comments 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
Index: base/synchronization/lock_impl_posix.cc
diff --git a/base/synchronization/lock_impl_posix.cc b/base/synchronization/lock_impl_posix.cc
index 5619adaf5d829df72f93fd57b0687d551fb9390d..bd1e6bed69ba3bec53f0677de26c7f6effb68038 100644
--- a/base/synchronization/lock_impl_posix.cc
+++ b/base/synchronization/lock_impl_posix.cc
@@ -7,6 +7,7 @@
#include <errno.h>
#include <string.h>
+#include "base/debug/activity_tracker.h"
#include "base/logging.h"
namespace base {
@@ -42,6 +43,7 @@ bool LockImpl::Try() {
}
void LockImpl::Lock() {
+ base::debug::ScopedLockAcquireActivity lock_activity(this);
int rv = pthread_mutex_lock(&native_handle_);
DCHECK_EQ(rv, 0) << ". " << strerror(rv);
}

Powered by Google App Engine
This is Rietveld 408576698