mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1196848 - Add Zone::uniqueIds to about:memory reports; r=njn
This commit is contained in:
parent
24bdc50b8b
commit
32ab4ea833
@ -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.");
|
||||
|
Loading…
Reference in New Issue
Block a user