зеркало из https://github.com/mozilla/pjs.git
Bug 693976 - Don't parse /proc/self/maps once for every entry in /proc/self/smaps. r=khuey
This commit is contained in:
Родитель
06ff2a9e4c
Коммит
2d4b7da9cd
|
@ -175,6 +175,7 @@ private:
|
|||
nsISupports *aClosure,
|
||||
CategoriesSeen *aCategoriesSeen);
|
||||
|
||||
bool mSearchedForLibxul;
|
||||
nsCString mLibxulDir;
|
||||
nsCStringHashSet mMozillaLibraries;
|
||||
};
|
||||
|
@ -182,6 +183,7 @@ private:
|
|||
NS_IMPL_THREADSAFE_ISUPPORTS1(MapsReporter, nsIMemoryMultiReporter)
|
||||
|
||||
MapsReporter::MapsReporter()
|
||||
: mSearchedForLibxul(false)
|
||||
{
|
||||
const PRUint32 len = NS_ARRAY_LENGTH(mozillaLibraries);
|
||||
mMozillaLibraries.Init(len);
|
||||
|
@ -233,6 +235,11 @@ MapsReporter::CollectReports(nsIMemoryMultiReporterCallback *aCallback,
|
|||
nsresult
|
||||
MapsReporter::FindLibxul()
|
||||
{
|
||||
if (mSearchedForLibxul)
|
||||
return NS_OK;
|
||||
|
||||
mSearchedForLibxul = true;
|
||||
|
||||
mLibxulDir.Truncate();
|
||||
|
||||
// Note that we're scanning /proc/self/*maps*, not smaps, here.
|
||||
|
|
Загрузка…
Ссылка в новой задаче