mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 989035 - Track malloced slots attached to the nursery. r=njn
This commit is contained in:
parent
92169b6784
commit
2fa50d786c
@ -183,6 +183,7 @@ struct GCSizes
|
||||
macro(_, _, marker) \
|
||||
macro(_, _, nurseryCommitted) \
|
||||
macro(_, _, nurseryDecommitted) \
|
||||
macro(_, _, nurseryHugeSlots) \
|
||||
macro(_, _, storeBufferVals) \
|
||||
macro(_, _, storeBufferCells) \
|
||||
macro(_, _, storeBufferSlots) \
|
||||
|
@ -125,8 +125,19 @@ class Nursery
|
||||
/* Forward a slots/elements pointer stored in an Ion frame. */
|
||||
void forwardBufferPointer(HeapSlot **pSlotsElems);
|
||||
|
||||
size_t sizeOfHeapCommitted() { return numActiveChunks_ * gc::ChunkSize; }
|
||||
size_t sizeOfHeapDecommitted() { return (NumNurseryChunks - numActiveChunks_) * gc::ChunkSize; }
|
||||
size_t sizeOfHeapCommitted() const {
|
||||
return numActiveChunks_ * gc::ChunkSize;
|
||||
}
|
||||
size_t sizeOfHeapDecommitted() const {
|
||||
return (NumNurseryChunks - numActiveChunks_) * gc::ChunkSize;
|
||||
}
|
||||
size_t sizeOfHugeSlots(mozilla::MallocSizeOf mallocSizeOf) const {
|
||||
size_t total = 0;
|
||||
for (HugeSlotsSet::Range r = hugeSlots.all(); !r.empty(); r.popFront())
|
||||
total += mallocSizeOf(r.front());
|
||||
total += hugeSlots.sizeOfExcludingThis(mallocSizeOf);
|
||||
return total;
|
||||
}
|
||||
|
||||
private:
|
||||
/*
|
||||
|
@ -629,6 +629,7 @@ JSRuntime::addSizeOfIncludingThis(mozilla::MallocSizeOf mallocSizeOf, JS::Runtim
|
||||
#ifdef JSGC_GENERATIONAL
|
||||
rtSizes->gc.nurseryCommitted += gcNursery.sizeOfHeapCommitted();
|
||||
rtSizes->gc.nurseryDecommitted += gcNursery.sizeOfHeapDecommitted();
|
||||
rtSizes->gc.nurseryHugeSlots += gcNursery.sizeOfHugeSlots(mallocSizeOf);
|
||||
gcStoreBuffer.addSizeOfExcludingThis(mallocSizeOf, &rtSizes->gc);
|
||||
#endif
|
||||
}
|
||||
|
@ -2355,6 +2355,11 @@ ReportJSRuntimeExplicitTreeStats(const JS::RuntimeStats &rtStats,
|
||||
KIND_NONHEAP, rtStats.runtime.gc.nurseryCommitted,
|
||||
"Memory being used by the GC's nursery.");
|
||||
|
||||
RREPORT_BYTES(rtPath + NS_LITERAL_CSTRING("runtime/gc/nursery-huge-slots"),
|
||||
KIND_NONHEAP, rtStats.runtime.gc.nurseryHugeSlots,
|
||||
"Out-of-line slots and elements belonging to objects in the "
|
||||
"nursery.");
|
||||
|
||||
RREPORT_BYTES(rtPath + NS_LITERAL_CSTRING("runtime/gc/store-buffer/vals"),
|
||||
KIND_HEAP, rtStats.runtime.gc.storeBufferVals,
|
||||
"Values in the store buffer.");
|
||||
|
Loading…
Reference in New Issue
Block a user