Closed Bug 1650151 Opened 7 months ago Closed 5 months ago

Improve diffs between Fission and non-Fission reports

Categories

(Toolkit :: about:memory, task, P2)

task

Tracking

()

RESOLVED FIXED
81 Branch
Fission Milestone M6c
Tracking Status
firefox81 --- fixed

People

(Reporter: mccr8, Assigned: mccr8)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

With Fission disabled, if you load a page, that entire page will always end up in a single content process. If you enable Fission, that same page might end up in multiple content processes. This makes it difficult to compare memory reports.

If you try to do a diff of a Fission run and a non-Fission run, you hit an assertion. Maybe we could do something like detect if a Fission and non-Fission about:memory report are being diffed and mash together all of the content processes into a single content process report, then do the diff on that. I'm sure some of the numbers will end up being really weird (like the memory counts that include shared memory) but it feels like it would be more useful than the current behavior.

Status: NEW → ASSIGNED
Fission Milestone: --- → M6b
Depends on: 1652883
Fission Milestone: M6b → M6c

Fission processes show up in about:memory as webIsolated=<URL>. This is
great when comparing two reports from a single session, to precisely
see how the memory usage of a particular process has changed, but it
makes it harder to compare to a non-Fission memory report. For instance,
when loading a news page with many ad iframes, what was a single process
without Fission enabled will be split across more than a dozen processes.

This patch fixes this by making it so that if exactly one memory report
being diffed contains a webIsolated process, then webIsolated processes
will be treated like regular web processes.

This patch gives nice results when comparing Fission and non-Fission memory reports. I should write a basic test. (My initial patch didn't work due to a simple error...)

An excerpt from a diff of cnn.com without and with Fission:

Explicit Allocations

294.00 MB (100.0%) -- explicit
├──125.39 MB (42.65%) ── heap-unclassified
├───54.18 MB (18.43%) -- js-non-window

This patch detects the case where exactly one memory report contains at least one webIsolated process. In that case, it turns webIsolated processes into web processes. The existing merging logic of about:memory nicely handles the rest.

Here's the high-level results of the memory increase from enabling fission when loading cnn.com. This resulted in around 15 webIsolated processes. This isn't super-scientific, as this is from two separate loads, but the number of iframe domains looked generally similar for the two cases.

Main process: 21.47 MB (100.0%) -- explicit
prelloc: 26.63 MB (100.0%) -- explicit
web: 294.00 MB (100.0%) -- explicit

Firefox takes about 600MB of explicit total with Fission disabled and cnn.com loaded.

Pushed by amccreight@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/2e5b1f004db9
Merge webIsolated processes when diffing with non-Fission memory reports. r=njn
Status: ASSIGNED → RESOLVED
Closed: 5 months ago
Resolution: --- → FIXED
Target Milestone: --- → 81 Branch
You need to log in before you can comment on or make changes to this bug.