Bug 1205358 - Fix up nsUrlClassifierPrefixSet memory reporting. r=gcp.

This patch reverts the "measure-in-advance" approach added in part 1 of bug
1050108 -- because that doesn't interact well with DMD -- and adds locking to
avoid races between the url-classifier thread and the main thread.
This commit is contained in:
Nicholas Nethercote
2016-02-10 08:30:48 +11:00
parent f0af29f52b
commit f852416a40
3 changed files with 45 additions and 22 deletions

View File

@@ -584,7 +584,7 @@ LookupCache::ConstructPrefixSet(AddPrefixArray& aAddPrefixes)
#ifdef DEBUG
uint32_t size;
size = mPrefixSet->SizeInMemory();
size = mPrefixSet->SizeOfIncludingThis(moz_malloc_size_of);
LOG(("SB tree done, size = %d bytes\n", size));
#endif
@@ -627,7 +627,7 @@ LookupCache::LoadPrefixSet()
#ifdef DEBUG
if (mPrimed) {
uint32_t size = mPrefixSet->SizeInMemory();
uint32_t size = mPrefixSet->SizeOfIncludingThis(moz_malloc_size_of);
LOG(("SB tree done, size = %d bytes\n", size));
}
#endif