summaryrefslogtreecommitdiffstats
path: root/xpcom/base/nsMemoryInfoDumper.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/nsMemoryInfoDumper.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/nsMemoryInfoDumper.cpp')
-rw-r--r--xpcom/base/nsMemoryInfoDumper.cpp62
1 files changed, 0 insertions, 62 deletions
diff --git a/xpcom/base/nsMemoryInfoDumper.cpp b/xpcom/base/nsMemoryInfoDumper.cpp
index 06453b126..afb18382d 100644
--- a/xpcom/base/nsMemoryInfoDumper.cpp
+++ b/xpcom/base/nsMemoryInfoDumper.cpp
@@ -766,65 +766,3 @@ nsMemoryInfoDumper::DumpMemoryInfoToTempDir(const nsAString& aIdentifier,
aAnonymize, aMinimizeMemoryUsage, identifier);
}
-#ifdef MOZ_DMD
-dmd::DMDFuncs::Singleton dmd::DMDFuncs::sSingleton;
-
-nsresult
-nsMemoryInfoDumper::OpenDMDFile(const nsAString& aIdentifier, int aPid,
- FILE** aOutFile)
-{
- if (!dmd::IsRunning()) {
- *aOutFile = nullptr;
- return NS_OK;
- }
-
- // Create a filename like dmd-<identifier>-<pid>.json.gz, which will be used
- // if DMD is enabled.
- nsCString dmdFilename;
- MakeFilename("dmd", aIdentifier, aPid, "json.gz", dmdFilename);
-
- // Open a new DMD file named |dmdFilename| in NS_OS_TEMP_DIR for writing,
- // and dump DMD output to it. This must occur after the memory reporters
- // have been run (above), but before the memory-reports file has been
- // renamed (so scripts can detect the DMD file, if present).
-
- nsresult rv;
- nsCOMPtr<nsIFile> dmdFile;
- rv = nsDumpUtils::OpenTempFile(dmdFilename,
- getter_AddRefs(dmdFile),
- NS_LITERAL_CSTRING("memory-reports"));
- if (NS_WARN_IF(NS_FAILED(rv))) {
- return rv;
- }
- rv = dmdFile->OpenANSIFileDesc("wb", aOutFile);
- NS_WARNING_ASSERTION(NS_SUCCEEDED(rv), "OpenANSIFileDesc failed");
-
- // Print the path, because on some platforms (e.g. Mac) it's not obvious.
- nsCString path;
- rv = dmdFile->GetNativePath(path);
- if (NS_WARN_IF(NS_FAILED(rv))) {
- return rv;
- }
- dmd::StatusMsg("opened %s for writing\n", path.get());
-
- return rv;
-}
-
-nsresult
-nsMemoryInfoDumper::DumpDMDToFile(FILE* aFile)
-{
- RefPtr<nsGZFileWriter> gzWriter = new nsGZFileWriter();
- nsresult rv = gzWriter->InitANSIFileDesc(aFile);
- if (NS_WARN_IF(NS_FAILED(rv))) {
- return rv;
- }
-
- // Dump DMD's memory reports analysis to the file.
- dmd::Analyze(MakeUnique<GZWriterWrapper>(gzWriter));
-
- rv = gzWriter->Finish();
- NS_WARNING_ASSERTION(NS_SUCCEEDED(rv), "Finish failed");
- return rv;
-}
-#endif // MOZ_DMD
-