зеркало из https://github.com/mozilla/gecko-dev.git
Bug 945152 - Part 2: Report mapped array buffer statistics for about:memory. r=njn
This commit is contained in:
Родитель
ce6586e24c
Коммит
50520fcec3
|
@ -123,6 +123,7 @@ struct ObjectsExtraSizes
|
|||
macro(Objects, NotLiveGCThing, mallocHeapElementsNonAsmJS) \
|
||||
macro(Objects, NotLiveGCThing, mallocHeapElementsAsmJS) \
|
||||
macro(Objects, NotLiveGCThing, nonHeapElementsAsmJS) \
|
||||
macro(Objects, NotLiveGCThing, nonHeapElementsMapped) \
|
||||
macro(Objects, NotLiveGCThing, nonHeapCodeAsmJS) \
|
||||
macro(Objects, NotLiveGCThing, mallocHeapAsmJSModuleData) \
|
||||
macro(Objects, NotLiveGCThing, mallocHeapArgumentsData) \
|
||||
|
|
|
@ -5908,6 +5908,8 @@ JSObject::addSizeOfExcludingThis(mozilla::MallocSizeOf mallocSizeOf, JS::Objects
|
|||
#else
|
||||
sizes->mallocHeapElementsAsmJS += mallocSizeOf(elements);
|
||||
#endif
|
||||
} else if (MOZ_UNLIKELY(elements->isMappedArrayBuffer())) {
|
||||
sizes->nonHeapElementsMapped += as<ArrayBufferObject>().byteLength();
|
||||
} else {
|
||||
sizes->mallocHeapElementsNonAsmJS += mallocSizeOf(elements);
|
||||
}
|
||||
|
|
|
@ -2139,6 +2139,12 @@ ReportCompartmentStats(const JS::CompartmentStats &cStats,
|
|||
"the GC heap.");
|
||||
}
|
||||
|
||||
if (cStats.objectsExtra.nonHeapElementsMapped > 0) {
|
||||
REPORT_BYTES(cJSPathPrefix + NS_LITERAL_CSTRING("objects/non-heap/elements/mapped"),
|
||||
KIND_NONHEAP, cStats.objectsExtra.nonHeapElementsMapped,
|
||||
"Memory-mapped array buffer elements.");
|
||||
}
|
||||
|
||||
REPORT_BYTES(cJSPathPrefix + NS_LITERAL_CSTRING("objects/non-heap/code/asm.js"),
|
||||
KIND_NONHEAP, cStats.objectsExtra.nonHeapCodeAsmJS,
|
||||
"AOT-compiled asm.js code.");
|
||||
|
|
Загрузка…
Ссылка в новой задаче