зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1196848 - Add Zone::uniqueIds to about:memory reports; r=njn
--HG-- extra : rebase_source : 0b7173fc4d344f55b5b8c41e010ea65c7048091e
This commit is contained in:
Родитель
5e9eddeee5
Коммит
899ec10be3
|
@ -586,7 +586,8 @@ struct ZoneStats
|
|||
macro(Other, GCHeapUsed, objectGroupsGCHeap) \
|
||||
macro(Other, MallocHeap, objectGroupsMallocHeap) \
|
||||
macro(Other, MallocHeap, typePool) \
|
||||
macro(Other, MallocHeap, baselineStubsOptimized)
|
||||
macro(Other, MallocHeap, baselineStubsOptimized) \
|
||||
macro(Other, MallocHeap, uniqueIdMap)
|
||||
|
||||
ZoneStats()
|
||||
: FOR_EACH_SIZE(ZERO_SIZE)
|
||||
|
|
|
@ -119,6 +119,11 @@ class UniqueIdMap
|
|||
void remove(Cell* cell) {
|
||||
map.remove(Pair(cell, 0));
|
||||
}
|
||||
|
||||
size_t sizeOfExcludingThis(mozilla::MallocSizeOf mallocSizeOf) const {
|
||||
// All data allocated by |map| is contained in |alloc|.
|
||||
return alloc.sizeOfExcludingThis(mallocSizeOf);
|
||||
}
|
||||
};
|
||||
|
||||
extern uint64_t NextCellUniqueId(JSRuntime* rt);
|
||||
|
@ -183,7 +188,8 @@ struct Zone : public JS::shadow::Zone,
|
|||
|
||||
void addSizeOfIncludingThis(mozilla::MallocSizeOf mallocSizeOf,
|
||||
size_t* typePool,
|
||||
size_t* baselineStubsOptimized);
|
||||
size_t* baselineStubsOptimized,
|
||||
size_t* uniqueIdMap);
|
||||
|
||||
void resetGCMallocBytes();
|
||||
void setGCMaxMallocBytes(size_t value);
|
||||
|
|
|
@ -311,7 +311,8 @@ StatsZoneCallback(JSRuntime* rt, void* data, Zone* zone)
|
|||
|
||||
zone->addSizeOfIncludingThis(rtStats->mallocSizeOf_,
|
||||
&zStats.typePool,
|
||||
&zStats.baselineStubsOptimized);
|
||||
&zStats.baselineStubsOptimized,
|
||||
&zStats.uniqueIdMap);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -4276,13 +4276,15 @@ TypeScript::destroy()
|
|||
void
|
||||
Zone::addSizeOfIncludingThis(mozilla::MallocSizeOf mallocSizeOf,
|
||||
size_t* typePool,
|
||||
size_t* baselineStubsOptimized)
|
||||
size_t* baselineStubsOptimized,
|
||||
size_t* uniqueIdMap)
|
||||
{
|
||||
*typePool += types.typeLifoAlloc.sizeOfExcludingThis(mallocSizeOf);
|
||||
if (jitZone()) {
|
||||
*baselineStubsOptimized +=
|
||||
jitZone()->optimizedStubSpace()->sizeOfExcludingThis(mallocSizeOf);
|
||||
}
|
||||
*uniqueIdMap += uniqueIds_.sizeOfExcludingThis(mallocSizeOf);
|
||||
}
|
||||
|
||||
TypeZone::TypeZone(Zone* zone)
|
||||
|
|
|
@ -1883,6 +1883,10 @@ ReportZoneStats(const JS::ZoneStats& zStats,
|
|||
zStats.unusedGCThings.totalSize(),
|
||||
"Unused GC thing cells within non-empty arenas.");
|
||||
|
||||
ZCREPORT_BYTES(pathPrefix + NS_LITERAL_CSTRING("unique-id-map"),
|
||||
zStats.uniqueIdMap,
|
||||
"Address-independent cell identities.");
|
||||
|
||||
ZCREPORT_GC_BYTES(pathPrefix + NS_LITERAL_CSTRING("lazy-scripts/gc-heap"),
|
||||
zStats.lazyScriptsGCHeap,
|
||||
"Scripts that haven't executed yet.");
|
||||
|
|
Загрузка…
Ссылка в новой задаче