Bug 864205 - Put the baseline memory reports in a tree. r=jandem.

--HG--
extra : rebase_source : 96362bd538979832f1fbe6ec55e42fd9a71c22bd
This commit is contained in:
Nicholas Nethercote 2013-04-22 13:35:44 -07:00
parent 95796cdc83
commit e585d5de07
5 changed files with 26 additions and 24 deletions

View File

@ -243,8 +243,8 @@ struct CompartmentStats
scriptData(0), scriptData(0),
jaegerData(0), jaegerData(0),
baselineData(0), baselineData(0),
baselineFallbackStubs(0), baselineStubsFallback(0),
baselineOptimizedStubs(0), baselineStubsOptimized(0),
ionData(0), ionData(0),
compartmentObject(0), compartmentObject(0),
crossCompartmentWrappersTable(0), crossCompartmentWrappersTable(0),
@ -273,8 +273,8 @@ struct CompartmentStats
scriptData(other.scriptData), scriptData(other.scriptData),
jaegerData(other.jaegerData), jaegerData(other.jaegerData),
baselineData(other.baselineData), baselineData(other.baselineData),
baselineFallbackStubs(other.baselineFallbackStubs), baselineStubsFallback(other.baselineStubsFallback),
baselineOptimizedStubs(other.baselineOptimizedStubs), baselineStubsOptimized(other.baselineStubsOptimized),
ionData(other.ionData), ionData(other.ionData),
compartmentObject(other.compartmentObject), compartmentObject(other.compartmentObject),
crossCompartmentWrappersTable(other.crossCompartmentWrappersTable), crossCompartmentWrappersTable(other.crossCompartmentWrappersTable),
@ -308,8 +308,8 @@ struct CompartmentStats
size_t scriptData; size_t scriptData;
size_t jaegerData; size_t jaegerData;
size_t baselineData; size_t baselineData;
size_t baselineFallbackStubs; size_t baselineStubsFallback;
size_t baselineOptimizedStubs; size_t baselineStubsOptimized;
size_t ionData; size_t ionData;
size_t compartmentObject; size_t compartmentObject;
size_t crossCompartmentWrappersTable; size_t crossCompartmentWrappersTable;
@ -341,8 +341,8 @@ struct CompartmentStats
ADD(scriptData); ADD(scriptData);
ADD(jaegerData); ADD(jaegerData);
ADD(baselineData); ADD(baselineData);
ADD(baselineFallbackStubs); ADD(baselineStubsFallback);
ADD(baselineOptimizedStubs); ADD(baselineStubsOptimized);
ADD(ionData); ADD(ionData);
ADD(compartmentObject); ADD(compartmentObject);
ADD(crossCompartmentWrappersTable); ADD(crossCompartmentWrappersTable);

View File

@ -822,7 +822,7 @@ void
JSCompartment::sizeOfIncludingThis(JSMallocSizeOfFun mallocSizeOf, size_t *compartmentObject, JSCompartment::sizeOfIncludingThis(JSMallocSizeOfFun mallocSizeOf, size_t *compartmentObject,
JS::TypeInferenceSizes *tiSizes, size_t *shapesCompartmentTables, JS::TypeInferenceSizes *tiSizes, size_t *shapesCompartmentTables,
size_t *crossCompartmentWrappersArg, size_t *regexpCompartment, size_t *crossCompartmentWrappersArg, size_t *regexpCompartment,
size_t *debuggeesSet, size_t *baselineOptimizedStubs) size_t *debuggeesSet, size_t *baselineStubsOptimized)
{ {
*compartmentObject = mallocSizeOf(this); *compartmentObject = mallocSizeOf(this);
sizeOfTypeInferenceData(tiSizes, mallocSizeOf); sizeOfTypeInferenceData(tiSizes, mallocSizeOf);
@ -834,11 +834,11 @@ JSCompartment::sizeOfIncludingThis(JSMallocSizeOfFun mallocSizeOf, size_t *compa
*regexpCompartment = regExps.sizeOfExcludingThis(mallocSizeOf); *regexpCompartment = regExps.sizeOfExcludingThis(mallocSizeOf);
*debuggeesSet = debuggees.sizeOfExcludingThis(mallocSizeOf); *debuggeesSet = debuggees.sizeOfExcludingThis(mallocSizeOf);
#ifdef JS_ION #ifdef JS_ION
*baselineOptimizedStubs = ionCompartment() *baselineStubsOptimized = ionCompartment()
? ionCompartment()->optimizedStubSpace()->sizeOfExcludingThis(mallocSizeOf) ? ionCompartment()->optimizedStubSpace()->sizeOfExcludingThis(mallocSizeOf)
: 0; : 0;
#else #else
*baselineOptimizedStubs = 0; *baselineStubsOptimized = 0;
#endif #endif
} }

View File

@ -198,7 +198,7 @@ struct JSCompartment
JS::TypeInferenceSizes *tiSizes, JS::TypeInferenceSizes *tiSizes,
size_t *shapesCompartmentTables, size_t *crossCompartmentWrappers, size_t *shapesCompartmentTables, size_t *crossCompartmentWrappers,
size_t *regexpCompartment, size_t *debuggeesSet, size_t *regexpCompartment, size_t *debuggeesSet,
size_t *baselineOptimizedStubs); size_t *baselineStubsOptimized);
/* /*
* Shared scope property tree, and arena-pool for allocating its nodes. * Shared scope property tree, and arena-pool for allocating its nodes.

View File

@ -120,7 +120,7 @@ StatsCompartmentCallback(JSRuntime *rt, void *data, JSCompartment *compartment)
&cStats.crossCompartmentWrappersTable, &cStats.crossCompartmentWrappersTable,
&cStats.regexpCompartment, &cStats.regexpCompartment,
&cStats.debuggeesSet, &cStats.debuggeesSet,
&cStats.baselineOptimizedStubs); &cStats.baselineStubsOptimized);
} }
static void static void
@ -257,11 +257,11 @@ StatsCellCallback(JSRuntime *rt, void *data, void *thing, JSGCTraceKind traceKin
#ifdef JS_METHODJIT #ifdef JS_METHODJIT
cStats->jaegerData += script->sizeOfJitScripts(rtStats->mallocSizeOf_); cStats->jaegerData += script->sizeOfJitScripts(rtStats->mallocSizeOf_);
# ifdef JS_ION # ifdef JS_ION
size_t baselineData = 0, baselineFallbackStubs = 0; size_t baselineData = 0, baselineStubsFallback = 0;
ion::SizeOfBaselineData(script, rtStats->mallocSizeOf_, &baselineData, ion::SizeOfBaselineData(script, rtStats->mallocSizeOf_, &baselineData,
&baselineFallbackStubs); &baselineStubsFallback);
cStats->baselineData += baselineData; cStats->baselineData += baselineData;
cStats->baselineFallbackStubs += baselineFallbackStubs; cStats->baselineStubsFallback += baselineStubsFallback;
cStats->ionData += ion::SizeOfIonData(script, rtStats->mallocSizeOf_); cStats->ionData += ion::SizeOfIonData(script, rtStats->mallocSizeOf_);
# endif # endif
#endif #endif

View File

@ -1640,7 +1640,7 @@ ReportZoneStats(const JS::ZoneStats &zStats,
zStats.gcHeapIonCodes, zStats.gcHeapIonCodes,
"Memory on the garbage-collected JavaScript " "Memory on the garbage-collected JavaScript "
"heap that holds references to executable code pools " "heap that holds references to executable code pools "
"used by IonMonkey."); "used by the IonMonkey JIT.");
ZCREPORT_BYTES(pathPrefix + NS_LITERAL_CSTRING("type-objects"), ZCREPORT_BYTES(pathPrefix + NS_LITERAL_CSTRING("type-objects"),
zStats.typeObjects, zStats.typeObjects,
@ -1859,18 +1859,20 @@ ReportCompartmentStats(const JS::CompartmentStats &cStats,
"Memory used by the JaegerMonkey JIT for compilation data: " "Memory used by the JaegerMonkey JIT for compilation data: "
"JITScripts, native maps, and inline cache structs."); "JITScripts, native maps, and inline cache structs.");
ZCREPORT_BYTES(cJSPathPrefix + NS_LITERAL_CSTRING("baseline-data"), ZCREPORT_BYTES(cJSPathPrefix + NS_LITERAL_CSTRING("baseline/data"),
cStats.baselineData, cStats.baselineData,
"Memory used by the Baseline JIT for compilation data: " "Memory used by the Baseline JIT for compilation data: "
"BaselineScripts."); "BaselineScripts.");
ZCREPORT_BYTES(cJSPathPrefix + NS_LITERAL_CSTRING("baseline-fallback-stubs"), ZCREPORT_BYTES(cJSPathPrefix + NS_LITERAL_CSTRING("baseline/stubs/fallback"),
cStats.baselineFallbackStubs, cStats.baselineStubsFallback,
"Memory used by Baseline fallback IC stubs (excluding code)."); "Memory used by the Baseline JIT for fallback IC stubs "
"(excluding code).");
ZCREPORT_BYTES(cJSPathPrefix + NS_LITERAL_CSTRING("baseline-optimized-stubs"), ZCREPORT_BYTES(cJSPathPrefix + NS_LITERAL_CSTRING("baseline/stubs/optimized"),
cStats.baselineOptimizedStubs, cStats.baselineStubsOptimized,
"Memory used by Baseline optimized IC stubs (excluding code)."); "Memory used by the Baseline JIT for optimized IC stubs "
"(excluding code).");
ZCREPORT_BYTES(cJSPathPrefix + NS_LITERAL_CSTRING("ion-data"), ZCREPORT_BYTES(cJSPathPrefix + NS_LITERAL_CSTRING("ion-data"),
cStats.ionData, cStats.ionData,