Closed
Bug 1710958
Opened 3 years ago
Closed 3 years ago
[Wayland] [DMABUF] 7MB memory per content process wasted by loading Mesa early in startup
Categories
(Core :: Widget: Gtk, defect, P2)
Core
Widget: Gtk
Tracking
()
RESOLVED
FIXED
90 Branch
Tracking | Status | |
---|---|---|
firefox90 | --- | fixed |
People
(Reporter: jld, Assigned: stransky)
References
(Blocks 1 open bug)
Details
(Whiteboard: [MemShrink] [overhead:7200k])
Attachments
(1 file)
When MOZ_ENABLE_WAYLAND=1
is set, we appear to use a lot more memory (measured as resident-unique
in about:memory
/ Private_Dirty
in procfs smaps
) in each content process.
The total amount is about 9 MB; of that, about 2 MB is reported in heap-unclassified
and goes away if the process is started in headless mode (i.e., if we don't call gtk_init
; see also bug 1635451).
The remaining 7 MB appears to be entirely because we're loading Mesa early in startup; and it goes away (and Mesa isn't loaded) if LIBGL_ALWAYS_SOFTWARE
is set in the environment, possibly as a side effect of using software WebRender instead of hardware. In particular, about 4.2 MB of that is because of libLLVM
's relocations.
Here's where the problem is:
#0 __dlopen (file=0x7ffde8cc4400 "/usr/lib/x86_64-linux-gnu/dri/radeonsi_dri.so", mode=258) at dlopen.c:75
#1 0x00007f9564f1403e in () at /lib/x86_64-linux-gnu/libgbm.so.1
#2 0x00007f9564f12b65 in () at /lib/x86_64-linux-gnu/libgbm.so.1
#3 0x00007f9564f13418 in () at /lib/x86_64-linux-gnu/libgbm.so.1
#4 0x00007f9564f115d7 in gbm_create_device () at /lib/x86_64-linux-gnu/libgbm.so.1
#5 0x00007f956e84ed6a in mozilla::widget::nsGbmLib::CreateDevice(int) (fd=-389266432) at /home/jld/src/gecko-dev/widget/gtk/DMABufLibWrapper.h:62
#6 0x00007f956e833cfc in mozilla::widget::nsDMABufDevice::Configure(nsTSubstring<char>&) (this=this@entry=0x7f9573211728 <mozilla::widget::GetDMABufDevice()::dmaBufDevice>, aFailureId=...)
at /home/jld/src/gecko-dev/widget/gtk/DMABufLibWrapper.cpp:239
#7 0x00007f956e833a49 in mozilla::widget::nsDMABufDevice::IsDMABufEnabled() (this=this@entry=0x7f9573211728 <mozilla::widget::GetDMABufDevice()::dmaBufDevice>)
at /home/jld/src/gecko-dev/widget/gtk/DMABufLibWrapper.cpp:257
#8 0x00007f956e8340f7 in mozilla::widget::nsDMABufDevice::IsDMABufWebGLEnabled() (this=0x7f9573211728 <mozilla::widget::GetDMABufDevice()::dmaBufDevice>)
at /home/jld/src/gecko-dev/widget/gtk/DMABufLibWrapper.cpp:288
#9 0x00007f956c63f023 in gfxPlatformGtk::gfxPlatformGtk() (this=0x7f9564b15430) at /home/jld/src/gecko-dev/gfx/thebes/gfxPlatformGtk.cpp:123
#10 0x00007f956c63479f in gfxPlatform::Init() () at /home/jld/src/gecko-dev/gfx/thebes/gfxPlatform.cpp:913
#11 0x00007f956c634f41 in gfxPlatform::InitChild(mozilla::gfx::ContentDeviceData const&) (aData=...) at /home/jld/src/gecko-dev/gfx/thebes/gfxPlatform.cpp:496
#12 0x00007f956e407851 in mozilla::dom::ContentChild::InitGraphicsDeviceData(mozilla::gfx::ContentDeviceData const&) (this=<optimized out>, aData=...) at /home/jld/src/gecko-dev/dom/ipc/ContentChild.cpp:1201
Assignee | ||
Comment 1•3 years ago
|
||
Assignee | ||
Comment 2•3 years ago
|
||
Updated•3 years ago
|
Assignee: nobody → stransky
Status: NEW → ASSIGNED
Pushed by stransky@redhat.com: https://hg.mozilla.org/integration/autoland/rev/98f55de0f9f5 [Linux] Delay DMABuf initialization when it's really needed, r=jhorak
Comment 4•3 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
status-firefox90:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → 90 Branch
You need to log in
before you can comment on or make changes to this bug.
Description
•