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

Unified Diff: src/base/platform/semaphore.cc

Issue 1961893002: Instrument callers of Semaphore::Signal to help with investigation of (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 7 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 | « src/base/platform/semaphore.h ('k') | src/debug/debug.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/base/platform/semaphore.cc
diff --git a/src/base/platform/semaphore.cc b/src/base/platform/semaphore.cc
index c94bfa7953f938d2347738e3f427d786b5c9d4e8..64489f91c21d652e53cd04504e001cb4770d0943 100644
--- a/src/base/platform/semaphore.cc
+++ b/src/base/platform/semaphore.cc
@@ -34,11 +34,11 @@ Semaphore::~Semaphore() {
USE(result);
}
-
-void Semaphore::Signal() {
+void Semaphore::Signal(const char* caller) {
kern_return_t result = semaphore_signal(native_handle_);
DCHECK_EQ(KERN_SUCCESS, result);
USE(result);
+ USE(caller);
}
@@ -104,11 +104,11 @@ Semaphore::~Semaphore() {
USE(result);
}
-
-void Semaphore::Signal() {
+void Semaphore::Signal(const char* caller) {
int result = sem_post(&native_handle_);
if (result != 0) {
- V8_Fatal(__FILE__, __LINE__, "Semaphore signal failure: %d\n", errno);
+ V8_Fatal(__FILE__, __LINE__,
+ "Semaphore signal failure: %d called by '%s'\n", errno, caller);
}
}
@@ -177,12 +177,12 @@ Semaphore::~Semaphore() {
USE(result);
}
-
-void Semaphore::Signal() {
+void Semaphore::Signal(const char* caller) {
LONG dummy;
BOOL result = ReleaseSemaphore(native_handle_, 1, &dummy);
DCHECK(result);
USE(result);
+ USE(caller);
}
« no previous file with comments | « src/base/platform/semaphore.h ('k') | src/debug/debug.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698