Closed Bug 1728737 Opened 3 years ago Closed 3 years ago

Tweak browser_allocation_reload.js to introduce network requests

Categories

(DevTools :: Netmonitor, enhancement)

enhancement

Tracking

(firefox94 fixed)

RESOLVED FIXED
94 Branch
Tracking Status
firefox94 --- fixed

People

(Reporter: ochameau, Assigned: ochameau)

References

Details

(Whiteboard: dt-perf-stability-triage)

Attachments

(1 file)

The browser_allocation_reload.js test introduced in bug 1727571 currently uses a data: URI document.
But this doesn't help reproduce the leaks reported in bug 1682212 comment 44 (CNN reloads) as they involve leaks around NETWORK_EVENT resource, which suppose there is network requests going on when doing the page reload.

Having such test will help assert that bug 1439509 fixes the leak and also avoid regressing this.

Blocks: 1439509
Assignee: nobody → poirot.alex
Status: NEW → ASSIGNED

A quick summary about this test and how it behaves with all the leak fixes

Current test on mozilla-central (without this patch)

The reload test leaked 2170 objects (23915 with missing allocation site) in the parent process
The reload test leaked 5134 objects (7122 with missing allocation site) in the content process

With this patch, and only that

The reload test leaked 3960 objects (23227 with missing allocation site) in the parent process
The reload test leaked 5239 objects (6281 with missing allocation site) in the content process

With this patch, and all target front/markup view leak fixes

The reload test leaked 1720 objects (23927 with missing allocation site) in the parent process
The reload test leaked 5239 objects (6828 with missing allocation site) in the content process

With this patch, and only the Network event fix (bug 1439509)

The reload test leaked 2240 objects (23500 with missing allocation site) in the parent process
The reload test leaked 5243 objects (6285 with missing allocation site) in the content process

With this patch and all leaks fixes

The reload test leaked 0 objects (21383 with missing allocation site) in the parent process
The reload test leaked 5238 objects (6926 with missing allocation site) in the content process

Conclusion

With all the in-flight patches, we are able to fix all the leaks reported by this tests.
Before this patch, the test was only leaking target fronts and markup views.
With this patch, it starts leaking network related objects and bug 1439509 fixes that.

Bug 1682212 comment 44 STR (CNN reloads) tells us that target front and markup view fixes aren't so impactful on the parent process leak.
But the network event fix (bug 1439509), is, impactful by reducing the leak by 4x!
So let's start with fixing the biggest leak first. Land this test tweak and see bug 1439509 reducing the leak.

Also, while network event fixes is having a bigger impact on actual memory consumption, it doesn't involve as many objects as target front and markup view leaks. So it looks less severe from the point of view of this test.

About CNN reloads, all the flying patches are not enough to fix all the leaks, still.

If I run the test script against CNN, with all the fixes, I get the following results:
(* Note that I reload CNN only 3 times to avoid a test timeout.)
The reload test leaked 9236 objects (63909 with missing allocation site) in the parent process
The reload test leaked 90413 objects (257567 with missing allocation site) in the content process
Parent process memory: 53 473 280
Content process memory: 138 199 040

With only network event fix:
The reload test leaked 9777 objects (59574 with missing allocation site) in the parent process
The reload test leaked 90246 objects (245870 with missing allocation site) in the content process
Parent process memory: 26 103 808
Content process memory: 132 382 720

With only target front and markup view fixes:
The reload test leaked 32945 objects (69320 with missing allocation site) in the parent process
The reload test leaked 87532 objects (245587 with missing allocation site) in the content process
Parent process memory: 76 632 064
Content process memory: 125 652 992

With mozilla-central (without any fix):
The reload test leaked 33635 objects (68885 with missing allocation site) in the parent process
The reload test leaked 87326 objects (249398 with missing allocation site) in the content process
Parent process memory: 81 207 296
Content process memory: 125 255 680

We can see that with CNN, network event leaks lead to much more objects being leaked and so its related fix has a more significant impact on the test. We can also see that the memory probes look more relevant, more stable, and seems to react nicely to fixes (except the first run with all the fixes).

Pushed by apoirot@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/63f8095b0de8
[devtools] Use test document with requests in the memory test for page reloads. r=jdescottes
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 94 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: