Open
Bug 1659142
Opened 4 years ago
Updated 4 years ago
Enhance memory reporter for WebRender
Categories
(Core :: Graphics: WebRender, task, P3)
Core
Graphics: WebRender
Tracking
()
NEW
People
(Reporter: whimboo, Unassigned)
References
Details
With a DMD analysis I can see that a lot of heap-unclassified memory is used by WebRender. As attached you can find some unreported examples. Given by Andrew those all seem to relate to the same kind of object. So filing them all at once.
Unreported {
133,520 blocks in heap block record 2 of 28,986
199,430,864 bytes (159,361,675 requested / 40,069,189 slop)
Individual block sizes: 16,384; 8,192 x 440; 4,096 x 3,173; 2,048 x 49,563; 1,024 x 78,499; 512 x 1,410; 496 x 2; 480 x 261; 464 x 55; 448 x 105; 432 x 10; 320
9.32% of the heap (40.56% cumulative)
10.82% of unreported (47.11% cumulative)
Allocated at {
#01: alloc::vec::Vec$LT$T$GT$::reserve::h0412ac6c2988a35d (/Applications/FirefoxNightly.app/Contents/MacOS/XUL + 0x55a953a)
#02: wr_vec_u8_push_bytes (/Applications/FirefoxNightly.app/Contents/MacOS/XUL + 0x5be2522)
#03: mozilla::wr::ShmSegmentsReader::Read(mozilla::layers::OffsetRange const&, mozilla::wr::Vec<unsigned char>&) (/Applications/FirefoxNightly.app/Contents/MacOS/XUL + 0x12ab73a)
#04: mozilla::layers::WebRenderBridgeParent::UpdateResources(nsTArray<mozilla::layers::OpUpdateResource> const&, nsTArray<mozilla::layers::RefCountedShmem> const&, nsTArray<mozilla::ipc::Shmem> const&, mozilla::wr::TransactionBuilder&) (/Applications/FirefoxNightly.app/Contents/MacOS/XUL + 0x12be7ec)
#05: mozilla::layers::WebRenderBridgeParent::SetDisplayList(mozilla::gfx::RectTyped<mozilla::LayoutDevicePixel, float> const&, mozilla::ipc::ByteBuf&&, mozilla::wr::BuiltDisplayListDescriptor const&, nsTArray<mozilla::layers::OpUpdateResource> const&, nsTArray (/Applications/FirefoxNightly.app/Contents/MacOS/XUL + 0x12c05e1)
#06: mozilla::layers::WebRenderBridgeParent::ProcessDisplayListData(mozilla::layers::DisplayListData&, mozilla::wr::Epoch, mozilla::TimeStamp const&, bool, bool) (/Applications/FirefoxNightly.app/Contents/MacOS/XUL + 0x12c0a99)
#07: mozilla::layers::WebRenderBridgeParent::RecvSetDisplayList(mozilla::layers::DisplayListData&&, nsTArray<mozilla::layers::OpDestroy>&&, unsigned long long const&, mozilla::layers::BaseTransactionId<mozilla::layers::TransactionIdType> const&, bool const&, m (/Applications/FirefoxNightly.app/Contents/MacOS/XUL + 0x12c1137)
#08: mozilla::layers::PWebRenderBridgeParent::OnMessageReceived(IPC::Message const&) (/Applications/FirefoxNightly.app/Contents/MacOS/XUL + 0xd6f071)
#09: mozilla::layers::PCompositorManagerParent::OnMessageReceived(IPC::Message const&) (/Applications/FirefoxNightly.app/Contents/MacOS/XUL + 0xb4e44d)
#10: mozilla::ipc::MessageChannel::DispatchMessage(IPC::Message&&) (/Applications/FirefoxNightly.app/Contents/MacOS/XUL + 0xaa6056)
#11: mozilla::ipc::MessageChannel::MessageTask::Run() (/Applications/FirefoxNightly.app/Contents/MacOS/XUL + 0xaa7dbe)
#12: nsThread::ProcessNextEvent(bool, bool*) (/Applications/FirefoxNightly.app/Contents/MacOS/XUL + 0x48f790)
#13: mozilla::ipc::MessagePumpForNonMainThreads::Run(base::MessagePump::Delegate*) (/Applications/FirefoxNightly.app/Contents/MacOS/XUL + 0xaac2f2)
#14: MessageLoop::Run() (/Applications/FirefoxNightly.app/Contents/MacOS/XUL + 0xa5ed20)
#15: nsThread::ThreadFunc(void*) (/Applications/FirefoxNightly.app/Contents/MacOS/XUL + 0x48ad57)
#16: _pt_root (/Applications/FirefoxNightly.app/Contents/MacOS/libnss3.dylib + 0x11eb24)
#17: _pthread_start (/usr/lib/system/libsystem_pthread.dylib + 0x6109)
#18: thread_start (/usr/lib/system/libsystem_pthread.dylib + 0x1b8b)
}
}
Unreported {
406 blocks in heap block record 3 of 28,986
197,210,112 bytes (196,488,172 requested / 721,940 slop)
Individual block sizes: 1,499,136 x 17; 823,296 x 12; 819,200 x 36; 811,008 x 59; 806,912 x 71; 647,168; 614,400; 315,392 x 2; 311,296 x 3; 307,200 x 45; 233,472 x 5; 217,088 x 9; 212,992 x 10; 167,936 x 9; 131,072 x 5; 106,496 x 2; 102,400 x 2; 53,248; 49,152 x 4; 45,056 x 2; 40,960 x 24; 36,864 x 8; 32,768 x 4; 24,576 x 20; 20,480 x 3; 16,384; 8,192 x 50
9.21% of the heap (49.77% cumulative)
10.70% of unreported (57.81% cumulative)
Allocated at {
#01: alloc::vec::Vec$LT$T$GT$::reserve::h0412ac6c2988a35d (/Applications/FirefoxNightly.app/Contents/MacOS/XUL + 0x55a953a)
#02: wr_vec_u8_reserve (/Applications/FirefoxNightly.app/Contents/MacOS/XUL + 0x5be25b2)
#03: mozilla::layers::WebRenderBridgeParent::UpdateResources(nsTArray<mozilla::layers::OpUpdateResource> const&, nsTArray<mozilla::layers::RefCountedShmem> const&, nsTArray<mozilla::ipc::Shmem> const&, mozilla::wr::TransactionBuilder&) (/Applications/FirefoxNightly.app/Contents/MacOS/XUL + 0x12beb13)
#04: mozilla::layers::WebRenderBridgeParent::RecvUpdateResources(nsTArray<mozilla::layers::OpUpdateResource>&&, nsTArray<mozilla::layers::RefCountedShmem>&&, nsTArray<mozilla::ipc::Shmem>&&) (/Applications/FirefoxNightly.app/Contents/MacOS/XUL + 0x12bfb6c)
#05: mozilla::layers::PWebRenderBridgeParent::OnMessageReceived(IPC::Message const&) (/Applications/FirefoxNightly.app/Contents/MacOS/XUL + 0xd6e2a7)
#06: mozilla::layers::PCompositorManagerParent::OnMessageReceived(IPC::Message const&) (/Applications/FirefoxNightly.app/Contents/MacOS/XUL + 0xb4e44d)
#07: mozilla::ipc::MessageChannel::DispatchMessage(IPC::Message&&) (/Applications/FirefoxNightly.app/Contents/MacOS/XUL + 0xaa6056)
#08: mozilla::ipc::MessageChannel::MessageTask::Run() (/Applications/FirefoxNightly.app/Contents/MacOS/XUL + 0xaa7dbe)
#09: nsThread::ProcessNextEvent(bool, bool*) (/Applications/FirefoxNightly.app/Contents/MacOS/XUL + 0x48f790)
#10: mozilla::ipc::MessagePumpForNonMainThreads::Run(base::MessagePump::Delegate*) (/Applications/FirefoxNightly.app/Contents/MacOS/XUL + 0xaac2f2)
#11: MessageLoop::Run() (/Applications/FirefoxNightly.app/Contents/MacOS/XUL + 0xa5ed20)
#12: nsThread::ThreadFunc(void*) (/Applications/FirefoxNightly.app/Contents/MacOS/XUL + 0x48ad57)
#13: _pt_root (/Applications/FirefoxNightly.app/Contents/MacOS/libnss3.dylib + 0x11eb24)
#14: _pthread_start (/usr/lib/system/libsystem_pthread.dylib + 0x6109)
#15: thread_start (/usr/lib/system/libsystem_pthread.dylib + 0x1b8b)
}
}
Unreported {
474 blocks in heap block record 4 of 28,986
194,822,144 bytes (193,817,876 requested / 1,004,268 slop)
Individual block sizes: 823,296 x 20; 819,200 x 43; 811,008 x 118; 806,912 x 18; 606,208; 307,200; 233,472 x 13; 217,088 x 10; 212,992 x 25; 196,608 x 16; 184,320; 172,032; 167,936 x 13; 135,168; 131,072 x 84; 110,592 x 3; 106,496 x 2; 102,400 x 2; 98,304; 94,208 x 3; 90,112 x 3; 86,016 x 4; 73,728 x 2; 69,632 x 3; 65,536; 61,440 x 4; 49,152 x 2; 40,960 x 17; 36,864 x 7; 32,768 x 5; 28,672; 24,576 x 30; 20,480 x 6; 16,384; 8,192 x 12
9.10% of the heap (58.87% cumulative)
10.57% of unreported (68.38% cumulative)
Allocated at {
#01: alloc::vec::Vec$LT$T$GT$::reserve::h0412ac6c2988a35d (/Applications/FirefoxNightly.app/Contents/MacOS/XUL + 0x55a953a)
#02: wr_vec_u8_reserve (/Applications/FirefoxNightly.app/Contents/MacOS/XUL + 0x5be25b2)
#03: mozilla::layers::WebRenderBridgeParent::UpdateResources(nsTArray<mozilla::layers::OpUpdateResource> const&, nsTArray<mozilla::layers::RefCountedShmem> const&, nsTArray<mozilla::ipc::Shmem> const&, mozilla::wr::TransactionBuilder&) (/Applications/FirefoxNightly.app/Contents/MacOS/XUL + 0x12beb13)
#04: mozilla::layers::WebRenderBridgeParent::RecvUpdateResources(nsTArray<mozilla::layers::OpUpdateResource>&&, nsTArray<mozilla::layers::RefCountedShmem>&&, nsTArray<mozilla::ipc::Shmem>&&) (/Applications/FirefoxNightly.app/Contents/MacOS/XUL + 0x12bfb6c)
#05: mozilla::layers::PWebRenderBridgeParent::OnMessageReceived(IPC::Message const&) (/Applications/FirefoxNightly.app/Contents/MacOS/XUL + 0xd6e2a7)
#06: mozilla::layers::PCompositorManagerParent::OnMessageReceived(IPC::Message const&) (/Applications/FirefoxNightly.app/Contents/MacOS/XUL + 0xb4e44d)
#07: mozilla::ipc::MessageChannel::DispatchMessage(IPC::Message&&) (/Applications/FirefoxNightly.app/Contents/MacOS/XUL + 0xaa6056)
#08: mozilla::ipc::MessageChannel::MessageTask::Run() (/Applications/FirefoxNightly.app/Contents/MacOS/XUL + 0xaa7dbe)
#09: nsThread::ProcessNextEvent(bool, bool*) (/Applications/FirefoxNightly.app/Contents/MacOS/XUL + 0x48f790)
#10: mozilla::ipc::MessagePumpForNonMainThreads::Run(base::MessagePump::Delegate*) (/Applications/FirefoxNightly.app/Contents/MacOS/XUL + 0xaac240)
#11: MessageLoop::Run() (/Applications/FirefoxNightly.app/Contents/MacOS/XUL + 0xa5ed20)
#12: nsThread::ThreadFunc(void*) (/Applications/FirefoxNightly.app/Contents/MacOS/XUL + 0x48ad57)
#13: _pt_root (/Applications/FirefoxNightly.app/Contents/MacOS/libnss3.dylib + 0x11eb24)
#14: _pthread_start (/usr/lib/system/libsystem_pthread.dylib + 0x6109)
#15: thread_start (/usr/lib/system/libsystem_pthread.dylib + 0x1b8b)
}
}
Unreported {
1,700,093 blocks in heap block record 5 of 28,986
126,731,032 bytes (118,784,647 requested / 7,946,385 slop)
Individual block sizes: 2,048 x 207; 1,024 x 7,352; 512 x 1,040; 496 x 375; 480 x 237; 464 x 125; 448 x 5,265; 432 x 1,810; 416 x 740; 400 x 986; 384 x 2,348; 368 x 844; 352 x 511; 336 x 1,188; 320 x 832; 304 x 823; 288 x 3,407; 272 x 2,530; 256 x 19,232; 240 x 1,056; 224 x 23,020; 208 x 16,861; 192 x 12,132; 176 x 4,248; 160 x 15,678; 144 x 87,266; 128 x 54,707; 112 x 41,446; 96 x 31,585; 80 x 137,675; 64 x 133,948; 48 x 679,933; 32 x 292,874; 16 x 107,719; 8 x 10,093
5.92% of the heap (64.79% cumulative)
6.88% of unreported (75.26% cumulative)
Allocated at {
#01: (no stack trace recorded due to --stacks=partial)
}
}
Unreported {
11,601 blocks in heap block record 6 of 28,986
22,783,488 bytes (17,163,288 requested / 5,620,200 slop)
Individual block sizes: 20,480 x 8; 16,384; 8,192 x 334; 4,096 x 940; 2,048 x 5,547; 1,024 x 4,363; 512 x 56; 480 x 160; 448 x 76; 432 x 105; 368 x 11
1.06% of the heap (65.86% cumulative)
1.24% of unreported (76.49% cumulative)
Allocated at {
#01: alloc::vec::Vec$LT$T$GT$::reserve::h0412ac6c2988a35d (/Applications/FirefoxNightly.app/Contents/MacOS/XUL + 0x55a953a)
#02: wr_vec_u8_push_bytes (/Applications/FirefoxNightly.app/Contents/MacOS/XUL + 0x5be2522)
#03: mozilla::wr::ShmSegmentsReader::Read(mozilla::layers::OffsetRange const&, mozilla::wr::Vec<unsigned char>&) (/Applications/FirefoxNightly.app/Contents/MacOS/XUL + 0x12ab73a)
#04: mozilla::layers::WebRenderBridgeParent::UpdateResources(nsTArray<mozilla::layers::OpUpdateResource> const&, nsTArray<mozilla::layers::RefCountedShmem> const&, nsTArray<mozilla::ipc::Shmem> const&, mozilla::wr::TransactionBuilder&) (/Applications/FirefoxNightly.app/Contents/MacOS/XUL + 0x12be7ec)
#05: mozilla::layers::WebRenderBridgeParent::SetDisplayList(mozilla::gfx::RectTyped<mozilla::LayoutDevicePixel, float> const&, mozilla::ipc::ByteBuf&&, mozilla::wr::BuiltDisplayListDescriptor const&, nsTArray<mozilla::layers::OpUpdateResource> const&, nsTArray (/Applications/FirefoxNightly.app/Contents/MacOS/XUL + 0x12c05e1)
#06: mozilla::layers::WebRenderBridgeParent::ProcessDisplayListData(mozilla::layers::DisplayListData&, mozilla::wr::Epoch, mozilla::TimeStamp const&, bool, bool) (/Applications/FirefoxNightly.app/Contents/MacOS/XUL + 0x12c0a99)
#07: mozilla::layers::WebRenderBridgeParent::RecvSetDisplayList(mozilla::layers::DisplayListData&&, nsTArray<mozilla::layers::OpDestroy>&&, unsigned long long const&, mozilla::layers::BaseTransactionId<mozilla::layers::TransactionIdType> const&, bool const&, m (/Applications/FirefoxNightly.app/Contents/MacOS/XUL + 0x12c1257)
#08: mozilla::layers::PWebRenderBridgeParent::OnMessageReceived(IPC::Message const&) (/Applications/FirefoxNightly.app/Contents/MacOS/XUL + 0xd6f071)
#09: mozilla::layers::PCompositorManagerParent::OnMessageReceived(IPC::Message const&) (/Applications/FirefoxNightly.app/Contents/MacOS/XUL + 0xb4e44d)
#10: mozilla::ipc::MessageChannel::DispatchMessage(IPC::Message&&) (/Applications/FirefoxNightly.app/Contents/MacOS/XUL + 0xaa6056)
#11: mozilla::ipc::MessageChannel::MessageTask::Run() (/Applications/FirefoxNightly.app/Contents/MacOS/XUL + 0xaa7dbe)
#12: nsThread::ProcessNextEvent(bool, bool*) (/Applications/FirefoxNightly.app/Contents/MacOS/XUL + 0x48f790)
#13: mozilla::ipc::MessagePumpForNonMainThreads::Run(base::MessagePump::Delegate*) (/Applications/FirefoxNightly.app/Contents/MacOS/XUL + 0xaac2f2)
#14: MessageLoop::Run() (/Applications/FirefoxNightly.app/Contents/MacOS/XUL + 0xa5ed20)
#15: nsThread::ThreadFunc(void*) (/Applications/FirefoxNightly.app/Contents/MacOS/XUL + 0x48ad57)
#16: _pt_root (/Applications/FirefoxNightly.app/Contents/MacOS/libnss3.dylib + 0x11eb24)
#17: _pthread_start (/usr/lib/system/libsystem_pthread.dylib + 0x6109)
#18: thread_start (/usr/lib/system/libsystem_pthread.dylib + 0x1b8b)
}
}
Reporter | ||
Comment 1•4 years ago
|
||
Maybe this could be for mozilla::layers::WebRenderBridgeParent::UpdateResources
? Matt, do you know?
Flags: needinfo?(matt.woodrow)
Comment 2•4 years ago
|
||
The big allocations coming with UpdateResources
are buffers that contain either images or fonts. They tend to be rather long lived (live as long as the image/font loaded on the page).
Reporter | ||
Comment 3•4 years ago
|
||
Hm, maybe again related to bug 1625590?
Updated•4 years ago
|
Severity: -- → N/A
Priority: -- → P3
Updated•4 years ago
|
Flags: needinfo?(matt.woodrow)
You need to log in
before you can comment on or make changes to this bug.
Description
•