Bug 1319746: Add a memory reporter for CFGGraph on BaselineScript, r=njn

This commit is contained in:
Hannes Verschore 2017-04-21 19:37:06 +02:00
Родитель 31296801c2
Коммит e8f7043d0b
5 изменённых файлов: 11 добавлений и 0 удалений

Просмотреть файл

@ -650,6 +650,7 @@ struct ZoneStats
macro(Other, MallocHeap, regExpSharedsMallocHeap) \
macro(Other, MallocHeap, typePool) \
macro(Other, MallocHeap, baselineStubsOptimized) \
macro(Other, MallocHeap, cachedCFG) \
macro(Other, MallocHeap, uniqueIdMap) \
macro(Other, MallocHeap, shapeTables)

Просмотреть файл

@ -179,6 +179,7 @@ struct Zone : public JS::shadow::Zone,
void addSizeOfIncludingThis(mozilla::MallocSizeOf mallocSizeOf,
size_t* typePool,
size_t* baselineStubsOptimized,
size_t* cachedCFG,
size_t* uniqueIdMap,
size_t* shapeTables,
size_t* atomsMarkBitmaps);

Просмотреть файл

@ -322,6 +322,7 @@ StatsZoneCallback(JSRuntime* rt, void* data, Zone* zone)
zone->addSizeOfIncludingThis(rtStats->mallocSizeOf_,
&zStats.typePool,
&zStats.baselineStubsOptimized,
&zStats.cachedCFG,
&zStats.uniqueIdMap,
&zStats.shapeTables,
&rtStats->runtime.atomsMarkBitmaps);

Просмотреть файл

@ -4464,14 +4464,18 @@ void
Zone::addSizeOfIncludingThis(mozilla::MallocSizeOf mallocSizeOf,
size_t* typePool,
size_t* baselineStubsOptimized,
size_t* cachedCFG,
size_t* uniqueIdMap,
size_t* shapeTables,
size_t* atomsMarkBitmaps)
{
*typePool += types.typeLifoAlloc().sizeOfExcludingThis(mallocSizeOf);
if (jitZone()) {
// These functions return pointers to struct that are embedded within
// JitZone, which is why we use sizeOfExcludingThis().
*baselineStubsOptimized +=
jitZone()->optimizedStubSpace()->sizeOfExcludingThis(mallocSizeOf);
*cachedCFG += jitZone()->cfgSpace()->sizeOfExcludingThis(mallocSizeOf);
}
*uniqueIdMap += uniqueIds().sizeOfExcludingThis(mallocSizeOf);
*shapeTables += baseShapes().sizeOfExcludingThis(mallocSizeOf)

Просмотреть файл

@ -1537,6 +1537,10 @@ ReportZoneStats(const JS::ZoneStats& zStats,
zStats.baselineStubsOptimized,
"The Baseline JIT's optimized IC stubs (excluding code).");
ZCREPORT_BYTES(pathPrefix + NS_LITERAL_CSTRING("jit-cached-cfg"),
zStats.cachedCFG,
"The cached CFG to construct Ion code out of it.");
size_t stringsNotableAboutMemoryGCHeap = 0;
size_t stringsNotableAboutMemoryMallocHeap = 0;