summaryrefslogtreecommitdiffstats
path: root/xpcom/base/nsTraceRefcnt.cpp
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@gmail.com>2018-05-23 16:31:42 +0200
committerwolfbeast <mcwerewolf@gmail.com>2018-05-23 16:31:42 +0200
commitfcd7ee3c886c435f178230b13d0b0cb0c9c40c53 (patch)
treeabfa8d9a272d739ffe2d92bfcf57d9fd5f7e5157 /xpcom/base/nsTraceRefcnt.cpp
parent612459488e5810335c493c467c239c40787cc1d3 (diff)
downloadUXP-fcd7ee3c886c435f178230b13d0b0cb0c9c40c53.tar
UXP-fcd7ee3c886c435f178230b13d0b0cb0c9c40c53.tar.gz
UXP-fcd7ee3c886c435f178230b13d0b0cb0c9c40c53.tar.lz
UXP-fcd7ee3c886c435f178230b13d0b0cb0c9c40c53.tar.xz
UXP-fcd7ee3c886c435f178230b13d0b0cb0c9c40c53.zip
Remove the Dark Matter Detector (DMD) Memeory debugger component.
This resolves #376.
Diffstat (limited to 'xpcom/base/nsTraceRefcnt.cpp')
-rw-r--r--xpcom/base/nsTraceRefcnt.cpp42
1 files changed, 0 insertions, 42 deletions
diff --git a/xpcom/base/nsTraceRefcnt.cpp b/xpcom/base/nsTraceRefcnt.cpp
index 3b415174b..da51305a9 100644
--- a/xpcom/base/nsTraceRefcnt.cpp
+++ b/xpcom/base/nsTraceRefcnt.cpp
@@ -42,11 +42,6 @@
#include <dlfcn.h>
#endif
-#ifdef MOZ_DMD
-#include "base/process_util.h"
-#include "nsMemoryInfoDumper.h"
-#endif
-
////////////////////////////////////////////////////////////////////////////////
#include "plhash.h"
@@ -936,39 +931,6 @@ NS_LogTerm()
mozilla::LogTerm();
}
-#ifdef MOZ_DMD
-// If MOZ_DMD_SHUTDOWN_LOG is set, dump a DMD report to a file.
-// The value of this environment variable is used as the prefix
-// of the file name, so you probably want something like "/tmp/".
-// By default, this is run in all processes, but you can record a
-// log only for a specific process type by setting MOZ_DMD_LOG_PROCESS
-// to the process type you want to log, such as "default" or "tab".
-// This method can't use the higher level XPCOM file utilities
-// because it is run very late in shutdown to avoid recording
-// information about refcount logging entries.
-static void
-LogDMDFile()
-{
- const char* dmdFilePrefix = PR_GetEnv("MOZ_DMD_SHUTDOWN_LOG");
- if (!dmdFilePrefix) {
- return;
- }
-
- const char* logProcessEnv = PR_GetEnv("MOZ_DMD_LOG_PROCESS");
- if (logProcessEnv && !!strcmp(logProcessEnv, XRE_ChildProcessTypeToString(XRE_GetProcessType()))) {
- return;
- }
-
- nsPrintfCString fileName("%sdmd-%d.log.gz", dmdFilePrefix, base::GetCurrentProcId());
- FILE* logFile = fopen(fileName.get(), "w");
- if (NS_WARN_IF(!logFile)) {
- return;
- }
-
- nsMemoryInfoDumper::DumpDMDToFile(logFile);
-}
-#endif // MOZ_DMD
-
namespace mozilla {
void
LogTerm()
@@ -1000,10 +962,6 @@ LogTerm()
nsTraceRefcnt::Shutdown();
nsTraceRefcnt::SetActivityIsLegal(false);
gActivityTLS = BAD_TLS_INDEX;
-
-#ifdef MOZ_DMD
- LogDMDFile();
-#endif
}
}