Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: b5c69f396a00cff9563e3ab36b16651d491b6c2a
https://github.com/WebKit/WebKit/commit/b5c69f396a00cff9563e3ab36b16651d491b6c2a
Author: Ben Nham <[email protected]>
Date: 2024-09-18 (Wed, 18 Sep 2024)
Changed paths:
M Source/WebCore/platform/SharedMemory.cpp
M Source/WebCore/platform/SharedMemory.h
M Source/WebCore/platform/cocoa/SharedMemoryCocoa.mm
M Source/WebCore/platform/graphics/cocoa/IOSurface.mm
M Source/WebKit/GPUProcess/GPUConnectionToWebProcess.cpp
M Source/WebKit/UIProcess/WebProcessProxy.cpp
Log Message:
-----------
Add environment variable to disable WebGL ownership attribution
rdar://135995576
https://bugs.webkit.org/show_bug.cgi?id=279708
Reviewed by Kimmo Kinnunen.
We've been looking in to memory usage issues on some websites that make heavy
use of graphics memory
allocated by GPUProcess but then attributed back to UIProcess. Unfortunately,
using these
attribution APIs seems to cause MallocStackLogging, vmmap, and other tools to
not behave as
expected. In particular, it looks like the tools don't calculate the residency
state for the
associated VM regions correctly anymore (e.g. a surface created in one process
and attributed to
another shows up as resident in neither process in vmmap).
While we wait for the OS and/or devtools to sort out this bug, let's add an
environment variable to
disable ownership attribution so things like `malloc_history -callTree
com.apple.WebKit.GPU` produce
reasonable output for these types of graphics allocations.
* Source/WebCore/platform/SharedMemory.cpp:
(WebCore::isMemoryAttributionDisabled):
* Source/WebCore/platform/SharedMemory.h:
* Source/WebCore/platform/cocoa/SharedMemoryCocoa.mm:
(WebCore::SharedMemoryHandle::takeOwnershipOfMemory const):
(WebCore::SharedMemoryHandle::setOwnershipOfMemory const):
* Source/WebCore/platform/graphics/cocoa/IOSurface.mm:
(WebCore::IOSurface::setOwnershipIdentity):
* Source/WebKit/GPUProcess/GPUConnectionToWebProcess.cpp:
(WebKit::adjustProcessIdentityIfNeeded):
* Source/WebKit/UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::createGPUProcessConnection):
Canonical link: https://commits.webkit.org/283861@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes