[JSC][GTK][WPE] Unify & improve process memory footprint calculation#56493
Merged
webkit-commit-queue merged 1 commit intoWebKit:mainfrom Jan 14, 2026
Merged
Conversation
Collaborator
|
EWS run on current version of this PR (hash 4180b26) Details |
magomez
approved these changes
Jan 14, 2026
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
4180b26 to
2f2cff4
Compare
Collaborator
|
Committed 305569@main (2f2cff4): https://commits.webkit.org/305569@main Reviewed commits have been landed. Closing PR #56493 and removing active labels. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
2f2cff4
4180b26