summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruce Lucas <bruce.lucas@10gen.com>2016-10-07 14:31:37 -0400
committerBruce Lucas <bruce.lucas@10gen.com>2016-10-13 09:31:25 -0400
commit776eb57c89cd9dc397e2aea0f1d49be48e05210d (patch)
tree489c2f5ec8c5e2e89e502ff6c6d4ad1b39e83dfa
parentaa15cdf64df61d5882ec30fd0757c043bfffbf5e (diff)
downloadmongo-776eb57c89cd9dc397e2aea0f1d49be48e05210d.tar.gz
SERVER-26465 Log somap info when doing heap profiling
(cherry picked from commit 8410a7cd7d145d5923f9b5ebc9672e612e6fcc1d)
-rw-r--r--src/mongo/util/heap_profiler.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mongo/util/heap_profiler.cpp b/src/mongo/util/heap_profiler.cpp
index 288bd441e08..ecfa3bdb885 100644
--- a/src/mongo/util/heap_profiler.cpp
+++ b/src/mongo/util/heap_profiler.cpp
@@ -35,6 +35,7 @@
#include "mongo/db/commands/server_status.h"
#include "mongo/db/server_parameters.h"
#include "mongo/util/log.h"
+#include "mongo/util/stacktrace.h"
#include <gperftools/malloc_hook.h>
#include <third_party/murmurhash3/MurmurHash3.h>
@@ -530,6 +531,9 @@ private:
<< "maxActiveMemory " << maxActiveMemory / MB << " MB; "
<< "objTableSize " << objTableSize / MB << " MB; "
<< "stackTableSize " << stackTableSize / MB << " MB";
+ // print a stack trace to log somap for post-facto symbolization
+ log() << "following stack trace is for heap profiler informational purposes";
+ printStackTrace();
logGeneralStats = false;
}