Bug 819819 (part 2) - Remove |name| from NS_MEMORY_REPORTER_MALLOC_SIZEOF_FUN. r=jlebar.
authorNicholas Nethercote <nnethercote@mozilla.com>
Sun, 23 Dec 2012 16:59:51 -0800
changeset 126404 0ef8548a7ab6e011afc7b893e1d9cf4f0f612631
parent 126403 dabddf3ea183100cd39a2b9a1b81b6035d81f209
child 126405 1e5c46117dc5eaaca719ffa81b52bc0a4cca32bc
push id2151
push userlsblakk@mozilla.com
push dateTue, 19 Feb 2013 18:06:57 +0000
treeherdermozilla-beta@4952e88741ec [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjlebar
bugs819819
milestone20.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 819819 (part 2) - Remove |name| from NS_MEMORY_REPORTER_MALLOC_SIZEOF_FUN. r=jlebar.
browser/components/preferences/in-content/tests/privacypane_tests.js
browser/components/preferences/tests/privacypane_tests.js
content/base/src/nsDOMFile.cpp
content/canvas/src/WebGLContextReporter.cpp
dom/base/nsJSEnvironment.cpp
dom/base/nsWindowMemoryReporter.cpp
dom/tests/mochitest/localstorage/test_localStorageQuotaPrivateBrowsing.html
dom/workers/WorkerPrivate.cpp
extensions/spellcheck/hunspell/src/mozHunspell.cpp
gfx/thebes/gfxAndroidPlatform.cpp
gfx/thebes/gfxFont.cpp
gfx/thebes/gfxPlatformFontList.cpp
image/src/imgLoader.cpp
js/xpconnect/src/XPCJSRuntime.cpp
layout/base/nsStyleSheetService.cpp
layout/style/nsLayoutStylesheetCache.cpp
modules/libpref/src/Preferences.cpp
netwerk/cache/nsCacheService.cpp
netwerk/dns/nsEffectiveTLDService.cpp
startupcache/StartupCache.cpp
storage/src/mozStorageService.cpp
toolkit/components/places/History.cpp
toolkit/components/places/tests/browser/browser_favicon_privatebrowsing.js
toolkit/components/telemetry/Telemetry.cpp
toolkit/components/url-classifier/nsUrlClassifierPrefixSet.cpp
xpcom/base/nsCycleCollector.cpp
xpcom/base/nsIMemoryReporter.idl
xpcom/base/nsMemoryReporterManager.cpp
xpcom/components/nsCategoryManager.cpp
xpcom/components/nsComponentManager.cpp
xpcom/reflect/xptinfo/src/xptiInterfaceInfoManager.cpp
--- a/content/base/src/nsDOMFile.cpp
+++ b/content/base/src/nsDOMFile.cpp
@@ -610,18 +610,17 @@ nsDOMMemoryFile::GetInternalStream(nsIIn
 }
 
 /* static */ StaticAutoPtr<LinkedList<nsDOMMemoryFile::DataOwner> >
 nsDOMMemoryFile::DataOwner::sDataOwners;
 
 /* static */ bool
 nsDOMMemoryFile::DataOwner::sMemoryReporterRegistered;
 
-NS_MEMORY_REPORTER_MALLOC_SIZEOF_FUN(DOMMemoryFileDataOwnerSizeOf,
-                                     "memory-file-data");
+NS_MEMORY_REPORTER_MALLOC_SIZEOF_FUN(DOMMemoryFileDataOwnerMallocSizeOf)
 
 class nsDOMMemoryFileDataOwnerMemoryReporter MOZ_FINAL
   : public nsIMemoryMultiReporter
 {
   NS_DECL_ISUPPORTS
 
   NS_IMETHOD GetName(nsACString& aName)
   {
@@ -646,17 +645,17 @@ class nsDOMMemoryFileDataOwnerMemoryRepo
     }
 
     const size_t LARGE_OBJECT_MIN_SIZE = 8 * 1024;
     size_t smallObjectsTotal = 0;
 
     for (DataOwner *owner = DataOwner::sDataOwners->getFirst();
          owner; owner = owner->getNext()) {
 
-      size_t size = DOMMemoryFileDataOwnerSizeOf(owner->mData);
+      size_t size = DOMMemoryFileDataOwnerMallocSizeOf(owner->mData);
 
       if (size < LARGE_OBJECT_MIN_SIZE) {
         smallObjectsTotal += size;
       }
       else {
         SHA1Sum sha1;
         sha1.update(owner->mData, owner->mLength);
         uint8_t digest[SHA1Sum::HashSize]; // SHA1 digests are 20 bytes long.
--- a/content/canvas/src/WebGLContextReporter.cpp
+++ b/content/canvas/src/WebGLContextReporter.cpp
@@ -135,42 +135,42 @@ WebGLMemoryMultiReporterWrapper::WebGLMe
     NS_RegisterMemoryMultiReporter(mReporter);
 }
 
 WebGLMemoryMultiReporterWrapper::~WebGLMemoryMultiReporterWrapper()
 {
     NS_UnregisterMemoryMultiReporter(mReporter);
 }
 
-NS_MEMORY_REPORTER_MALLOC_SIZEOF_FUN(WebGLBufferMallocSizeOfFun, "webgl-buffer")
+NS_MEMORY_REPORTER_MALLOC_SIZEOF_FUN(WebGLBufferMallocSizeOf)
 
 int64_t 
 WebGLMemoryMultiReporterWrapper::GetBufferCacheMemoryUsed() {
     const ContextsArrayType & contexts = Contexts();
     int64_t result = 0;
     for(size_t i = 0; i < contexts.Length(); ++i) {
         for (const WebGLBuffer *buffer = contexts[i]->mBuffers.getFirst();
              buffer;
              buffer = buffer->getNext())
         {
             if (buffer->Target() == LOCAL_GL_ELEMENT_ARRAY_BUFFER)
-                result += buffer->SizeOfIncludingThis(WebGLBufferMallocSizeOfFun);
+                result += buffer->SizeOfIncludingThis(WebGLBufferMallocSizeOf);
         }
     }
     return result;
 }
 
-NS_MEMORY_REPORTER_MALLOC_SIZEOF_FUN(WebGLShaderMallocSizeOfFun, "webgl-shader")
+NS_MEMORY_REPORTER_MALLOC_SIZEOF_FUN(WebGLShaderMallocSizeOf)
 
 int64_t 
 WebGLMemoryMultiReporterWrapper::GetShaderSize() {
     const ContextsArrayType & contexts = Contexts();
     int64_t result = 0;
     for(size_t i = 0; i < contexts.Length(); ++i) {
         for (const WebGLShader *shader = contexts[i]->mShaders.getFirst();
              shader;
              shader = shader->getNext())
         {
-            result += shader->SizeOfIncludingThis(WebGLShaderMallocSizeOfFun);
+            result += shader->SizeOfIncludingThis(WebGLShaderMallocSizeOf);
         }
     }
     return result;
 }
--- a/dom/base/nsJSEnvironment.cpp
+++ b/dom/base/nsJSEnvironment.cpp
@@ -172,18 +172,17 @@ static uint32_t sPreviousSuspectedCount 
 static uint32_t sCompartmentGCCount = NS_MAX_COMPARTMENT_GC_COUNT;
 static uint32_t sCleanupsSinceLastGC = UINT32_MAX;
 static bool sNeedsFullCC = false;
 static nsJSContext *sContextList = nullptr;
 
 static nsScriptNameSpaceManager *gNameSpaceManager;
 static nsIMemoryReporter *gReporter;
 
-NS_MEMORY_REPORTER_MALLOC_SIZEOF_FUN(ScriptNameSpaceManagerMallocSizeOf,
-                                     "script-namespace-manager")
+NS_MEMORY_REPORTER_MALLOC_SIZEOF_FUN(ScriptNameSpaceManagerMallocSizeOf)
 
 static int64_t
 GetScriptNameSpaceManagerSize()
 {
   MOZ_ASSERT(gNameSpaceManager);
   return gNameSpaceManager->SizeOfIncludingThis(
              ScriptNameSpaceManagerMallocSizeOf);
 }
--- a/dom/base/nsWindowMemoryReporter.cpp
+++ b/dom/base/nsWindowMemoryReporter.cpp
@@ -100,17 +100,17 @@ AppendWindowURI(nsGlobalWindow *aWindow,
     aStr += spec;
   } else {
     // If we're unable to find a URI, we're dealing with a chrome window with
     // no document in it (or somesuch), so we call this a "system window".
     aStr += NS_LITERAL_CSTRING("[system]");
   }
 }
 
-NS_MEMORY_REPORTER_MALLOC_SIZEOF_FUN(DOMStyleMallocSizeOf, "windows")
+NS_MEMORY_REPORTER_MALLOC_SIZEOF_FUN(WindowsMallocSizeOf)
 
 // The key is the window ID.
 typedef nsDataHashtable<nsUint64HashKey, nsCString> WindowPaths;
 
 static nsresult
 CollectWindowReports(nsGlobalWindow *aWindow,
                      nsWindowSizes *aWindowTotalSizes,
                      nsTHashtable<nsUint64HashKey> *aGhostWindowIDs,
@@ -161,17 +161,17 @@ CollectWindowReports(nsGlobalWindow *aWi
         nsresult rv;                                                          \
         rv = aCb->Callback(EmptyCString(), path, nsIMemoryReporter::KIND_HEAP,\
                       nsIMemoryReporter::UNITS_BYTES, _amount,                \
                       NS_LITERAL_CSTRING(_desc), aClosure);                   \
         NS_ENSURE_SUCCESS(rv, rv);                                            \
     }                                                                         \
   } while (0)
 
-  nsWindowSizes windowSizes(DOMStyleMallocSizeOf);
+  nsWindowSizes windowSizes(WindowsMallocSizeOf);
   aWindow->SizeOfIncludingThis(&windowSizes);
 
   REPORT("/dom/other", windowSizes.mDOMOther,
          "Memory used by a window's DOM, excluding element, text, CDATA, "
          "and comment nodes.");
   aWindowTotalSizes->mDOMOther += windowSizes.mDOMOther;
 
   REPORT("/dom/element-nodes", windowSizes.mDOMElementNodes,
--- a/dom/workers/WorkerPrivate.cpp
+++ b/dom/workers/WorkerPrivate.cpp
@@ -75,17 +75,17 @@ using mozilla::MutexAutoLock;
 using mozilla::TimeDuration;
 using mozilla::TimeStamp;
 using mozilla::dom::workers::exceptions::ThrowDOMExceptionForNSResult;
 
 USING_WORKERS_NAMESPACE
 using namespace mozilla::dom::workers::events;
 using namespace mozilla::dom;
 
-NS_MEMORY_REPORTER_MALLOC_SIZEOF_FUN(JsWorkerMallocSizeOf, "js-worker")
+NS_MEMORY_REPORTER_MALLOC_SIZEOF_FUN(JsWorkerMallocSizeOf)
 
 namespace {
 
 const char gErrorChars[] = "error";
 const char gMessageChars[] = "message";
 
 template <class T>
 class AutoPtrComparator
--- a/extensions/spellcheck/hunspell/src/mozHunspell.cpp
+++ b/extensions/spellcheck/hunspell/src/mozHunspell.cpp
@@ -93,17 +93,17 @@ NS_INTERFACE_MAP_END
 NS_IMPL_CYCLE_COLLECTION_3(mozHunspell,
                            mPersonalDictionary,
                            mEncoder,
                            mDecoder)
 
 // Memory reporting stuff.
 static int64_t gHunspellAllocatedSize = 0;
 
-NS_MEMORY_REPORTER_MALLOC_SIZEOF_ON_ALLOC_FUN(HunspellMallocSizeOfOnAlloc, "hunspell")
+NS_MEMORY_REPORTER_MALLOC_SIZEOF_ON_ALLOC_FUN(HunspellMallocSizeOfOnAlloc)
 NS_MEMORY_REPORTER_MALLOC_SIZEOF_ON_FREE_FUN(HunspellMallocSizeOfOnFree)
 
 void HunspellReportMemoryAllocation(void* ptr) {
   gHunspellAllocatedSize += HunspellMallocSizeOfOnAlloc(ptr);
 }
 void HunspellReportMemoryDeallocation(void* ptr) {
   gHunspellAllocatedSize -= HunspellMallocSizeOfOnFree(ptr);
 }
--- a/gfx/thebes/gfxAndroidPlatform.cpp
+++ b/gfx/thebes/gfxAndroidPlatform.cpp
@@ -41,17 +41,17 @@ GetFreetypeSize()
 NS_MEMORY_REPORTER_IMPLEMENT(Freetype,
     "explicit/freetype",
     KIND_HEAP,
     UNITS_BYTES,
     GetFreetypeSize,
     "Memory used by Freetype."
 )
 
-NS_MEMORY_REPORTER_MALLOC_SIZEOF_ON_ALLOC_FUN(FreetypeMallocSizeOfOnAlloc, "freetype")
+NS_MEMORY_REPORTER_MALLOC_SIZEOF_ON_ALLOC_FUN(FreetypeMallocSizeOfOnAlloc)
 NS_MEMORY_REPORTER_MALLOC_SIZEOF_ON_FREE_FUN(FreetypeMallocSizeOfOnFree)
 
 static void*
 CountingAlloc(FT_Memory memory, long size)
 {
     void *p = malloc(size);
     sFreetypeMemoryUsed += FreetypeMallocSizeOfOnAlloc(p);
     return p;
--- a/gfx/thebes/gfxFont.cpp
+++ b/gfx/thebes/gfxFont.cpp
@@ -1124,17 +1124,17 @@ gfxFontFamily::SizeOfIncludingThis(nsMal
  * Expires unused fonts after a short interval;
  * notifies fonts to age their cached shaped-word records;
  * observes memory-pressure notification and tells fonts to clear their
  * shaped-word caches to free up memory.
  */
 
 NS_IMPL_ISUPPORTS1(gfxFontCache::MemoryReporter, nsIMemoryMultiReporter)
 
-NS_MEMORY_REPORTER_MALLOC_SIZEOF_FUN(FontCacheMallocSizeOf, "font-cache")
+NS_MEMORY_REPORTER_MALLOC_SIZEOF_FUN(FontCacheMallocSizeOf)
 
 NS_IMETHODIMP
 gfxFontCache::MemoryReporter::GetName(nsACString &aName)
 {
     aName.AssignLiteral("font-cache");
     return NS_OK;
 }
 
--- a/gfx/thebes/gfxPlatformFontList.cpp
+++ b/gfx/thebes/gfxPlatformFontList.cpp
@@ -67,17 +67,17 @@ gfxFontListPrefObserver::Observe(nsISupp
     // but it probably isn't that big a deal.
     gfxPlatformFontList::PlatformFontList()->ClearPrefFonts();
     gfxFontCache::GetCache()->AgeAllGenerations();
     return NS_OK;
 }
 
 NS_IMPL_ISUPPORTS1(gfxPlatformFontList::MemoryReporter, nsIMemoryMultiReporter)
 
-NS_MEMORY_REPORTER_MALLOC_SIZEOF_FUN(FontListMallocSizeOf, "font-list")
+NS_MEMORY_REPORTER_MALLOC_SIZEOF_FUN(FontListMallocSizeOf)
 
 NS_IMETHODIMP
 gfxPlatformFontList::MemoryReporter::GetName(nsACString &aName)
 {
     aName.AssignLiteral("font-list");
     return NS_OK;
 }
 
--- a/image/src/imgLoader.cpp
+++ b/image/src/imgLoader.cpp
@@ -59,17 +59,17 @@
 #include "nsIChannelPolicy.h"
 #include "nsILoadContext.h"
 
 #include "nsContentUtils.h"
 
 using namespace mozilla;
 using namespace mozilla::image;
 
-NS_MEMORY_REPORTER_MALLOC_SIZEOF_FUN(ImagesMallocSizeOf, "images")
+NS_MEMORY_REPORTER_MALLOC_SIZEOF_FUN(ImagesMallocSizeOf)
 
 class imgMemoryReporter MOZ_FINAL :
   public nsIMemoryMultiReporter
 {
 public:
   imgMemoryReporter()
   {
   }
--- a/js/xpconnect/src/XPCJSRuntime.cpp
+++ b/js/xpconnect/src/XPCJSRuntime.cpp
@@ -1477,17 +1477,17 @@ NS_MEMORY_REPORTER_IMPLEMENT(XPConnectJS
         nsresult rv;                                                          \
         rv = cb->Callback(EmptyCString(), _path, _kind,                       \
                           nsIMemoryReporter::UNITS_BYTES, amount,             \
                           NS_LITERAL_CSTRING(_desc), closure);                \
         NS_ENSURE_SUCCESS(rv, rv);                                            \
         rtTotal += amount;                                                    \
     } while (0)
 
-NS_MEMORY_REPORTER_MALLOC_SIZEOF_FUN(JsMallocSizeOf, "js")
+NS_MEMORY_REPORTER_MALLOC_SIZEOF_FUN(JsMallocSizeOf)
 
 namespace xpc {
 
 static nsresult
 ReportCompartmentStats(const JS::CompartmentStats &cStats,
                        const nsACString &cJSPathPrefix,
                        const nsACString &cDOMPathPrefix,
                        nsIMemoryMultiReporterCallback *cb,
@@ -1974,26 +1974,26 @@ class JSCompartmentsMultiReporter MOZ_FI
         return NS_OK;
     }
 };
 
 NS_IMPL_THREADSAFE_ISUPPORTS1(JSCompartmentsMultiReporter
                               , nsIMemoryMultiReporter
                               )
 
-NS_MEMORY_REPORTER_MALLOC_SIZEOF_FUN(OrphanSizeOf, "orphans")
+NS_MEMORY_REPORTER_MALLOC_SIZEOF_FUN(OrphanMallocSizeOf)
 
 namespace xpc {
 
 static size_t
 SizeOfTreeIncludingThis(nsINode *tree)
 {       
-    size_t n = tree->SizeOfIncludingThis(OrphanSizeOf);
+    size_t n = tree->SizeOfIncludingThis(OrphanMallocSizeOf);
     for (nsIContent* child = tree->GetFirstChild(); child; child = child->GetNextNode(tree)) {
-        n += child->SizeOfIncludingThis(OrphanSizeOf);
+        n += child->SizeOfIncludingThis(OrphanMallocSizeOf);
     }   
     return n;
 }
 
 class OrphanReporter : public JS::ObjectPrivateVisitor
 {
 public:
     OrphanReporter()
--- a/layout/base/nsStyleSheetService.cpp
+++ b/layout/base/nsStyleSheetService.cpp
@@ -16,18 +16,17 @@
 #include "nsIServiceManager.h"
 #include "nsICategoryManager.h"
 #include "nsISupportsPrimitives.h"
 #include "nsNetUtil.h"
 #include "nsIObserverService.h"
 #include "nsLayoutStatics.h"
 #include "nsIMemoryReporter.h"
 
-NS_MEMORY_REPORTER_MALLOC_SIZEOF_FUN(LayoutStyleSheetServiceMallocSizeOf,
-                                     "layout/style-sheet-service")
+NS_MEMORY_REPORTER_MALLOC_SIZEOF_FUN(LayoutStyleSheetServiceMallocSizeOf)
 
 static int64_t
 GetStyleSheetServiceSize()
 {
   return nsStyleSheetService::SizeOfIncludingThis(
            LayoutStyleSheetServiceMallocSizeOf);
 }
 
--- a/layout/style/nsLayoutStylesheetCache.cpp
+++ b/layout/style/nsLayoutStylesheetCache.cpp
@@ -11,18 +11,17 @@
 #include "nsLayoutCID.h"
 #include "nsIMemoryReporter.h"
 #include "nsNetUtil.h"
 #include "nsIObserverService.h"
 #include "nsServiceManagerUtils.h"
 #include "nsIXULRuntime.h"
 #include "nsCSSStyleSheet.h"
 
-NS_MEMORY_REPORTER_MALLOC_SIZEOF_FUN(LayoutStyleSheetCacheMallocSizeOf,
-                                     "layout/style-sheet-cache")
+NS_MEMORY_REPORTER_MALLOC_SIZEOF_FUN(LayoutStyleSheetCacheMallocSizeOf)
 
 static int64_t
 GetStylesheetCacheSize()
 {
   return nsLayoutStylesheetCache::SizeOfIncludingThis(
            LayoutStyleSheetCacheMallocSizeOf);
 }
 
--- a/modules/libpref/src/Preferences.cpp
+++ b/modules/libpref/src/Preferences.cpp
@@ -153,17 +153,17 @@ struct CacheData {
     uint32_t defaultValueUint;
   };
 };
 
 static nsTArray<nsAutoPtr<CacheData> >* gCacheData = nullptr;
 static nsRefPtrHashtable<ValueObserverHashKey,
                          ValueObserver>* gObserverTable = nullptr;
 
-NS_MEMORY_REPORTER_MALLOC_SIZEOF_FUN(PreferencesMallocSizeOf, "preferences")
+NS_MEMORY_REPORTER_MALLOC_SIZEOF_FUN(PreferencesMallocSizeOf)
 
 static size_t
 SizeOfObserverEntryExcludingThis(ValueObserverHashKey* aKey,
                                  const nsRefPtr<ValueObserver>& aData,
                                  nsMallocSizeOfFun aMallocSizeOf,
                                  void*)
 {
   size_t n = 0;
--- a/netwerk/cache/nsCacheService.cpp
+++ b/netwerk/cache/nsCacheService.cpp
@@ -1075,17 +1075,17 @@ static nsCOMPtr<nsIMemoryReporter> Memor
 
 NS_THREADSAFE_MEMORY_REPORTER_IMPLEMENT(NetworkMemoryCache,
     "explicit/network/memory-cache",
     KIND_HEAP,
     UNITS_BYTES,
     nsCacheService::MemoryDeviceSize,
     "Memory used by the network memory cache.")
 
-NS_MEMORY_REPORTER_MALLOC_SIZEOF_FUN(NetworkDiskCacheSizeOfFun, "network-disk-cache")
+NS_MEMORY_REPORTER_MALLOC_SIZEOF_FUN(NetworkDiskCacheMallocSizeOf)
 
 static nsCOMPtr<nsIMemoryReporter> DiskCacheReporter = nullptr;
 
 NS_THREADSAFE_MEMORY_REPORTER_IMPLEMENT(NetworkDiskCache,
     "explicit/network/disk-cache",
     KIND_HEAP,
     UNITS_BYTES,
     nsCacheService::DiskDeviceHeapSize,
@@ -2283,17 +2283,17 @@ nsCacheService::MemoryDeviceSize()
     return memoryDevice ? memoryDevice->TotalSize() : 0;
 }
 
 int64_t
 nsCacheService::DiskDeviceHeapSize()
 {
     nsCacheServiceAutoLock lock(LOCK_TELEM(NSCACHESERVICE_DISKDEVICEHEAPSIZE));
     nsDiskCacheDevice *diskDevice = GlobalInstance()->mDiskDevice;
-    return (int64_t)(diskDevice ? diskDevice->SizeOfIncludingThis(NetworkDiskCacheSizeOfFun) : 0);
+    return (int64_t)(diskDevice ? diskDevice->SizeOfIncludingThis(NetworkDiskCacheMallocSizeOf) : 0);
 }
 
 nsresult
 nsCacheService::DoomEntry(nsCacheEntry * entry)
 {
     return gService->DoomEntry_Internal(entry, true);
 }
 
--- a/netwerk/dns/nsEffectiveTLDService.cpp
+++ b/netwerk/dns/nsEffectiveTLDService.cpp
@@ -54,18 +54,17 @@ nsDomainEntry::FuncForStaticAsserts(void
 #undef ETLD_ENTRY_OFFSET
 #undef ETLD_STR_NUM
 #undef ETLD_STR_NUM1
 
 // ----------------------------------------------------------------------
 
 static nsEffectiveTLDService *gService = nullptr;
 
-NS_MEMORY_REPORTER_MALLOC_SIZEOF_FUN(EffectiveTLDServiceMallocSizeOf,
-                                     "effective-tld-service")
+NS_MEMORY_REPORTER_MALLOC_SIZEOF_FUN(EffectiveTLDServiceMallocSizeOf)
 
 static int64_t
 GetEffectiveTLDSize()
 {
   return gService->SizeOfIncludingThis(EffectiveTLDServiceMallocSizeOf);
 }
 
 NS_MEMORY_REPORTER_IMPLEMENT(
--- a/startupcache/StartupCache.cpp
+++ b/startupcache/StartupCache.cpp
@@ -61,17 +61,17 @@ GetStartupCacheMappingSize()
 NS_MEMORY_REPORTER_IMPLEMENT(StartupCacheMapping,
     "explicit/startup-cache/mapping",
     KIND_NONHEAP,
     nsIMemoryReporter::UNITS_BYTES,
     GetStartupCacheMappingSize,
     "Memory used to hold the mapping of the startup cache from file.  This "
     "memory is likely to be swapped out shortly after start-up.")
 
-NS_MEMORY_REPORTER_MALLOC_SIZEOF_FUN(StartupCacheDataMallocSizeOf, "startup-cache/data")
+NS_MEMORY_REPORTER_MALLOC_SIZEOF_FUN(StartupCacheDataMallocSizeOf)
 
 static int64_t
 GetStartupCacheDataSize()
 {
     mozilla::scache::StartupCache* sc = mozilla::scache::StartupCache::GetSingleton();
     return sc ? sc->HeapSizeOfIncludingThis(StartupCacheDataMallocSizeOf) : 0;
 }
 
--- a/storage/src/mozStorageService.cpp
+++ b/storage/src/mozStorageService.cpp
@@ -465,48 +465,48 @@ namespace {
 // output as unreported, so we mark them as reported when they're allocated and
 // mark them as unreported when they are freed.
 //
 // In other words, we are marking all sqlite heap blocks as reported even
 // though we're not reporting them ourselves.  Instead we're trusting that
 // sqlite is fully and correctly accounting for all of its heap blocks via its
 // own memory accounting.
 
-NS_MEMORY_REPORTER_MALLOC_SIZEOF_ON_ALLOC_FUN(sqliteMallocSizeOfOnAlloc, "sqlite")
-NS_MEMORY_REPORTER_MALLOC_SIZEOF_ON_FREE_FUN(sqliteMallocSizeOfOnFree)
+NS_MEMORY_REPORTER_MALLOC_SIZEOF_ON_ALLOC_FUN(SqliteMallocSizeOfOnAlloc)
+NS_MEMORY_REPORTER_MALLOC_SIZEOF_ON_FREE_FUN(SqliteMallocSizeOfOnFree)
 
 #endif
 
 static void *sqliteMemMalloc(int n)
 {
   void* p = ::moz_malloc(n);
 #ifdef MOZ_DMD
-  sqliteMallocSizeOfOnAlloc(p);
+  SqliteMallocSizeOfOnAlloc(p);
 #endif
   return p;
 }
 
 static void sqliteMemFree(void *p)
 {
 #ifdef MOZ_DMD
-  sqliteMallocSizeOfOnFree(p);
+  SqliteMallocSizeOfOnFree(p);
 #endif
   ::moz_free(p);
 }
 
 static void *sqliteMemRealloc(void *p, int n)
 {
 #ifdef MOZ_DMD
-  sqliteMallocSizeOfOnFree(p);
+  SqliteMallocSizeOfOnFree(p);
   void *pnew = ::moz_realloc(p, n);
   if (pnew) {
-    sqliteMallocSizeOfOnAlloc(pnew);
+    SqliteMallocSizeOfOnAlloc(pnew);
   } else {
-    // realloc failed;  undo the sqliteMallocSizeOfOnFree from above
-    sqliteMallocSizeOfOnAlloc(p);
+    // realloc failed;  undo the SqliteMallocSizeOfOnFree from above
+    SqliteMallocSizeOfOnAlloc(p);
   }
   return pnew;
 #else
   return ::moz_realloc(p, n);
 #endif
 }
 
 static int sqliteMemSize(void *p)
--- a/toolkit/components/places/History.cpp
+++ b/toolkit/components/places/History.cpp
@@ -1397,18 +1397,17 @@ StoreAndNotifyEmbedVisit(VisitData& aPla
     (void)NS_ProxyRelease(mainThread, aCallback, true);
   }
 
   VisitData noReferrer;
   nsCOMPtr<nsIRunnable> event = new NotifyVisitObservers(aPlace, noReferrer);
   (void)NS_DispatchToMainThread(event);
 }
 
-NS_MEMORY_REPORTER_MALLOC_SIZEOF_FUN(HistoryLinksHashtableMallocSizeOf,
-                                     "history-links-hashtable")
+NS_MEMORY_REPORTER_MALLOC_SIZEOF_FUN(HistoryLinksHashtableMallocSizeOf)
 
 int64_t GetHistoryObserversSize()
 {
   History* history = History::GetService();
   return history ?
          history->SizeOfIncludingThis(HistoryLinksHashtableMallocSizeOf) : 0;
 }
 
--- a/toolkit/components/telemetry/Telemetry.cpp
+++ b/toolkit/components/telemetry/Telemetry.cpp
@@ -324,17 +324,17 @@ private:
   bool mCachedTelemetryData;
   uint32_t mLastShutdownTime;
   std::vector<nsCOMPtr<nsIFetchTelemetryDataCallback> > mCallbacks;
   friend class nsFetchTelemetryData;
 };
 
 TelemetryImpl*  TelemetryImpl::sTelemetry = NULL;
 
-NS_MEMORY_REPORTER_MALLOC_SIZEOF_FUN(TelemetryMallocSizeOf, "telemetry")
+NS_MEMORY_REPORTER_MALLOC_SIZEOF_FUN(TelemetryMallocSizeOf)
 
 size_t
 TelemetryImpl::SizeOfIncludingThis(nsMallocSizeOfFun aMallocSizeOf)
 {
   size_t n = 0;
   n += aMallocSizeOf(this);
   // Ignore the hashtables in mAddonMap; they are not significant.
   n += mAddonMap.SizeOfExcludingThis(impl<AddonEntryType>::SizeOfEntryExcludingThis,
--- a/toolkit/components/url-classifier/nsUrlClassifierPrefixSet.cpp
+++ b/toolkit/components/url-classifier/nsUrlClassifierPrefixSet.cpp
@@ -44,18 +44,17 @@ public:
 
 private:
   nsCString mPath;
   nsUrlClassifierPrefixSet* mParent;
 };
 
 NS_IMPL_THREADSAFE_ISUPPORTS1(nsPrefixSetReporter, nsIMemoryReporter)
 
-NS_MEMORY_REPORTER_MALLOC_SIZEOF_FUN(StoragePrefixSetMallocSizeOf,
-                                     "storage/prefixset")
+NS_MEMORY_REPORTER_MALLOC_SIZEOF_FUN(StoragePrefixSetMallocSizeOf)
 
 nsPrefixSetReporter::nsPrefixSetReporter(nsUrlClassifierPrefixSet* aParent,
                                          const nsACString& aName)
 : mParent(aParent)
 {
   mPath.Assign(NS_LITERAL_CSTRING("explicit/storage/prefixset"));
   if (!aName.IsEmpty()) {
     mPath.Append("/");
--- a/xpcom/base/nsCycleCollector.cpp
+++ b/xpcom/base/nsCycleCollector.cpp
@@ -3021,18 +3021,17 @@ nsCycleCollector::WasFreed(nsISupports *
 }
 #endif
 
 
 ////////////////////////
 // Memory reporter
 ////////////////////////
 
-NS_MEMORY_REPORTER_MALLOC_SIZEOF_FUN(CycleCollectorMallocSizeOf,
-                                     "cycle-collector")
+NS_MEMORY_REPORTER_MALLOC_SIZEOF_FUN(CycleCollectorMallocSizeOf)
 
 void
 nsCycleCollector::SizeOfIncludingThis(nsMallocSizeOfFun aMallocSizeOf,
                                       size_t *aObjectSize,
                                       size_t *aGraphNodesSize,
                                       size_t *aGraphEdgesSize,
                                       size_t *aWhiteNodeSize,
                                       size_t *aPurpleBufferSize) const
--- a/xpcom/base/nsIMemoryReporter.idl
+++ b/xpcom/base/nsIMemoryReporter.idl
@@ -371,56 +371,54 @@ void RunReporters();
 #if defined(MOZ_DMD)
 
 #if !defined(MOZ_MEMORY)
 #error "MOZ_DMD requires MOZ_MEMORY"
 #endif
 
 #include "DMD.h"
 
-#define MOZ_REPORT(ptr, usable, name)          mozilla::dmd::Report(ptr)
-#define MOZ_REPORT_ON_ALLOC(ptr, usable, name) mozilla::dmd::ReportOnAlloc(ptr)
+#define MOZ_REPORT(ptr)          mozilla::dmd::Report(ptr)
+#define MOZ_REPORT_ON_ALLOC(ptr) mozilla::dmd::ReportOnAlloc(ptr)
 
 #else
 
-#define MOZ_REPORT(ptr, usable, name)
-#define MOZ_REPORT_ON_ALLOC(ptr, usable, name)
+#define MOZ_REPORT(ptr)
+#define MOZ_REPORT_ON_ALLOC(ptr)
 
 #endif  // defined(MOZ_DMD)
 
 // Functions generated via this macro should be used by all traversal-based
 // memory reporters.  Such functions return |moz_malloc_size_of(ptr)|;  this
 // will always be zero on some obscure platforms.
 //
-// You might be wondering why we have a macro that creates multiple
-// functions distinguished only by |name|, instead of a single
+// You might be wondering why we have a macro that creates multiple functions
+// that differ only in their name, instead of a single
 // MemoryReporterMallocSizeOf function.  It's mostly to help with DMD
-// integration, though it sometimes also helps with debugging and temporary
-// ad hoc profiling.  The |name| chosen doesn't matter greatly, but it's
+// integration, though it sometimes also helps with debugging and temporary ad
+// hoc profiling.  The function name chosen doesn't matter greatly, but it's
 // best to make it similar to the path used by the relevant memory
 // reporter(s).
-#define NS_MEMORY_REPORTER_MALLOC_SIZEOF_FUN(fn, name)                        \
+#define NS_MEMORY_REPORTER_MALLOC_SIZEOF_FUN(fn)                              \
   static size_t fn(const void *ptr)                                           \
   {                                                                           \
-      size_t usable = moz_malloc_size_of(ptr);                                \
-      MOZ_REPORT(ptr, usable, name);                                          \
-      return usable;                                                          \
+      MOZ_REPORT(ptr);                                                        \
+      return moz_malloc_size_of(ptr);                                         \
   }
 
 // Functions generated by the next two macros should be used by wrapping
 // allocators that report heap blocks as soon as they are allocated and
 // unreport them as soon as they are freed.  Such allocators are used in cases
 // where we have third-party code that we cannot modify.  The two functions
 // must always be used in tandem.
-#define NS_MEMORY_REPORTER_MALLOC_SIZEOF_ON_ALLOC_FUN(fn, name)               \
+#define NS_MEMORY_REPORTER_MALLOC_SIZEOF_ON_ALLOC_FUN(fn)                     \
   static size_t fn(const void *ptr)                                           \
   {                                                                           \
-      size_t usable = moz_malloc_size_of(ptr);                                \
-      MOZ_REPORT_ON_ALLOC(ptr, usable, name);                                 \
-      return usable;                                                          \
+      MOZ_REPORT_ON_ALLOC(ptr);                                               \
+      return moz_malloc_size_of(ptr);                                         \
   }
 #define NS_MEMORY_REPORTER_MALLOC_SIZEOF_ON_FREE_FUN(fn)                      \
   static size_t fn(const void *ptr)                                           \
   {                                                                           \
       return moz_malloc_size_of(ptr);                                         \
   }
 
 %}
--- a/xpcom/base/nsMemoryReporterManager.cpp
+++ b/xpcom/base/nsMemoryReporterManager.cpp
@@ -538,17 +538,17 @@ NS_FALLIBLE_MEMORY_REPORTER_IMPLEMENT(Ex
     KIND_OTHER,
     UNITS_BYTES,
     GetExplicit,
     "This is the same measurement as the root of the 'explicit' tree.  "
     "However, it is measured at a different time and so gives slightly "
     "different results.")
 #endif  // HAVE_JEMALLOC_STATS
 
-NS_MEMORY_REPORTER_MALLOC_SIZEOF_FUN(AtomTableMallocSizeOf, "atom-table")
+NS_MEMORY_REPORTER_MALLOC_SIZEOF_FUN(AtomTableMallocSizeOf)
 
 static int64_t GetAtomTableSize() {
   return NS_SizeOfAtomTablesIncludingThis(AtomTableMallocSizeOf);
 }
 
 // Why is this here?  At first glance, you'd think it could be defined and
 // registered with nsMemoryReporterManager entirely within nsAtomTable.cpp.
 // However, the obvious time to register it is when the table is initialized,
--- a/xpcom/components/nsCategoryManager.cpp
+++ b/xpcom/components/nsCategoryManager.cpp
@@ -396,18 +396,17 @@ CategoryEnumerator::enumfunc_createenume
 
 
 //
 // nsCategoryManager implementations
 //
 
 NS_IMPL_QUERY_INTERFACE1(nsCategoryManager, nsICategoryManager)
 
-NS_MEMORY_REPORTER_MALLOC_SIZEOF_FUN(CategoryManagerMallocSizeOf,
-                                     "category-manager")
+NS_MEMORY_REPORTER_MALLOC_SIZEOF_FUN(CategoryManagerMallocSizeOf)
 
 NS_MEMORY_REPORTER_IMPLEMENT(CategoryManager,
     "explicit/xpcom/category-manager",
     KIND_HEAP,
     nsIMemoryReporter::UNITS_BYTES,
     nsCategoryManager::GetCategoryManagerSize,
     "Memory used for the XPCOM category manager.")
 
--- a/xpcom/components/nsComponentManager.cpp
+++ b/xpcom/components/nsComponentManager.cpp
@@ -227,18 +227,17 @@ CloneAndAppend(nsIFile* aBase, const nsA
     f->AppendNative(append);
     return f.forget();
 }
 
 ////////////////////////////////////////////////////////////////////////////////
 // nsComponentManagerImpl
 ////////////////////////////////////////////////////////////////////////////////
 
-NS_MEMORY_REPORTER_MALLOC_SIZEOF_FUN(ComponentManagerMallocSizeOf,
-                                     "component-manager")
+NS_MEMORY_REPORTER_MALLOC_SIZEOF_FUN(ComponentManagerMallocSizeOf)
 
 static int64_t
 GetComponentManagerSize()
 {
   MOZ_ASSERT(nsComponentManagerImpl::gComponentManager);
   return nsComponentManagerImpl::gComponentManager->SizeOfIncludingThis(
            ComponentManagerMallocSizeOf);
 }
--- a/xpcom/reflect/xptinfo/src/xptiInterfaceInfoManager.cpp
+++ b/xpcom/reflect/xptinfo/src/xptiInterfaceInfoManager.cpp
@@ -21,17 +21,17 @@ NS_IMPL_THREADSAFE_ISUPPORTS2(xptiInterf
                               nsIInterfaceInfoSuperManager)
 
 static xptiInterfaceInfoManager* gInterfaceInfoManager = nullptr;
 #ifdef DEBUG
 static int gCallCount = 0;
 #endif
 
 
-NS_MEMORY_REPORTER_MALLOC_SIZEOF_FUN(XPTMallocSizeOf, "xpti-working-set")
+NS_MEMORY_REPORTER_MALLOC_SIZEOF_FUN(XPTMallocSizeOf)
 
 size_t
 xptiInterfaceInfoManager::SizeOfIncludingThis(nsMallocSizeOfFun aMallocSizeOf)
 {
     size_t n = aMallocSizeOf(this);
     ReentrantMonitorAutoEnter monitor(mWorkingSet.mTableReentrantMonitor);
     // The entries themselves are allocated out of an arena accounted
     // for elsewhere, so don't measure them