Bug 961883 (part 3) - Measure and report the Nursery. r=terrence.

--HG--
extra : rebase_source : 6f12d47ca8cedc96b0dd0477ca4f71de08e47181
This commit is contained in:
Nicholas Nethercote 2014-01-21 17:17:08 -08:00
parent 26d6f457c4
commit b772cdc96b
4 changed files with 8 additions and 0 deletions

View File

@ -214,6 +214,7 @@ struct GCSizes
{
#define FOR_EACH_SIZE(macro) \
macro(_, _, marker) \
macro(_, _, nursery) \
macro(_, _, storeBufferVals) \
macro(_, _, storeBufferCells) \
macro(_, _, storeBufferSlots) \

View File

@ -123,6 +123,8 @@ class Nursery
/* Forward a slots/elements pointer stored in an Ion frame. */
void forwardBufferPointer(HeapSlot **pSlotsElems);
size_t sizeOfHeap() { return start() ? NurserySize : 0; }
#ifdef JS_GC_ZEAL
/*
* In debug and zeal builds, these bytes indicate the state of an unused

View File

@ -624,6 +624,7 @@ JSRuntime::addSizeOfIncludingThis(mozilla::MallocSizeOf mallocSizeOf, JS::Runtim
rtSizes->gc.marker += gcMarker.sizeOfExcludingThis(mallocSizeOf);
#ifdef JSGC_GENERATIONAL
rtSizes->gc.nursery += gcNursery.sizeOfHeap();
gcStoreBuffer.addSizeOfExcludingThis(mallocSizeOf, &rtSizes->gc);
#endif
}

View File

@ -2308,6 +2308,10 @@ ReportJSRuntimeExplicitTreeStats(const JS::RuntimeStats &rtStats,
KIND_HEAP, rtStats.runtime.gc.marker,
"Memory used for the GC mark stack and gray roots.");
RREPORT_BYTES(rtPath + NS_LITERAL_CSTRING("runtime/gc/nursery"),
KIND_NONHEAP, rtStats.runtime.gc.nursery,
"Memory used for the GC nursery.");
RREPORT_BYTES(rtPath + NS_LITERAL_CSTRING("runtime/gc/store-buffer/vals"),
KIND_HEAP, rtStats.runtime.gc.storeBufferVals,
"Memory used for values in the store buffer.");