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),
jaegerData(0),
baselineData(0),
baselineFallbackStubs(0),
baselineOptimizedStubs(0),
baselineStubsFallback(0),
baselineStubsOptimized(0),
ionData(0),
compartmentObject(0),
crossCompartmentWrappersTable(0),
@ -273,8 +273,8 @@ struct CompartmentStats
scriptData(other.scriptData),
jaegerData(other.jaegerData),
baselineData(other.baselineData),
baselineFallbackStubs(other.baselineFallbackStubs),
baselineOptimizedStubs(other.baselineOptimizedStubs),
baselineStubsFallback(other.baselineStubsFallback),
baselineStubsOptimized(other.baselineStubsOptimized),
ionData(other.ionData),
compartmentObject(other.compartmentObject),
crossCompartmentWrappersTable(other.crossCompartmentWrappersTable),
@ -308,8 +308,8 @@ struct CompartmentStats
size_t scriptData;
size_t jaegerData;
size_t baselineData;
size_t baselineFallbackStubs;
size_t baselineOptimizedStubs;
size_t baselineStubsFallback;
size_t baselineStubsOptimized;
size_t ionData;
size_t compartmentObject;
size_t crossCompartmentWrappersTable;
@ -341,8 +341,8 @@ struct CompartmentStats
ADD(scriptData);
ADD(jaegerData);
ADD(baselineData);
ADD(baselineFallbackStubs);
ADD(baselineOptimizedStubs);
ADD(baselineStubsFallback);
ADD(baselineStubsOptimized);
ADD(ionData);
ADD(compartmentObject);
ADD(crossCompartmentWrappersTable);

View File

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

View File

@ -198,7 +198,7 @@ struct JSCompartment
JS::TypeInferenceSizes *tiSizes,
size_t *shapesCompartmentTables, size_t *crossCompartmentWrappers,
size_t *regexpCompartment, size_t *debuggeesSet,
size_t *baselineOptimizedStubs);
size_t *baselineStubsOptimized);
/*
* 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.regexpCompartment,
&cStats.debuggeesSet,
&cStats.baselineOptimizedStubs);
&cStats.baselineStubsOptimized);
}
static void
@ -257,11 +257,11 @@ StatsCellCallback(JSRuntime *rt, void *data, void *thing, JSGCTraceKind traceKin
#ifdef JS_METHODJIT
cStats->jaegerData += script->sizeOfJitScripts(rtStats->mallocSizeOf_);
# ifdef JS_ION
size_t baselineData = 0, baselineFallbackStubs = 0;
size_t baselineData = 0, baselineStubsFallback = 0;
ion::SizeOfBaselineData(script, rtStats->mallocSizeOf_, &baselineData,
&baselineFallbackStubs);
&baselineStubsFallback);
cStats->baselineData += baselineData;
cStats->baselineFallbackStubs += baselineFallbackStubs;
cStats->baselineStubsFallback += baselineStubsFallback;
cStats->ionData += ion::SizeOfIonData(script, rtStats->mallocSizeOf_);
# endif
#endif

View File

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