summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGabriel Russell <gabriel.russell@mongodb.com>2020-01-16 21:09:57 +0000
committerevergreen <evergreen@mongodb.com>2020-01-16 21:09:57 +0000
commita610dc6d69e6a14758e8160dbf94aee258d19494 (patch)
treeb456da1f17d4b404cbbb2aaba74707a10db83ab0 /src
parent7ba6fede8aab0ab8a77515d7c11a017b213d8f93 (diff)
downloadmongo-a610dc6d69e6a14758e8160dbf94aee258d19494.tar.gz
SERVER-45524 remove support for logging void * types
Diffstat (limited to 'src')
-rw-r--r--src/mongo/db/concurrency/lock_manager.cpp2
-rw-r--r--src/mongo/db/service_context.cpp2
-rw-r--r--src/mongo/logger/logstream_builder.h8
-rw-r--r--src/mongo/scripting/mozjs/engine.cpp4
-rw-r--r--src/mongo/util/stacktrace_test.cpp4
5 files changed, 6 insertions, 14 deletions
diff --git a/src/mongo/db/concurrency/lock_manager.cpp b/src/mongo/db/concurrency/lock_manager.cpp
index a7d3671c630..0ab21e4c425 100644
--- a/src/mongo/db/concurrency/lock_manager.cpp
+++ b/src/mongo/db/concurrency/lock_manager.cpp
@@ -826,7 +826,7 @@ LockManager::Partition* LockManager::_getPartition(LockRequest* request) const {
}
void LockManager::dump() const {
- log() << "Dumping LockManager @ " << static_cast<const void*>(this) << '\n';
+ log() << "Dumping LockManager @ " << reinterpret_cast<uint64_t>(this) << '\n';
auto lockToClientMap = getLockToClientMap(getGlobalServiceContext());
for (unsigned i = 0; i < _numLockBuckets; i++) {
diff --git a/src/mongo/db/service_context.cpp b/src/mongo/db/service_context.cpp
index 511208ddc94..760efa6c4e8 100644
--- a/src/mongo/db/service_context.cpp
+++ b/src/mongo/db/service_context.cpp
@@ -111,7 +111,7 @@ ServiceContext::~ServiceContext() {
stdx::lock_guard<Latch> lk(_mutex);
for (const auto& client : _clients) {
severe() << "Client " << client->desc() << " still exists while destroying ServiceContext@"
- << static_cast<void*>(this);
+ << reinterpret_cast<uint64_t>(this);
}
invariant(_clients.empty());
}
diff --git a/src/mongo/logger/logstream_builder.h b/src/mongo/logger/logstream_builder.h
index 2ea07987521..ba5cb2ef689 100644
--- a/src/mongo/logger/logstream_builder.h
+++ b/src/mongo/logger/logstream_builder.h
@@ -162,14 +162,6 @@ public:
stream() << x;
return *this;
}
- LogstreamBuilder& operator<<(void* x) {
- stream() << x;
- return *this;
- }
- LogstreamBuilder& operator<<(const void* x) {
- stream() << x;
- return *this;
- }
LogstreamBuilder& operator<<(long long x) {
stream() << x;
return *this;
diff --git a/src/mongo/scripting/mozjs/engine.cpp b/src/mongo/scripting/mozjs/engine.cpp
index 4a8427d7dd9..bac89aaef86 100644
--- a/src/mongo/scripting/mozjs/engine.cpp
+++ b/src/mongo/scripting/mozjs/engine.cpp
@@ -147,7 +147,7 @@ void MozJSScriptEngine::registerOperation(OperationContext* opCtx, MozJSImplScop
_opToScopeMap[opId] = scope;
- LOG(2) << "SMScope " << static_cast<const void*>(scope) << " registered for op " << opId;
+ LOG(2) << "SMScope " << reinterpret_cast<uint64_t>(scope) << " registered for op " << opId;
Status status = opCtx->checkForInterruptNoAssert();
if (!status.isOK()) {
scope->kill();
@@ -157,7 +157,7 @@ void MozJSScriptEngine::registerOperation(OperationContext* opCtx, MozJSImplScop
void MozJSScriptEngine::unregisterOperation(unsigned int opId) {
stdx::lock_guard<Latch> giLock(_globalInterruptLock);
- LOG(2) << "ImplScope " << static_cast<const void*>(this) << " unregistered for op " << opId;
+ LOG(2) << "ImplScope " << reinterpret_cast<uint64_t>(this) << " unregistered for op " << opId;
if (opId != 0) {
// scope is currently associated with an operation id
diff --git a/src/mongo/util/stacktrace_test.cpp b/src/mongo/util/stacktrace_test.cpp
index 6340977c9c3..0140fce002d 100644
--- a/src/mongo/util/stacktrace_test.cpp
+++ b/src/mongo/util/stacktrace_test.cpp
@@ -504,7 +504,7 @@ public:
unittest::log() << "tid:" << ostr(stdx::this_thread::get_id()) << ", caught signal " << sig
<< "!\n";
char storage;
- unittest::log() << "local var:" << (const void*)&storage << "\n";
+ unittest::log() << "local var:" << reinterpret_cast<uint64_t>(&storage) << "\n";
}
static void tryHandler(void (*handler)(int, siginfo_t*, void*)) {
@@ -872,7 +872,7 @@ TEST(StackTrace, BacktraceThroughLibc) {
});
unittest::log() << "caught [" << capture.arrSize << "]:";
for (size_t i = 0; i < capture.arrSize; ++i) {
- unittest::log() << " [" << i << "] " << capture.arr[i];
+ unittest::log() << " [" << i << "] " << reinterpret_cast<uint64_t>(capture.arr[i]);
}
}
#endif // mongo stacktrace backend