Bug 1063321 - Print to the console the paths of all files that DMD opens. r=mccr8.

--HG--
extra : rebase_source : 50a18a0a074f929ab934c5b3eade1c69e6ba4510
This commit is contained in:
Nicholas Nethercote 2014-09-04 20:45:22 -07:00
Родитель a808a05adb
Коммит c632d54478
3 изменённых файлов: 14 добавлений и 1 удалений

Просмотреть файл

@ -195,7 +195,7 @@ MallocSizeOf(const void* aPtr)
return gMallocTable->malloc_usable_size(const_cast<void*>(aPtr));
}
static void
MOZ_EXPORT void
StatusMsg(const char* aFmt, ...)
{
va_list ap;

Просмотреть файл

@ -84,6 +84,10 @@ struct Sizes
MOZ_EXPORT void
SizeOf(Sizes* aSizes);
// Prints a status message prefixed with "DMD[<pid>]". Use sparingly.
MOZ_EXPORT void
StatusMsg(const char* aFmt, ...);
// Indicates whether or not DMD is running.
MOZ_EXPORT bool
IsRunning();

Просмотреть файл

@ -711,6 +711,15 @@ nsMemoryInfoDumper::OpenDMDFile(const nsAString& aIdentifier, int aPid,
}
rv = dmdFile->OpenANSIFileDesc("wb", aOutFile);
NS_WARN_IF(NS_FAILED(rv));
// 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;
}