Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 2f2cff42236875c934ed6de7fc6ec8b759bc2763
https://github.com/WebKit/WebKit/commit/2f2cff42236875c934ed6de7fc6ec8b759bc2763
Author: Pawel Lampe <[email protected]>
Date: 2026-01-14 (Wed, 14 Jan 2026)
Changed paths:
M Source/WTF/wtf/PlatformWPE.cmake
M Source/WTF/wtf/linux/MemoryFootprintLinux.cpp
Log Message:
-----------
[JSC][GTK][WPE] Unify & improve process memory footprint calculation
https://bugs.webkit.org/show_bug.cgi?id=305382
Reviewed by Miguel Gomez.
While most of the ports calculate process memory footprint as being
close to RSS (WPE, Win, PS) or PSS (Apple), the GTK and JSC ports
calculate it as being close to USS which is <= RSS, PSS. Apart from
using differnt approximation for no strong reason, GTK and JSC ports
calculate memory footprint using /proc/self/smaps file which:
- may be nonexistent if disabled in kernel during run/compile-time
- is expensive to parse
- is expensive to serve by OS (much more than e.g. /proc/self/statm)
For the sake of performance and unification, this change:
- switches memoryFootprint() implementation in MemoryFootprintLinux.cpp
to using resident (RSS) from currentProcessMemoryStatus() that parses
/proc/self/statm and hence is faster to obtain as well as is the same
to what MemoryFootprintGeneric.cpp uses in case of linux OSes (it
uses /proc/self/statm via bmalloc::api::memoryFootprint())
- switches WPE port to using MemoryFootprintLinux.cpp thus just
changing the code path that eventually reads the same value from
the same file (/proc/self/statm)
Canonical link: https://commits.webkit.org/305569@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications