Closed Bug 1393636 Opened 7 years ago Closed 7 years ago

Report memory usage of Gecko style structs separately

Categories

(Core :: DOM: Core & HTML, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla57
Tracking Status
firefox57 --- fixed

People

(Reporter: n.nethercote, Assigned: n.nethercote)

Details

Attachments

(5 files)

We currently report each style structs memory usage separately for Stylo. heycam wants it for Gecko as well, for easier comparisons.
This patch just moves code around, so that the reporting is done in the same
order that the nsWindowSizes fields are declared. This makes it easier to see
whether anything has been missed.

(I'd like to use macros to generate this repetitive code instead of writing it
by hand, but that's a task for later.)
Attachment #8901020 - Flags: review?(cam)
Assignee: nobody → n.nethercote
Status: NEW → ASSIGNED
Memory reporting was recently added for these DOM performance objects, but we
failed to report the "window-objects/" totals for the entire process. This
patch adds that.
Attachment #8901021 - Flags: review?(cam)
This is a purely non-functional plumbing change. Instead of passing a
SizeOfState and an nsStyleSizes a bunch of places, we pass an nsWindowSizes,
which contains both of them.

This is a necessary precursor for the next patch.
Attachment #8901022 - Flags: review?(cam)
Another plumbing-only change, which is a precursor for the next patch.
ComputedValues are a Servo-only thing, so in order to use nsStyleSizes for both
Gecko and Servo, the ComputedValues sizes must be moved out.
Attachment #8901023 - Flags: review?(cam)
A lot of this involves copy-pasting the existing Servo style structs code.

Note that nsArenaSizes had to be moved after nsStyleSizes, because the former
now contains an instance of the latter.
Attachment #8901025 - Flags: review?(cam)
Comment on attachment 8901020 [details] [diff] [review]
(part 1) - Reorder nsWindowSizes reporting

Review of attachment 8901020 [details] [diff] [review]:
-----------------------------------------------------------------

Unfortunately Splinter (unlike mozreview) doesn't help to point out lines of code moved, so I'll just trust that these lines are just moved and not modified.
Attachment #8901020 - Flags: review?(cam) → review+
Attachment #8901021 - Flags: review?(cam) → review+
Attachment #8901022 - Flags: review?(cam) → review+
Attachment #8901023 - Flags: review?(cam) → review+
Attachment #8901025 - Flags: review?(cam) → review+
https://hg.mozilla.org/integration/mozilla-inbound/rev/8fa508b19f3aacb1857720aeebc692ace19ab52e
Bug 1393636 (part 1) - Reorder nsWindowSizes reporting. r=heycam.

https://hg.mozilla.org/integration/mozilla-inbound/rev/3ffbe000410322acc9075658188faf7722f31054
Bug 1393636 (part 2) - Add "window-objects/dom/performance" memory report. r=heycam.

https://hg.mozilla.org/integration/mozilla-inbound/rev/516d09433b8de10647358e634247abf35c59785f
Bug 1393636 (part 3) - Pass nsWindowSizes to more AddSizeOf*() functions. r=heycam.

https://hg.mozilla.org/integration/mozilla-inbound/rev/af9e67e05d3654a459c4d9bf6ca5dafe0baaea67
Bug 1393636 (part 4) - Move ComputedValues measurements from nsStyleSizes to nsWindowSizes. r=heycam.

https://hg.mozilla.org/integration/mozilla-inbound/rev/bfca0e591024c79bf6cf96bc3117d1c8a06c0b47
Bug 1393636 (part 5) - Report memory usage of Gecko style structs separately. r=heycam.
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: