fix uninitialized event-* stats in about:memory

RESOLVED FIXED in Firefox 27

Status

()

Toolkit
about:memory
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: froydnj, Assigned: froydnj)

Tracking

Trunk
mozilla28
Points:
---
Bug Flags:
in-testsuite -

Firefox Tracking Flags

(firefox27 fixed, firefox28 fixed)

Details

(Whiteboard: [qa-])

Attachments

(1 attachment)

(Assignee)

Description

5 years ago
On a freshly started browser, about:memory is showing me things like:

1,115,980,845,296 (100.0%) -- event-counts
├──1,111,801,141,061 (99.63%) -- window-objects
│  ├────929,984,040,527 (83.33%) -- (217 tiny)
│  │    ├────8,359,410,760 (00.75%) -- top(chrome://browser/content/browser.xul, id=3)/active
│  │    │    ├──4,179,707,243 (00.37%) -- window(chrome://browser/content/browser.xul)/dom
│  │    │    │  ├──4,179,629,073 (00.37%) ── event-targets [2]
│  │    │    │  └─────────78,170 (00.00%) ── event-listeners [2]
│  │    │    └──4,179,703,517 (00.37%) -- window(about:blank)/dom
│  │    │       ├──4,179,629,068 (00.37%) ── event-targets [2]
│  │    │       └─────────74,449 (00.00%) ── event-listeners [2]
│  │    ├────8,359,409,291 (00.75%) ++ top(chrome://browser/content/browser.xul, id=15)/active
│  │    ├────8,359,406,425 (00.75%) ++ top(chrome://browser/content/browser.xul, id=17)/active
│  │    ├────8,359,405,569 (00.75%) ++ top(chrome://browser/content/browser.xul, id=13)/active
│  │    ├────8,359,392,706 (00.75%) ++ top(https://bugzilla.mozilla.org/show_bug.cgi?id=904336, id=403)/active
│  │    ├────6,269,558,208 (00.56%) ++ top(about:newtab, id=660)/active
│  │    ├────4,179,711,542 (00.37%) ++ top(https://mail.mozilla.com/zimbra/#1, id=275)/active/window(https://mail.mozilla.com/zimbra/#1)/dom
│  │    ├────4,179,709,343 (00.37%) ++ top(about:blank, id=377)/active/window(about:blank)/dom
│  │    ├────4,179,709,339 (00.37%) ++ top(about:blank, id=55)/active/window(about:blank)/dom

which seems totally bogus.  Unless I misunderstand, we are not properly initializing the counts for those stats in nsWindowSizes.  Patch in a moment.
(Assignee)

Comment 1

5 years ago
Created attachment 830330 [details] [diff] [review]
zero-initialize fields in nsWindowSizes

Boy, it sure would be nice if valgrind tests were working! ;)
Attachment #830330 - Flags: review?(n.nethercote)
Argh.  It looks like this was never working correctly.  It's frustrating that these are not sizes and so don't fit nicely into the FOR_EACH_SIZE macro.

Can you please nominate for Aurora backporting once it's landed?
Attachment #830330 - Flags: review?(n.nethercote) → review+
Aha, I was wondering what was causing this, but hadn't gotten around to looking into it.

froydnj++

Comment 5

5 years ago
https://hg.mozilla.org/mozilla-central/rev/a00f18602394
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla28
(Assignee)

Comment 6

5 years ago
Comment on attachment 830330 [details] [diff] [review]
zero-initialize fields in nsWindowSizes

[Approval Request Comment]
Would like to uplift this so that about:memory works better in Aurora.

Bug caused by (feature/regressing bug #): bug 904720
User impact if declined: The handful of people who look at about:memory will be less confused.
Testing completed (on m-c, etc.): On m-c.
Risk to taking this patch (and alternatives if risky): None.
String or IDL/UUID changes made by this patch: None.
Attachment #830330 - Flags: approval-mozilla-aurora?

Updated

5 years ago
Attachment #830330 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
https://hg.mozilla.org/releases/mozilla-aurora/rev/6c7eb9d6e528
Assignee: nobody → nfroyd
status-firefox27: --- → fixed
status-firefox28: --- → fixed
Duplicate of this bug: 938281
Whiteboard: [qa-]
You need to log in before you can comment on or make changes to this bug.