Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an optional plot in the memory track for "physical memory" #5365

Open
PaulBone opened this issue Feb 12, 2025 · 1 comment
Open

Add an optional plot in the memory track for "physical memory" #5365

PaulBone opened this issue Feb 12, 2025 · 1 comment

Comments

@PaulBone
Copy link
Contributor

PaulBone commented Feb 12, 2025

The memory track in the profiler shows memory allocated with malloc() and free(). However bookkeeping, fragmentation and a cache of "dirty memory" all mean that the actual amount of physical memory allocated to firefox is larger, and when freeing memory especially since Bug 1903758 this can "lag behind" the normal memory counter. mozjemalloc calls this "committed memory" this isn't an accurate name but there isn't a precise term.

The committed memory will always be larger than the memory that firefox has allocated. I want to enable it selectively because I think most engineers won't find it useful. What we expect to see is that when Firefox frees memory, first the existing counter will drop (as it does now) and then a second or so later when Firefox returns the memory to the OS so other programs can use it we should see the 2nd counter drop more sharply. I imagined rendering them both on the same plot with the existing graph "in front of" the new one - but if you have other ideas I'd be glad to hear them.

┆Issue is synchronized with this Jira Task

@PaulBone
Copy link
Contributor Author

The Firefox part of this bug is: https://bugzilla.mozilla.org/show_bug.cgi?id=1947661

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant