Closed
Bug 1279035
Opened 8 years ago
Closed 8 months ago
Memory spike running the "DOM Modification" dromaeo test
Categories
(Core :: DOM: Core & HTML, defect, P3)
Tracking
()
RESOLVED
INCOMPLETE
Tracking | Status | |
---|---|---|
e10s | - | --- |
People
(Reporter: linuxhippy, Unassigned)
References
()
Details
(Keywords: memory-footprint, Whiteboard: [MemShrink:P3])
Attachments
(5 files)
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:47.0) Gecko/20100101 Firefox/47.0 Build ID: 20160604131506 Steps to reproduce: When running the "DOM Modification" test of the dromaeo benchmark suite, firefox' memory consuption spikes between 3-4GB on my system. E10s was enabled in this test. Chrome stayed well below < 512MB, taking into account all processes.
Reporter | ||
Updated•8 years ago
|
Reporter | ||
Comment 1•8 years ago
|
||
Reporter | ||
Comment 2•8 years ago
|
||
tracking-e10s:
--- → ?
Updated•8 years ago
|
Comment 3•8 years ago
|
||
I can confirm this on Firefox 47 (Ubuntu 15.04 x64). When running the "DOM Modification" test the memory consumption increases reaching 3.7-4 GB.
Status: UNCONFIRMED → NEW
Component: Untriaged → DOM
Ever confirmed: true
OS: Unspecified → Linux
Hardware: Unspecified → x86_64
Updated•8 years ago
|
Whiteboard: [MemShrink]
Comment 5•8 years ago
|
||
Flags: needinfo?(erahm)
Comment 6•8 years ago
|
||
Comment 7•8 years ago
|
||
Comment 8•8 years ago
|
||
At least 66% of the cumulative heap allocations during testing was text related, here's the top 3 entries:
> Cumulative {
> 224,502 blocks in heap block record 1 of 8,284
> 919,560,192 bytes (466,425,354 requested / 453,134,838 slop)
> Individual block sizes: 4,096 x 224,502
> 34.93% of the heap (34.93% cumulative)
> Allocated at {
> #01: replace_malloc (/home/erahm/dev/mozilla-central/memory/replace/dmd/DMD.cpp:1287)
> #02: nsStringBuffer::Alloc(unsigned long) (/home/erahm/dev/mozilla-central/xpcom/string/nsSubstring.cpp:218)
> #03: already_AddRefed<nsStringBuffer>::take() (/home/erahm/dev/mozilla-central/obj-x86_64-pc-linux-gnu-clang-release/dist/include/mozilla/AlreadyAddRefed.h:116)
> #04: bool AssignJSString<mozilla::dom::binding_detail::FakeString>(JSContext*, mozilla::dom::binding_detail::FakeString&, JSString*) (/home/erahm/dev/mozilla-central/dom/base/nsJSUtils.h:144)
> #05: mozilla::dom::DocumentBinding::createTextNode(JSContext*, JS::Handle<JSObject*>, nsIDocument*, JSJitMethodCallArgs const&) (/home/erahm/dev/mozilla-central/obj-x86_64-pc-linux-gnu-clang-release/dom/bindings/DocumentBinding.cpp:787)
> #06: ??? (???:???)
> }
> }
>
> Cumulative {
> 224,017 blocks in heap block record 2 of 8,284
> 458,786,816 bytes (231,588,782 requested / 227,198,034 slop)
> Individual block sizes: 2,048 x 224,017
> 17.43% of the heap (52.36% cumulative)
> Allocated at {
> #01: replace_malloc (/home/erahm/dev/mozilla-central/memory/replace/dmd/DMD.cpp:1287)
> #02: nsTextFragment::SetTo(char16_t const*, int, bool) (/home/erahm/dev/mozilla-central/dom/base/nsTextFragment.cpp:281)
> #03: nsGenericDOMDataNode::SetTextInternal(unsigned int, unsigned int, char16_t const*, unsigned int, bool, CharacterDataChangeInfo::Details*) (/home/erahm/dev/mozilla-central/dom/base/nsGenericDOMDataNode.cpp:333 (discriminator 3))
> #04: nsGenericDOMDataNode::SetText(char16_t const*, unsigned int, bool) (/home/erahm/dev/mozilla-central/dom/base/nsGenericDOMDataNode.cpp:994)
> #05: already_AddRefed (/home/erahm/dev/mozilla-central/obj-x86_64-pc-linux-gnu-clang-release/dist/include/mozilla/AlreadyAddRefed.h:67)
> #06: already_AddRefed<mozilla::dom::Text> already_AddRefed<nsTextNode>::downcast<mozilla::dom::Text>() (/home/erahm/dev/mozilla-central/obj-x86_64-pc-linux-gnu-clang-release/dist/include/mozilla/AlreadyAddRefed.h:138)
> #07: ??? (???:???)
> }
> }
>
> Cumulative {
> 179,215 blocks in heap block record 3 of 8,284
> 367,032,320 bytes (367,032,320 requested / 0 slop)
> Individual block sizes: 2,048 x 179,215
> 13.94% of the heap (66.31% cumulative)
> Allocated at {
> #01: replace_malloc (/home/erahm/dev/mozilla-central/memory/replace/dmd/DMD.cpp:1287)
> #02: unsigned char* js::MallocProvider<JS::Zone>::maybe_pod_malloc<unsigned char>(unsigned long) (/home/erahm/dev/mozilla-central/js/src/vm/MallocProvider.h:58)
> #03: JSFlatString* JSRope::flattenInternal<(JSRope::UsingBarrier)1>(js::ExclusiveContext*) (/home/erahm/dev/mozilla-central/js/src/vm/String.cpp:564)
> #04: js::StringToLinearStringSlow(JSContext*, JSString*) (/home/erahm/dev/mozilla-central/js/src/jsfriendapi.cpp:642)
> #05: js::StringToLinearString(JSContext*, JSString*) (/home/erahm/dev/mozilla-central/obj-x86_64-pc-linux-gnu-clang-release/dist/include/jsfriendapi.h:893)
> #06: mozilla::dom::DocumentBinding::createTextNode(JSContext*, JS::Handle<JSObject*>, nsIDocument*, JSJitMethodCallArgs const&) (/home/erahm/dev/mozilla-central/obj-x86_64-pc-linux-gnu-clang-release/dom/bindings/DocumentBinding.cpp:787)
> #07: ??? (???:???)
> }
> }
Comment 9•8 years ago
|
||
A fair amount of cycle collector churn as well, at least 6.33% (166,846,464 bytes):
> Cumulative {
> 6,631 blocks in heap block record 5 of 8,284
> 54,321,152 bytes (54,268,104 requested / 53,048 slop)
> Individual block sizes: 8,192 x 6,631
> 2.06% of the heap (XXX% cumulative)
> Allocated at {
> #01: replace_malloc (/home/erahm/dev/mozilla-central/memory/replace/dmd/DMD.cpp:1287)
> #02: moz_xmalloc (/home/erahm/dev/mozilla-central/memory/mozalloc/mozalloc.cpp:84)
> #03: bool mozilla::SegmentedVector<SnowWhiteKiller::SnowWhiteObject, 8192ul, InfallibleAllocPolicy>::Append<SnowWhiteKiller::SnowWhiteObject&>(SnowWhiteKiller::SnowWhiteObject&) (/home/erahm/dev/mozilla-central/obj-x86_64-pc-linux-gnu-clang-release/dist/include/mozilla/SegmentedVector.h:167)
> #04: void mozilla::SegmentedVector<SnowWhiteKiller::SnowWhiteObject, 8192ul, InfallibleAllocPolicy>::InfallibleAppend<SnowWhiteKiller::SnowWhiteObject&>(SnowWhiteKiller::SnowWhiteObject&) (/home/erahm/dev/mozilla-central/obj-x86_64-pc-linux-gnu-clang-release/dist/include/mozilla/SegmentedVector.h:183)
> #05: nsPurpleBuffer::Remove(nsPurpleBufferEntry*) (/home/erahm/dev/mozilla-central/xpcom/base/nsCycleCollector.cpp:1159)
> #06: void nsPurpleBuffer::PurpleBlock::VisitEntries<SnowWhiteKiller>(nsPurpleBuffer&, SnowWhiteKiller&) (/home/erahm/dev/mozilla-central/xpcom/base/nsCycleCollector.cpp:1019)
> #07: AsyncFreeSnowWhite::Run() (/home/erahm/dev/mozilla-central/js/xpconnect/src/XPCJSRuntime.cpp:155)
> #08: nsThread::ProcessNextEvent(bool, bool*) (/home/erahm/dev/mozilla-central/xpcom/threads/nsThread.cpp:1029)
> #09: NS_ProcessNextEvent(nsIThread*, bool) (/home/erahm/dev/mozilla-central/xpcom/glue/nsThreadUtils.cpp:290)
> #10: mozilla::ipc::MessagePump::Run(base::MessagePump::Delegate*) (/home/erahm/dev/mozilla-central/ipc/glue/MessagePump.cpp:100)
> #11: ~AutoRunState (/home/erahm/dev/mozilla-central/ipc/chromium/src/base/message_loop.cc:493)
> #12: nsBaseAppShell::Run() (/home/erahm/dev/mozilla-central/widget/nsBaseAppShell.cpp:158)
> #13: XRE_RunAppShell (/home/erahm/dev/mozilla-central/toolkit/xre/nsEmbedFunctions.cpp:827)
> #14: ~AutoRunState (/home/erahm/dev/mozilla-central/ipc/chromium/src/base/message_loop.cc:493)
> #15: XRE_InitChildProcess (/home/erahm/dev/mozilla-central/toolkit/xre/nsEmbedFunctions.cpp:661)
> #16: content_process_main(int, char**) (/home/erahm/dev/mozilla-central/ipc/app/../contentproc/plugin-container.cpp:224)
> #17: __libc_start_main (/build/eglibc-oGUzwX/eglibc-2.19/csu/libc-start.c:321)
> #18: _start (/home/erahm/dev/mozilla-central/obj-x86_64-pc-linux-gnu-clang-release/dist/bin/plugin-container)
> #19: ??? (???:???)
> }
> }
>
> Cumulative {
> 120 blocks in heap block record 6 of 8,284
> 46,940,160 bytes (46,940,160 requested / 0 slop)
> Individual block sizes: 4,194,304 x 4; 2,097,152 x 5; 1,048,576 x 5; 524,288 x 11; 262,144 x 15; 131,072 x 19; 65,536 x 19; 32,768 x 19; 16,384 x 23
> 1.78% of the heap (XXX% cumulative)
> Allocated at {
> #01: replace_realloc (/home/erahm/dev/mozilla-central/memory/replace/dmd/DMD.cpp:1335)
> #02: moz_xrealloc (/home/erahm/dev/mozilla-central/memory/mozalloc/mozalloc.cpp:106)
> #03: nsTArrayInfallibleAllocator::Realloc(void*, unsigned long) (/home/erahm/dev/mozilla-central/obj-x86_64-pc-linux-gnu-clang-release/dist/include/nsTArray.h:181)
> #04: nsTArray_base<nsTArrayInfallibleAllocator, nsTArray_CopyWithMemutils>::Hdr() const (/home/erahm/dev/mozilla-central/obj-x86_64-pc-linux-gnu-clang-release/dist/include/nsTArray.h:488)
> #05: RemoveSkippableVisitor::Visit(nsPurpleBuffer&, nsPurpleBufferEntry*) (/home/erahm/dev/mozilla-central/xpcom/base/nsCycleCollector.cpp:2815)
> #06: void nsPurpleBuffer::PurpleBlock::VisitEntries<RemoveSkippableVisitor>(nsPurpleBuffer&, RemoveSkippableVisitor&) (/home/erahm/dev/mozilla-central/xpcom/base/nsCycleCollector.cpp:1019)
> #07: mozilla::Maybe<mozilla::AutoGlobalTimelineMarker>::isSome() const (/home/erahm/dev/mozilla-central/obj-x86_64-pc-linux-gnu-clang-release/dist/include/mozilla/Maybe.h:155)
> #08: ~SamplerStackFrameRAII (/home/erahm/dev/mozilla-central/obj-x86_64-pc-linux-gnu-clang-release/dist/include/GeckoProfilerImpl.h:425)
> #09: FireForgetSkippable(unsigned int, bool) (/home/erahm/dev/mozilla-central/dom/base/nsJSEnvironment.cpp:1260)
> #10: CCTimerFired(nsITimer*, void*) (/home/erahm/dev/mozilla-central/dom/base/nsJSEnvironment.cpp:1817)
> #11: nsTimerImpl::Fire() (/home/erahm/dev/mozilla-central/xpcom/threads/nsTimerImpl.cpp:540)
> #12: nsTimerEvent::Run() (/home/erahm/dev/mozilla-central/xpcom/threads/TimerThread.cpp:290)
> #13: nsThread::ProcessNextEvent(bool, bool*) (/home/erahm/dev/mozilla-central/xpcom/threads/nsThread.cpp:1029)
> #14: NS_ProcessNextEvent(nsIThread*, bool) (/home/erahm/dev/mozilla-central/xpcom/glue/nsThreadUtils.cpp:290)
> #15: mozilla::ipc::MessagePump::Run(base::MessagePump::Delegate*) (/home/erahm/dev/mozilla-central/ipc/glue/MessagePump.cpp:100)
> #16: ~AutoRunState (/home/erahm/dev/mozilla-central/ipc/chromium/src/base/message_loop.cc:493)
> #17: nsBaseAppShell::Run() (/home/erahm/dev/mozilla-central/widget/nsBaseAppShell.cpp:158)
> #18: XRE_RunAppShell (/home/erahm/dev/mozilla-central/toolkit/xre/nsEmbedFunctions.cpp:827)
> #19: ~AutoRunState (/home/erahm/dev/mozilla-central/ipc/chromium/src/base/message_loop.cc:493)
> #20: XRE_InitChildProcess (/home/erahm/dev/mozilla-central/toolkit/xre/nsEmbedFunctions.cpp:661)
> #21: content_process_main(int, char**) (/home/erahm/dev/mozilla-central/ipc/app/../contentproc/plugin-container.cpp:224)
> #22: __libc_start_main (/build/eglibc-oGUzwX/eglibc-2.19/csu/libc-start.c:321)
> #23: _start (/home/erahm/dev/mozilla-central/obj-x86_64-pc-linux-gnu-clang-release/dist/bin/plugin-container)
> #24: ??? (???:???)
> }
> }
>
> Cumulative {
> 4,650 blocks in heap block record 7 of 8,284
> 38,092,800 bytes (38,055,600 requested / 37,200 slop)
> Individual block sizes: 8,192 x 4,650
> 1.45% of the heap (XXX% cumulative)
> Allocated at {
> #01: replace_malloc (/home/erahm/dev/mozilla-central/memory/replace/dmd/DMD.cpp:1287)
> #02: moz_xmalloc (/home/erahm/dev/mozilla-central/memory/mozalloc/mozalloc.cpp:84)
> #03: bool mozilla::SegmentedVector<SnowWhiteKiller::SnowWhiteObject, 8192ul, InfallibleAllocPolicy>::Append<SnowWhiteKiller::SnowWhiteObject&>(SnowWhiteKiller::SnowWhiteObject&) (/home/erahm/dev/mozilla-central/obj-x86_64-pc-linux-gnu-clang-release/dist/include/mozilla/SegmentedVector.h:167)
> #04: void mozilla::SegmentedVector<SnowWhiteKiller::SnowWhiteObject, 8192ul, InfallibleAllocPolicy>::InfallibleAppend<SnowWhiteKiller::SnowWhiteObject&>(SnowWhiteKiller::SnowWhiteObject&) (/home/erahm/dev/mozilla-central/obj-x86_64-pc-linux-gnu-clang-release/dist/include/mozilla/SegmentedVector.h:183)
> #05: nsPurpleBuffer::Remove(nsPurpleBufferEntry*) (/home/erahm/dev/mozilla-central/xpcom/base/nsCycleCollector.cpp:1159)
> #06: void nsPurpleBuffer::PurpleBlock::VisitEntries<SnowWhiteKiller>(nsPurpleBuffer&, SnowWhiteKiller&) (/home/erahm/dev/mozilla-central/xpcom/base/nsCycleCollector.cpp:1019)
> #07: RefPtr<nsCycleCollectorLogger>::operator bool() const (/home/erahm/dev/mozilla-central/obj-x86_64-pc-linux-gnu-clang-release/dist/include/mozilla/RefPtr.h:289)
> #08: nsCycleCollector::Collect(ccType, js::SliceBudget&, nsICycleCollectorListener*, bool) (/home/erahm/dev/mozilla-central/xpcom/base/nsCycleCollector.cpp:3668)
> #09: ~SamplerStackFrameRAII (/home/erahm/dev/mozilla-central/obj-x86_64-pc-linux-gnu-clang-release/dist/include/GeckoProfilerImpl.h:425)
> #10: nsJSContext::RunCycleCollectorSlice() (/home/erahm/dev/mozilla-central/dom/base/nsJSEnvironment.cpp:1471)
> #11: CCTimerFired(nsITimer*, void*) (/home/erahm/dev/mozilla-central/dom/base/nsJSEnvironment.cpp:1808)
> #12: nsTimerImpl::Fire() (/home/erahm/dev/mozilla-central/xpcom/threads/nsTimerImpl.cpp:540)
> #13: nsTimerEvent::Run() (/home/erahm/dev/mozilla-central/xpcom/threads/TimerThread.cpp:290)
> #14: nsThread::ProcessNextEvent(bool, bool*) (/home/erahm/dev/mozilla-central/xpcom/threads/nsThread.cpp:1029)
> #15: NS_ProcessNextEvent(nsIThread*, bool) (/home/erahm/dev/mozilla-central/xpcom/glue/nsThreadUtils.cpp:290)
> #16: mozilla::ipc::MessagePump::Run(base::MessagePump::Delegate*) (/home/erahm/dev/mozilla-central/ipc/glue/MessagePump.cpp:100)
> #17: ~AutoRunState (/home/erahm/dev/mozilla-central/ipc/chromium/src/base/message_loop.cc:493)
> #18: nsBaseAppShell::Run() (/home/erahm/dev/mozilla-central/widget/nsBaseAppShell.cpp:158)
> #19: XRE_RunAppShell (/home/erahm/dev/mozilla-central/toolkit/xre/nsEmbedFunctions.cpp:827)
> #20: ~AutoRunState (/home/erahm/dev/mozilla-central/ipc/chromium/src/base/message_loop.cc:493)
> #21: XRE_InitChildProcess (/home/erahm/dev/mozilla-central/toolkit/xre/nsEmbedFunctions.cpp:661)
> #22: content_process_main(int, char**) (/home/erahm/dev/mozilla-central/ipc/app/../contentproc/plugin-container.cpp:224)
> #23: __libc_start_main (/build/eglibc-oGUzwX/eglibc-2.19/csu/libc-start.c:321)
> #24: _start (/home/erahm/dev/mozilla-central/obj-x86_64-pc-linux-gnu-clang-release/dist/bin/plugin-container)
> }
> }
>
> Cumulative {
> 839 blocks in heap block record 11 of 8,284
> 27,492,352 bytes (27,492,352 requested / 0 slop)
> Individual block sizes: 32,768 x 839
> 1.04% of the heap (80.18% cumulative)
> Allocated at {
> #01: replace_malloc (/home/erahm/dev/mozilla-central/memory/replace/dmd/DMD.cpp:1287)
> #02: moz_xmalloc (/home/erahm/dev/mozilla-central/memory/mozalloc/mozalloc.cpp:84)
> #03: PurpleBlock (/home/erahm/dev/mozilla-central/xpcom/base/nsCycleCollector.cpp:1005)
> #04: nsCycleCollectingAutoRefCnt::decr(nsISupports*, bool*) (/home/erahm/dev/mozilla-central/obj-x86_64-pc-linux-gnu-clang-release/dist/include/nsISupportsImpl.h:256)
> #05: ~SegmentImpl (/home/erahm/dev/mozilla-central/obj-x86_64-pc-linux-gnu-clang-release/dist/include/mozilla/SegmentedVector.h:64)
> #06: mozilla::MallocAllocPolicy::free_(void*) (/home/erahm/dev/mozilla-central/obj-x86_64-pc-linux-gnu-clang-release/dist/include/mozilla/AllocPolicy.h:118)
> #07: mozilla::dom::DeferredFinalizerImpl<nsISupports>::DeferredFinalize(unsigned int, void*) (/home/erahm/dev/mozilla-central/obj-x86_64-pc-linux-gnu-clang-release/dist/include/mozilla/dom/BindingUtils.h:2916)
> #08: mozilla::IncrementalFinalizeRunnable::ReleaseNow(bool) (/home/erahm/dev/mozilla-central/xpcom/base/CycleCollectedJSRuntime.cpp:1473)
> #09: mozilla::CycleCollectedJSRuntime::OnGC(JSGCStatus) (/home/erahm/dev/mozilla-central/xpcom/base/CycleCollectedJSRuntime.cpp:1591)
> #10: ~AutoPhase (/home/erahm/dev/mozilla-central/js/src/gc/Statistics.h:427)
> #11: js::gc::GCRuntime::collect(bool, js::SliceBudget, JS::gcreason::Reason) (/home/erahm/dev/mozilla-central/js/src/jsgc.cpp:6282)
> #12: js::gc::GCRuntime::gcSlice(JS::gcreason::Reason, long) (/home/erahm/dev/mozilla-central/js/src/jsgc.cpp:6354)
> #13: InvokeInterruptCallback(JSContext*) (/home/erahm/dev/mozilla-central/js/src/vm/Runtime.cpp:581)
> #14: js::CheckForInterrupt(JSContext*) (/home/erahm/dev/mozilla-central/js/src/jscntxt.h:651)
> #15: ??? (???:???)
> }
> }
Comment 10•8 years ago
|
||
Boris, do you have any thoughts here? Is this test indicative of real world situations?
Flags: needinfo?(bzbarsky)
Comment 11•8 years ago
|
||
Does the test run various subtests synchronously within same task? or subsequent tasks? Since CC just runs later, when it gets chance. We could run CC, if needed, at the end of task. But anyhow, nothing in dromaeo is real world.
Flags: needinfo?(bzbarsky)
Updated•8 years ago
|
Priority: -- → P3
Updated•8 years ago
|
Whiteboard: [MemShrink] → [MemShrink:P3]
Assignee | ||
Updated•5 years ago
|
Component: DOM → DOM: Core & HTML
Updated•2 years ago
|
Severity: normal → S3
Comment 12•8 months ago
|
||
There are probably better places to spend our time than fixing a memory spike in this very old benchmark.
Status: NEW → RESOLVED
Closed: 8 months ago
Resolution: --- → INCOMPLETE
You need to log in
before you can comment on or make changes to this bug.
Description
•