mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1061024 (part 2) - Some minor DMD clean-ups. r=jld.
--HG-- extra : rebase_source : f780376e8803222c92a5a92bc4155600e068ce0c
This commit is contained in:
parent
ab0f8a32cb
commit
3c8c5ede88
@ -139,9 +139,10 @@ interface nsIMemoryInfoDumper : nsISupports
|
||||
* similar, such as memory-reports-<identifier>-<pid>-1.json.gz; no existing
|
||||
* file will be overwritten).
|
||||
*
|
||||
* If DMD is enabled, this method also dumps gzipped DMD output to a file in
|
||||
* the tmp directory called dmd-<identifier>-<pid>.txt.gz (or something
|
||||
* similar; again, no existing file will be overwritten).
|
||||
* If DMD is enabled, this method also dumps gzipped DMD output for this
|
||||
* process and its child processes to files in the tmp directory called
|
||||
* dmd-<identifier>-<pid>.txt.gz (or something similar; again, no existing
|
||||
* file will be overwritten).
|
||||
*
|
||||
* @param aIdentifier this identifier will appear in the filename of our
|
||||
* about:memory dump and those of our children.
|
||||
|
@ -677,7 +677,7 @@ nsMemoryInfoDumper::DumpMemoryInfoToTempDir(const nsAString& aIdentifier,
|
||||
finishReport, nullptr,
|
||||
aAnonymize,
|
||||
aMinimizeMemoryUsage,
|
||||
identifier);
|
||||
/* DMDident = */ identifier);
|
||||
return rv;
|
||||
}
|
||||
|
||||
@ -741,21 +741,6 @@ nsMemoryInfoDumper::DumpDMDToFile(FILE* aFile)
|
||||
NS_WARN_IF(NS_FAILED(rv));
|
||||
return rv;
|
||||
}
|
||||
|
||||
nsresult
|
||||
nsMemoryInfoDumper::DumpDMD(const nsAString& aIdentifier)
|
||||
{
|
||||
nsresult rv;
|
||||
FILE* dmdFile;
|
||||
rv = OpenDMDFile(aIdentifier, getpid(), &dmdFile);
|
||||
if (NS_WARN_IF(NS_FAILED(rv))) {
|
||||
return rv;
|
||||
}
|
||||
if (!dmdFile) {
|
||||
return NS_OK;
|
||||
}
|
||||
return DumpDMDToFile(dmdFile);
|
||||
}
|
||||
#endif // MOZ_DMD
|
||||
|
||||
NS_IMETHODIMP
|
||||
@ -922,11 +907,11 @@ nsMemoryInfoDumper::DumpMemoryReportsToNamedFile(
|
||||
}
|
||||
|
||||
// Process reports and finish up.
|
||||
nsCOMPtr<nsIMemoryReporterManager> mgr =
|
||||
do_GetService("@mozilla.org/memory-reporter-manager;1");
|
||||
nsRefPtr<DumpReportCallback> dumpReport = new DumpReportCallback(mrWriter);
|
||||
nsRefPtr<FinishReportingCallback> finishReporting =
|
||||
new FinishReportingCallback(aFinishDumping, aFinishDumpingData);
|
||||
nsCOMPtr<nsIMemoryReporterManager> mgr =
|
||||
do_GetService("@mozilla.org/memory-reporter-manager;1");
|
||||
return mgr->GetReports(dumpReport, nullptr, finishReporting, mrWriter,
|
||||
aAnonymize);
|
||||
}
|
||||
|
@ -32,8 +32,6 @@ public:
|
||||
static void Initialize();
|
||||
|
||||
#ifdef MOZ_DMD
|
||||
// Write a DMD report.
|
||||
static nsresult DumpDMD(const nsAString& aIdentifier);
|
||||
// Open an appropriately named file for a DMD report. If DMD is
|
||||
// disabled, return a null FILE* instead.
|
||||
static nsresult OpenDMDFile(const nsAString& aIdentifier, int aPid,
|
||||
|
@ -1094,7 +1094,7 @@ nsMemoryReporterManager::GetReports(
|
||||
aFinishReporting, aFinishReportingData,
|
||||
aAnonymize,
|
||||
/* minimize = */ false,
|
||||
/* DMDident = */ nsString());
|
||||
/* DMDident = */ EmptyString());
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
|
Loading…
Reference in New Issue
Block a user