summaryrefslogtreecommitdiff
path: root/src/mongo/util/diagnostic_info.cpp
diff options
context:
space:
mode:
authorRahul Sundararaman <rahul.sundararaman@mongodb.com>2019-11-19 20:52:49 +0000
committerevergreen <evergreen@mongodb.com>2019-11-19 20:52:49 +0000
commitebbc4ed166c5f5aec7700e44b47b1c5879917c61 (patch)
tree50d4cec5c97b768ec8c50138191bb21c9867ff0b /src/mongo/util/diagnostic_info.cpp
parent88956acd276472b1b4c0192f73b07d67c4cae29c (diff)
downloadmongo-ebbc4ed166c5f5aec7700e44b47b1c5879917c61.tar.gz
SERVER-42897 Validate base-level latches
Diffstat (limited to 'src/mongo/util/diagnostic_info.cpp')
-rw-r--r--src/mongo/util/diagnostic_info.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/mongo/util/diagnostic_info.cpp b/src/mongo/util/diagnostic_info.cpp
index e6bf99a15bf..869dd13babe 100644
--- a/src/mongo/util/diagnostic_info.cpp
+++ b/src/mongo/util/diagnostic_info.cpp
@@ -174,24 +174,24 @@ const auto getDiagnosticInfoHandle = Client::declareDecoration<DiagnosticInfoHan
MONGO_INITIALIZER(LockListener)(InitializerContext* context) {
class LockListener : public Mutex::LockListener {
- void onContendedLock(const StringData& name) override {
+ void onContendedLock(const Mutex::Identity& id) override {
if (auto client = Client::getCurrent()) {
auto& handle = getDiagnosticInfoHandle(client);
stdx::lock_guard<stdx::mutex> lk(handle.mutex);
- handle.list.emplace_front(DiagnosticInfo::capture(name));
+ handle.list.emplace_front(DiagnosticInfo::capture(id.name));
if (currentOpSpawnsThreadWaitingForLatch.shouldFail() &&
- (name == kBlockedOpMutexName)) {
+ (id.name == kBlockedOpMutexName)) {
gBlockedOp.setIsContended(true);
}
}
}
- void onQuickLock(const StringData&) override {
+ void onQuickLock(const Mutex::Identity&) override {
// Do nothing
}
- void onSlowLock(const StringData& name) override {
+ void onSlowLock(const Mutex::Identity& id) override {
if (auto client = Client::getCurrent()) {
auto& handle = getDiagnosticInfoHandle(client);
stdx::lock_guard<stdx::mutex> lk(handle.mutex);
@@ -201,7 +201,7 @@ MONGO_INITIALIZER(LockListener)(InitializerContext* context) {
}
}
- void onUnlock(const StringData&) override {
+ void onUnlock(const Mutex::Identity&) override {
// Do nothing
}
};