mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 955942 (part 1) - Remove unnecessary nsIMemoryReporter qualifiers from UNITS_* and KIND_* constants. r=mccr8.
--HG-- extra : rebase_source : f760568c08af03d9fec316bf95e7d4388078a03d
This commit is contained in:
parent
45623ec7cf
commit
9505172caf
@ -688,9 +688,7 @@ public:
|
|||||||
nsPrintfCString(
|
nsPrintfCString(
|
||||||
"explicit/dom/memory-file-data/large/file(length=%llu, sha1=%s)",
|
"explicit/dom/memory-file-data/large/file(length=%llu, sha1=%s)",
|
||||||
owner->mLength, digestString.get()),
|
owner->mLength, digestString.get()),
|
||||||
nsIMemoryReporter::KIND_HEAP,
|
KIND_HEAP, UNITS_BYTES, size,
|
||||||
nsIMemoryReporter::UNITS_BYTES,
|
|
||||||
size,
|
|
||||||
nsPrintfCString(
|
nsPrintfCString(
|
||||||
"Memory used to back a memory file of length %llu bytes. The file "
|
"Memory used to back a memory file of length %llu bytes. The file "
|
||||||
"has a sha1 of %s.\n\n"
|
"has a sha1 of %s.\n\n"
|
||||||
@ -707,9 +705,7 @@ public:
|
|||||||
nsresult rv = aCallback->Callback(
|
nsresult rv = aCallback->Callback(
|
||||||
/* process */ NS_LITERAL_CSTRING(""),
|
/* process */ NS_LITERAL_CSTRING(""),
|
||||||
NS_LITERAL_CSTRING("explicit/dom/memory-file-data/small"),
|
NS_LITERAL_CSTRING("explicit/dom/memory-file-data/small"),
|
||||||
nsIMemoryReporter::KIND_HEAP,
|
KIND_HEAP, UNITS_BYTES, smallObjectsTotal,
|
||||||
nsIMemoryReporter::UNITS_BYTES,
|
|
||||||
smallObjectsTotal,
|
|
||||||
nsPrintfCString(
|
nsPrintfCString(
|
||||||
"Memory used to back small memory files (less than %d bytes each).\n\n"
|
"Memory used to back small memory files (less than %d bytes each).\n\n"
|
||||||
"Note that the allocator may round up a memory file's length -- "
|
"Note that the allocator may round up a memory file's length -- "
|
||||||
|
@ -500,8 +500,7 @@ nsWindowMemoryReporter::CollectReports(nsIMemoryReporterCallback* aCb,
|
|||||||
do { \
|
do { \
|
||||||
nsresult rv; \
|
nsresult rv; \
|
||||||
rv = aCb->Callback(EmptyCString(), NS_LITERAL_CSTRING(_path), \
|
rv = aCb->Callback(EmptyCString(), NS_LITERAL_CSTRING(_path), \
|
||||||
nsIMemoryReporter::KIND_OTHER, \
|
KIND_OTHER, UNITS_BYTES, _amount, \
|
||||||
nsIMemoryReporter::UNITS_BYTES, _amount, \
|
|
||||||
NS_LITERAL_CSTRING(_desc), aClosure); \
|
NS_LITERAL_CSTRING(_desc), aClosure); \
|
||||||
NS_ENSURE_SUCCESS(rv, rv); \
|
NS_ENSURE_SUCCESS(rv, rv); \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
@ -246,8 +246,8 @@ ContentParentsMemoryReporter::CollectReports(nsIMemoryReporterCallback* cb,
|
|||||||
|
|
||||||
nsresult rv = cb->Callback(/* process */ EmptyCString(),
|
nsresult rv = cb->Callback(/* process */ EmptyCString(),
|
||||||
path,
|
path,
|
||||||
nsIMemoryReporter::KIND_OTHER,
|
KIND_OTHER,
|
||||||
nsIMemoryReporter::UNITS_COUNT,
|
UNITS_COUNT,
|
||||||
numQueuedMessages,
|
numQueuedMessages,
|
||||||
desc,
|
desc,
|
||||||
aClosure);
|
aClosure);
|
||||||
|
@ -1376,15 +1376,13 @@ gfxFontCache::MemoryReporter::CollectReports
|
|||||||
|
|
||||||
aCb->Callback(EmptyCString(),
|
aCb->Callback(EmptyCString(),
|
||||||
NS_LITERAL_CSTRING("explicit/gfx/font-cache"),
|
NS_LITERAL_CSTRING("explicit/gfx/font-cache"),
|
||||||
nsIMemoryReporter::KIND_HEAP, nsIMemoryReporter::UNITS_BYTES,
|
KIND_HEAP, UNITS_BYTES, sizes.mFontInstances,
|
||||||
sizes.mFontInstances,
|
|
||||||
NS_LITERAL_CSTRING("Memory used for active font instances."),
|
NS_LITERAL_CSTRING("Memory used for active font instances."),
|
||||||
aClosure);
|
aClosure);
|
||||||
|
|
||||||
aCb->Callback(EmptyCString(),
|
aCb->Callback(EmptyCString(),
|
||||||
NS_LITERAL_CSTRING("explicit/gfx/font-shaped-words"),
|
NS_LITERAL_CSTRING("explicit/gfx/font-shaped-words"),
|
||||||
nsIMemoryReporter::KIND_HEAP, nsIMemoryReporter::UNITS_BYTES,
|
KIND_HEAP, UNITS_BYTES, sizes.mShapedWords,
|
||||||
sizes.mShapedWords,
|
|
||||||
NS_LITERAL_CSTRING("Memory used to cache shaped glyph data."),
|
NS_LITERAL_CSTRING("Memory used to cache shaped glyph data."),
|
||||||
aClosure);
|
aClosure);
|
||||||
|
|
||||||
|
@ -318,8 +318,7 @@ public:
|
|||||||
do { \
|
do { \
|
||||||
nsresult rv; \
|
nsresult rv; \
|
||||||
rv = aCb->Callback(EmptyCString(), NS_LITERAL_CSTRING(_path), \
|
rv = aCb->Callback(EmptyCString(), NS_LITERAL_CSTRING(_path), \
|
||||||
nsIMemoryReporter::KIND_OTHER, \
|
KIND_OTHER, UNITS_BYTES, _amount, \
|
||||||
nsIMemoryReporter::UNITS_BYTES, _amount, \
|
|
||||||
NS_LITERAL_CSTRING(_desc), aClosure); \
|
NS_LITERAL_CSTRING(_desc), aClosure); \
|
||||||
NS_ENSURE_SUCCESS(rv, rv); \
|
NS_ENSURE_SUCCESS(rv, rv); \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
@ -70,57 +70,57 @@ public:
|
|||||||
do { \
|
do { \
|
||||||
nsresult rv; \
|
nsresult rv; \
|
||||||
rv = callback->Callback(EmptyCString(), NS_LITERAL_CSTRING(_path), \
|
rv = callback->Callback(EmptyCString(), NS_LITERAL_CSTRING(_path), \
|
||||||
_kind, nsIMemoryReporter::UNITS_BYTES, _amount, \
|
_kind, UNITS_BYTES, _amount, \
|
||||||
NS_LITERAL_CSTRING(_desc), closure); \
|
NS_LITERAL_CSTRING(_desc), closure); \
|
||||||
NS_ENSURE_SUCCESS(rv, rv); \
|
NS_ENSURE_SUCCESS(rv, rv); \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
REPORT("explicit/images/chrome/used/raw",
|
REPORT("explicit/images/chrome/used/raw",
|
||||||
nsIMemoryReporter::KIND_HEAP, chrome.mUsedRaw,
|
KIND_HEAP, chrome.mUsedRaw,
|
||||||
"Memory used by in-use chrome images (compressed data).");
|
"Memory used by in-use chrome images (compressed data).");
|
||||||
|
|
||||||
REPORT("explicit/images/chrome/used/uncompressed-heap",
|
REPORT("explicit/images/chrome/used/uncompressed-heap",
|
||||||
nsIMemoryReporter::KIND_HEAP, chrome.mUsedUncompressedHeap,
|
KIND_HEAP, chrome.mUsedUncompressedHeap,
|
||||||
"Memory used by in-use chrome images (uncompressed data).");
|
"Memory used by in-use chrome images (uncompressed data).");
|
||||||
|
|
||||||
REPORT("explicit/images/chrome/used/uncompressed-nonheap",
|
REPORT("explicit/images/chrome/used/uncompressed-nonheap",
|
||||||
nsIMemoryReporter::KIND_NONHEAP, chrome.mUsedUncompressedNonheap,
|
KIND_NONHEAP, chrome.mUsedUncompressedNonheap,
|
||||||
"Memory used by in-use chrome images (uncompressed data).");
|
"Memory used by in-use chrome images (uncompressed data).");
|
||||||
|
|
||||||
REPORT("explicit/images/chrome/unused/raw",
|
REPORT("explicit/images/chrome/unused/raw",
|
||||||
nsIMemoryReporter::KIND_HEAP, chrome.mUnusedRaw,
|
KIND_HEAP, chrome.mUnusedRaw,
|
||||||
"Memory used by not in-use chrome images (compressed data).");
|
"Memory used by not in-use chrome images (compressed data).");
|
||||||
|
|
||||||
REPORT("explicit/images/chrome/unused/uncompressed-heap",
|
REPORT("explicit/images/chrome/unused/uncompressed-heap",
|
||||||
nsIMemoryReporter::KIND_HEAP, chrome.mUnusedUncompressedHeap,
|
KIND_HEAP, chrome.mUnusedUncompressedHeap,
|
||||||
"Memory used by not in-use chrome images (uncompressed data).");
|
"Memory used by not in-use chrome images (uncompressed data).");
|
||||||
|
|
||||||
REPORT("explicit/images/chrome/unused/uncompressed-nonheap",
|
REPORT("explicit/images/chrome/unused/uncompressed-nonheap",
|
||||||
nsIMemoryReporter::KIND_NONHEAP, chrome.mUnusedUncompressedNonheap,
|
KIND_NONHEAP, chrome.mUnusedUncompressedNonheap,
|
||||||
"Memory used by not in-use chrome images (uncompressed data).");
|
"Memory used by not in-use chrome images (uncompressed data).");
|
||||||
|
|
||||||
REPORT("explicit/images/content/used/raw",
|
REPORT("explicit/images/content/used/raw",
|
||||||
nsIMemoryReporter::KIND_HEAP, content.mUsedRaw,
|
KIND_HEAP, content.mUsedRaw,
|
||||||
"Memory used by in-use content images (compressed data).");
|
"Memory used by in-use content images (compressed data).");
|
||||||
|
|
||||||
REPORT("explicit/images/content/used/uncompressed-heap",
|
REPORT("explicit/images/content/used/uncompressed-heap",
|
||||||
nsIMemoryReporter::KIND_HEAP, content.mUsedUncompressedHeap,
|
KIND_HEAP, content.mUsedUncompressedHeap,
|
||||||
"Memory used by in-use content images (uncompressed data).");
|
"Memory used by in-use content images (uncompressed data).");
|
||||||
|
|
||||||
REPORT("explicit/images/content/used/uncompressed-nonheap",
|
REPORT("explicit/images/content/used/uncompressed-nonheap",
|
||||||
nsIMemoryReporter::KIND_NONHEAP, content.mUsedUncompressedNonheap,
|
KIND_NONHEAP, content.mUsedUncompressedNonheap,
|
||||||
"Memory used by in-use content images (uncompressed data).");
|
"Memory used by in-use content images (uncompressed data).");
|
||||||
|
|
||||||
REPORT("explicit/images/content/unused/raw",
|
REPORT("explicit/images/content/unused/raw",
|
||||||
nsIMemoryReporter::KIND_HEAP, content.mUnusedRaw,
|
KIND_HEAP, content.mUnusedRaw,
|
||||||
"Memory used by not in-use content images (compressed data).");
|
"Memory used by not in-use content images (compressed data).");
|
||||||
|
|
||||||
REPORT("explicit/images/content/unused/uncompressed-heap",
|
REPORT("explicit/images/content/unused/uncompressed-heap",
|
||||||
nsIMemoryReporter::KIND_HEAP, content.mUnusedUncompressedHeap,
|
KIND_HEAP, content.mUnusedUncompressedHeap,
|
||||||
"Memory used by not in-use content images (uncompressed data).");
|
"Memory used by not in-use content images (uncompressed data).");
|
||||||
|
|
||||||
REPORT("explicit/images/content/unused/uncompressed-nonheap",
|
REPORT("explicit/images/content/unused/uncompressed-nonheap",
|
||||||
nsIMemoryReporter::KIND_NONHEAP, content.mUnusedUncompressedNonheap,
|
KIND_NONHEAP, content.mUnusedUncompressedNonheap,
|
||||||
"Memory used by not in-use content images (uncompressed data).");
|
"Memory used by not in-use content images (uncompressed data).");
|
||||||
|
|
||||||
#undef REPORT
|
#undef REPORT
|
||||||
|
@ -301,7 +301,7 @@ PreferenceServiceReporter::CollectReports(nsIMemoryReporterCallback* aCb,
|
|||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
REPORT(NS_LITERAL_CSTRING("explicit/preferences"),
|
REPORT(NS_LITERAL_CSTRING("explicit/preferences"),
|
||||||
nsIMemoryReporter::KIND_HEAP, nsIMemoryReporter::UNITS_BYTES,
|
KIND_HEAP, UNITS_BYTES,
|
||||||
Preferences::SizeOfIncludingThisAndOtherStuff(PreferenceServiceMallocSizeOf),
|
Preferences::SizeOfIncludingThisAndOtherStuff(PreferenceServiceMallocSizeOf),
|
||||||
"Memory used by the preferences system.");
|
"Memory used by the preferences system.");
|
||||||
|
|
||||||
@ -323,26 +323,22 @@ PreferenceServiceReporter::CollectReports(nsIMemoryReporterCallback* aCb,
|
|||||||
"referent(pref=%s)", suspect.get());
|
"referent(pref=%s)", suspect.get());
|
||||||
|
|
||||||
REPORT(suspectPath,
|
REPORT(suspectPath,
|
||||||
nsIMemoryReporter::KIND_OTHER, nsIMemoryReporter::UNITS_COUNT,
|
KIND_OTHER, UNITS_COUNT, totalReferentCount,
|
||||||
totalReferentCount,
|
|
||||||
"A preference with a suspiciously large number "
|
"A preference with a suspiciously large number "
|
||||||
"referents (symptom of a leak).");
|
"referents (symptom of a leak).");
|
||||||
}
|
}
|
||||||
|
|
||||||
REPORT(NS_LITERAL_CSTRING("preference-service/referent/strong"),
|
REPORT(NS_LITERAL_CSTRING("preference-service/referent/strong"),
|
||||||
nsIMemoryReporter::KIND_OTHER, nsIMemoryReporter::UNITS_COUNT,
|
KIND_OTHER, UNITS_COUNT, referentCount.numStrong,
|
||||||
referentCount.numStrong,
|
|
||||||
"The number of strong referents held by the preference service.");
|
"The number of strong referents held by the preference service.");
|
||||||
|
|
||||||
REPORT(NS_LITERAL_CSTRING("preference-service/referent/weak/alive"),
|
REPORT(NS_LITERAL_CSTRING("preference-service/referent/weak/alive"),
|
||||||
nsIMemoryReporter::KIND_OTHER, nsIMemoryReporter::UNITS_COUNT,
|
KIND_OTHER, UNITS_COUNT, referentCount.numWeakAlive,
|
||||||
referentCount.numWeakAlive,
|
|
||||||
"The number of weak referents held by the preference service "
|
"The number of weak referents held by the preference service "
|
||||||
"that are still alive.");
|
"that are still alive.");
|
||||||
|
|
||||||
REPORT(NS_LITERAL_CSTRING("preference-service/referent/weak/dead"),
|
REPORT(NS_LITERAL_CSTRING("preference-service/referent/weak/dead"),
|
||||||
nsIMemoryReporter::KIND_OTHER, nsIMemoryReporter::UNITS_COUNT,
|
KIND_OTHER, UNITS_COUNT, referentCount.numWeakDead,
|
||||||
referentCount.numWeakDead,
|
|
||||||
"The number of weak referents held by the preference service "
|
"The number of weak referents held by the preference service "
|
||||||
"that are dead.");
|
"that are dead.");
|
||||||
|
|
||||||
|
@ -813,8 +813,7 @@ public:
|
|||||||
do { \
|
do { \
|
||||||
nsresult rv; \
|
nsresult rv; \
|
||||||
rv = aHandleReport->Callback(EmptyCString(), NS_LITERAL_CSTRING(_path), \
|
rv = aHandleReport->Callback(EmptyCString(), NS_LITERAL_CSTRING(_path), \
|
||||||
nsIMemoryReporter::KIND_HEAP, \
|
KIND_HEAP, UNITS_BYTES, _amount, \
|
||||||
nsIMemoryReporter::UNITS_BYTES, _amount, \
|
|
||||||
NS_LITERAL_CSTRING(_desc), aData); \
|
NS_LITERAL_CSTRING(_desc), aData); \
|
||||||
if (NS_WARN_IF(NS_FAILED(rv))) \
|
if (NS_WARN_IF(NS_FAILED(rv))) \
|
||||||
return rv; \
|
return rv; \
|
||||||
|
Loading…
Reference in New Issue
Block a user