profiler icon indicating copy to clipboard operation
profiler copied to clipboard

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

Open PaulBone opened this issue 11 months ago • 1 comments

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 avatar Feb 12 '25 04:02 PaulBone

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

PaulBone avatar Feb 12 '25 04:02 PaulBone