Граф коммитов

160 Коммитов

Автор SHA1 Сообщение Дата
Cameron McCormack 81599f34a7 Bug 1473735 - Add memory reporting for MediaQueryLists. r=emilio
MozReview-Commit-ID: 87rgRtQOOyG

--HG--
extra : rebase_source : a2ba4e1ed29fd7249378f9496c2059fa26316c3c
2018-07-06 11:09:12 +10:00
Doug Thayer 488eb2eb9c Bug 1340498 - Fix unified sources build errors r=mrbkap
Adding the Places* files into unified sources pushed the
unified sources into a situation that exposed a strangely
large number of errors. This seems to be the minimum set of
changes I could make to resolve all of the issues.

MozReview-Commit-ID: C2H9ce8FmE4

--HG--
extra : rebase_source : 61afc5481dc8ec34caba1886bd74200cf3659fb4
2018-04-13 11:04:47 -07:00
Dorel Luca d296624690 Backed out 5 changesets (bug 1340498) for build bustage due to conflicts with bug 1470325. a=backout
Backed out changeset 28bedb658af4 (bug 1340498)
Backed out changeset f950a2310e26 (bug 1340498)
Backed out changeset 5fcd31c65fe0 (bug 1340498)
Backed out changeset 515bb5e24dd7 (bug 1340498)
Backed out changeset 79a8619bd3e2 (bug 1340498)
2018-06-27 14:05:20 +03:00
Doug Thayer 864c89631c Bug 1340498 - Fix unified sources build errors r=mrbkap
Adding the Places* files into unified sources pushed the
unified sources into a situation that exposed a strangely
large number of errors. This seems to be the minimum set of
changes I could make to resolve all of the issues.

MozReview-Commit-ID: C2H9ce8FmE4

--HG--
extra : rebase_source : 4f8dd2996d820fdb5a07afe544be5e2d6ca6a5c7
2018-04-13 11:04:47 -07:00
Bogdan Tara d2fb3a8812 Backed out 5 changesets (bug 1340498) for build bustages on nsDOMCSSAttrDeclaration.h CLOSED TREE
Backed out changeset 9ebcdb66ceff (bug 1340498)
Backed out changeset 63321093bb70 (bug 1340498)
Backed out changeset f8c799971f81 (bug 1340498)
Backed out changeset 21d8c1fbbbd1 (bug 1340498)
Backed out changeset fa40c179eb0d (bug 1340498)
2018-06-26 21:31:09 +03:00
Doug Thayer 5685ea3b89 Bug 1340498 - Fix unified sources build errors r=mrbkap
Adding the Places* files into unified sources pushed the
unified sources into a situation that exposed a strangely
large number of errors. This seems to be the minimum set of
changes I could make to resolve all of the issues.

MozReview-Commit-ID: C2H9ce8FmE4

--HG--
extra : rebase_source : b01f47e439a61492ad999ae30677c48535e8cd4c
2018-04-13 11:04:47 -07:00
arthur.iakab fc7e217166 Backed out 5 changesets (bug 1340498) for build bustages on SelectionChangeListener.h on a CLOSED TREE
Backed out changeset c89b86622d38 (bug 1340498)
Backed out changeset b270d4a01986 (bug 1340498)
Backed out changeset 8ed32495b46f (bug 1340498)
Backed out changeset df9a67c58183 (bug 1340498)
Backed out changeset a5977e0708ea (bug 1340498)
2018-06-26 07:59:01 +03:00
Doug Thayer 44024fd464 Bug 1340498 - Fix unified sources build errors r=mrbkap
Adding the Places* files into unified sources pushed the
unified sources into a situation that exposed a strangely
large number of errors. This seems to be the minimum set of
changes I could make to resolve all of the issues.

MozReview-Commit-ID: C2H9ce8FmE4

--HG--
extra : rebase_source : 571fd3b1e6511daa5731da76fb5d6d97bce11db1
2018-04-13 11:04:47 -07:00
arthur.iakab 8b1be0e972 Backed out 5 changesets (bug 1340498) for build bustages on SelectionChangeListener.h on a CLOSED TREE
Backed out changeset fae677707059 (bug 1340498)
Backed out changeset 2adde1d1742a (bug 1340498)
Backed out changeset a444ab9cefde (bug 1340498)
Backed out changeset e2ac49ef2034 (bug 1340498)
Backed out changeset 6465310b3de9 (bug 1340498)
2018-06-26 03:53:21 +03:00
Doug Thayer f8255e3bd2 Bug 1340498 - Fix unified sources build errors r=mrbkap
Adding the Places* files into unified sources pushed the
unified sources into a situation that exposed a strangely
large number of errors. This seems to be the minimum set of
changes I could make to resolve all of the issues.

MozReview-Commit-ID: C2H9ce8FmE4

--HG--
extra : rebase_source : 7a3b71596b4318f517ec4c3ac0180e2aa3b721c7
2018-04-13 11:04:47 -07:00
Boris Zbarsky ed3c958547 Bug 1463889 part 1. Switch nsPIDOMWindowOuter::GetFrames to returning an nsDOMWindowList. r=qdot 2018-05-24 23:32:19 -04:00
Boris Zbarsky b7f2b6976a Bug 1429903 part 3. Remove C++ uses of nsIDOMEventTarget. r=mccr8
MozReview-Commit-ID: 4NdssvnWn0H
2018-04-20 00:49:30 -04:00
Andrew McCreight 1610f69376 Bug 1454724 - Add scalar telemetry for max ghost windows. r=chutten
Rather than recording how many leaked (ghost) windows we see at
various times, I think it will be more useful over all to record what
the maximum number of ghost windows we see during a single
ping. Hopefully this will show up in a way that generates automated
alerts better than GHOST_WINDOWS.

If this works out, I'll make this telemetry measure permanent and
remove GHOST_WINDOWS.

MozReview-Commit-ID: 11ma1lLGz5L

--HG--
extra : rebase_source : dc7705d288d3301fc0a1ec15f8dadfb66fe8820f
2018-04-18 11:56:53 -07:00
Cameron McCormack 9e26b4d88e Bug 1375536 - Remove nsStyleVariables. r=emilio,xidorn
MozReview-Commit-ID: BqyhXc4W4Aq

--HG--
extra : rebase_source : f2e00ba1e52437a9e7041aa35e2095038812fc4d
2018-04-10 15:11:12 +10:00
Xidorn Quan afea770358 Bug 1448728 part 3 - Remove mention of servo in memory report as it's the only style system now. r=njn
MozReview-Commit-ID: CJl0LboV1Gj

--HG--
extra : source : e468e93bc9cf4171197f79fa7db6b5ac6bfc07ea
2018-03-28 10:44:49 +11:00
Xidorn Quan 160053e9ab Bug 1448728 part 2 - Remove style sizes for the old style system from nsWindowSizes.h. r=njn
MozReview-Commit-ID: 5FqJWoCjlto

--HG--
extra : source : 261d5942b8ee9fb178726bef0691d6ec70e72b6c
2018-03-28 10:44:49 +11:00
Jonathan Watt 82ebebe276 Bug 1448714 - Fix up comments referring to 'style context' after the rename of nsStyleContext. r=emilio 2018-03-23 13:49:21 +00:00
Emilio Cobos Álvarez 152f1f8377 Bug 1448526: followup: Fix remaining macro declaration on a CLOSED TREE. r=me
MozReview-Commit-ID: X2Sx55WbWt
2018-03-26 11:50:38 +02:00
Xidorn Quan 051a0fc278 Bug 1448526 part 2 - Make nsStyleStructList.h not generated. r=emilio
nsStyleStructList.h was initially made generated in bug 873368 to avoid
manually maintaining boilerplate for if-dispatch, while the if-dispatch
was replaced by jump table in bug 1171842, so the boilerplate went away.

However, in bug 1122781 (before bug 1171842), boilerplate for dependency
check, so it still needs to be generated.

The dependency table is removed in the previous patch, so we no longer
have any boilerplate in the style struct list, and thus it doesn't need
to be generated anymore.

MozReview-Commit-ID: GkbJZ98ojbE

--HG--
extra : rebase_source : a148b97c051bb6c88846cf6ba617c4edef70ca24
extra : source : f1c7d19cde195fb90ac2627d16ed69d020de01b9
2018-03-26 20:09:17 +11:00
Emilio Cobos Álvarez e341b20ec4 Bug 1447483: Merge nsStyleContext and ServoStyleContext, rename to ComputedStyle. r=jwatt on a CLOSED TREE
MozReview-Commit-ID: JPopq0LudD
2018-03-22 20:06:24 +01:00
Emilio Cobos Álvarez 5dd797f154 Back out changeset b683bb3f22a1 (Bug 1447483) for not landing with all the files. r=me on a CLOSED TREE
This reverts commit 1808914126bb9f9e4a82d2c3d7ac961885fe7d62.

MozReview-Commit-ID: 5skESBseEvo
2018-03-22 20:05:22 +01:00
Emilio Cobos Álvarez ca5ac79cca Bug 1447483: Merge nsStyleContext and ServoStyleContext, rename to ComputedStyle. r=jwatt
MozReview-Commit-ID: JPopq0LudD
2018-03-22 19:48:42 +01:00
Kris Maglione 38156094a4 Bug 1445551: Part 5 - Remove add-on path service. r=aswan,mccr8
The path service was created to allow us to track resources that were part of
legacy add-ons, and to map URIs ponting to those resources to add-on IDs, so
that we could apply special behavior to them.

We have better ways to track resources belonging to WebExtensions, so this
code does not benefit them in any significant way.

The only remaining legacy extensions are system add-ons, which we control, and
do not need the path service in order to track.

MozReview-Commit-ID: BKXkcaM7jJx

--HG--
extra : rebase_source : c8cb0f7cec919b767bbcfe5433a6838523747676
2018-03-13 20:21:22 -07:00
Xidorn Quan d6a3786a64 Bug 1440221 - Track stale computed values and style structs held by undisplayed maps in memory report. r=emilio,njn
MozReview-Commit-ID: 8eXowQvUjyi

--HG--
extra : rebase_source : cb5ba6598e90d9600983aad7f1fff4ff361e8af7
2018-02-22 23:19:50 +11:00
Xidorn Quan a0c9e1acaa Bug 1438497 part 3 - Add XUL prototype cache to memory report. r=njn
MozReview-Commit-ID: 7CSEJKFkm7B

--HG--
extra : rebase_source : fe10ebd0d3b5538565e6e9692feb1cb993ef01a8
2018-02-19 21:07:44 +11:00
Xidorn Quan a23cb7d912 Bug 1438497 - Add bindings into memory report. r=bholley,njn
MozReview-Commit-ID: FrFEUlrqcs8

--HG--
extra : rebase_source : 4ead07cb6854ef816a1d6b31aa9028220a14ec89
2018-02-16 23:02:28 +11:00
Andrew McCreight c1683b8743 Bug 1360310 - Make ghost window reporter use tab groups instead of eTLD. r=bz
A ghost window is a window that is:
a) detached
b) we think it should have gone away
c) it has been in that state for a while

Right now, criterion b holds if the detached window does not have the
same eTLD as any window that is not detached. However, this can cause
false positives when a page leaks a cross-origin iframe.

This patch changes criterion b to be that it holds if the window is
not in the same tab group as any non-detached window. This should
match better with the goal of ghost windows, which is to identify when
pages don't go away after their tab is closed.

MozReview-Commit-ID: GG8d0WkXDUt

--HG--
extra : rebase_source : a9464b91bf565e2fe46062b4ce3b591b10e38f25
2017-11-08 09:48:54 -08:00
Nika Layzell 71760158e8 Bug 1414974 - Part 5: Rework nsWindowMemoryReporter to only examine inner windows, r=mccr8
MozReview-Commit-ID: 3be0C8OXSKo
2017-11-09 10:44:48 -05:00
Nika Layzell 3409141758 Bug 1414974 - Part 2: Switch many consumers to nsGlobalWindow{Inner,Outer}, r=smaug
This is a large patch which tries to switch many of the external consumers of
nsGlobalWindow to instead use the new Inner or Outer variants.

MozReview-Commit-ID: 99648Lm46T5
2017-11-09 10:44:47 -05:00
Kris Maglione 60d080b412 Bug 1404198: Part 2i - Switch to NS_NewTimer* in dom. r=njn
MozReview-Commit-ID: 8Oei6TuXNbu

--HG--
extra : rebase_source : 31c583c699790cbcf302064146d313ee8126ef0c
2017-10-15 23:15:40 -07:00
Chris Peterson 14c40f3dac Bug 1402666 - Part 1: Replace Replace("") with ReplaceLiteral(""). r=erahm
MozReview-Commit-ID: s2hrTSkBiJ

--HG--
extra : rebase_source : d3b3551ed7ed1d5c8f70fc98d72510a13868ada1
extra : source : 1c45e10702e7884cd536a25b1d39c3de90fd2914
2017-09-15 19:22:58 -07:00
Nicholas Nethercote 8134051ca0 Bug 1401456 - Streamline nsWindowMemoryReporter. r=erahm.
This patch tweaks the REPORT_* macros to include the repetitive code that
updates aWindowTotalSizes.

--HG--
extra : rebase_source : dcc3fa12b102fd36e993ecec3cc8a170fbc84b7c
2017-09-25 09:59:50 +10:00
Nicholas Nethercote 5036b9133e Bug 1400078 - Measure the UA cache. r=njn.
ServoStyleSetSizes now has two uses, one for the Stylist, and one for the UA
cache, and so the patch removes 'Stylist' from the field names.

Example output from about:memory:

> +----1,359,608 B (00.55%) -- layout
> |    +----756,488 B (00.31%) -- style-sheet-cache [2]
> |    +----393,968 B (00.16%) -- servo-ua-cache
> |    |    +--234,496 B (00.10%) -- element-and-pseudos-maps
> |    |    +---59,648 B (00.02%) -- revalidation-selectors
> |    |    +---58,320 B (00.02%) -- invalidation-map
> |    |    +---30,752 B (00.01%) -- other
> |    |    +---10,752 B (00.00%) -- precomputed-pseudos

MozReview-Commit-ID: 8oxuJO0ojp

--HG--
extra : rebase_source : 7d86216967259b71df7280261d025cc65bf00ba4
2017-09-19 09:25:00 +10:00
Nicholas Nethercote 5a4fba2531 Bug 1397472 - Measure ElementData. r=bholley.
We already measure (in Rust code) the things hanging off it, but overlooked the
object itself. This patch adds measurement on the C++ side.

--HG--
extra : rebase_source : f7daf62b4ec43cdc95034ffcb2a3aca27d995ae3
2017-09-09 00:12:25 +10:00
Nicholas Nethercote 5bd03193bd Bug 1397579 - Report stylesheet memory usage under "layout/style-sheets". r=heycam.
Currently it's not under "layout/", for no clear reason.
2017-09-07 14:36:42 +10:00
Eric Rahm c50f041b28 Bug 1376038 - Part 3: Combine ghost window reporter with window reporter. r=njn
This combines the GhostWindowsReporter with the nsWindowMemoryReporter. It has
the benefit of removing a reporter of a single value and also guarantees that
we use the latests ghost windows value that is calculated in
|nsWindowMemoryReporter::CollectReports| rather than a possibly cached value
from a previous run.

--HG--
extra : histedit_source : bef59afe7b79cae8050460ee1bdc4247daebc21f
2017-09-06 16:06:58 -07:00
Eric Rahm c56ea2d3d6 Bug 1376038 - Part 2: Cache base domains during ghost window calculation. r=mccr8
Avoid hitting the rather slow effective TLD service by caching results when
mapping URLs to their base domains. In testing the cache ranged from a 1:1 to
a 3:1 hit:miss ratio.

--HG--
extra : histedit_source : 9692a36bb32474b6de0a8291ceb9af7a19d221ff
2017-07-11 13:58:21 -07:00
Eric Rahm 197f29015a Bug 1376038 - Part 1: Use a cached ghost window value for the distinguished amount. r=mccr8
We already periodically calculate the ghost window amount after cycle
collection, this just uses a cached value of that for the distinguished amount.
This avoids the overhead of a recalculating the value when reporting telemetry.

--HG--
extra : histedit_source : 4ba3ee62fd2871a87970faca8a70b2284e83981d%2C9246ac39cea50c3bb0d1693d8e831c3b3ad33ad9
2017-07-11 13:58:20 -07:00
Nicholas Nethercote fb0b046a21 Bug 1387958 - Measure the stylist during memory reporting. r=heycam.
Example output from the Obama Wikipedia page:

> ├──2,315,600 B (01.16%) -- stylist
> │  ├──1,916,928 B (00.96%) ── invalidation-map
> │  ├────228,800 B (00.11%) ── rule-tree
> │  ├────142,336 B (00.07%) ── element-and-pseudos-maps
> │  ├─────14,336 B (00.01%) ── revalidation-selectors
> │  ├──────9,648 B (00.00%) ── other
> │  └──────3,552 B (00.00%) ── precomputed-pseudos

This change requires new code to measure HashMaps, which uses the new
'malloc_enclosing_size_of' functions that can measure a heap block from an
interior pointer.

The patch changes MallocSizeOfFn to a newtype, and introduces
MallocEnclosingSizeOfFn alongside.

It also adds new traits: MallocSizeOfBox, MallocSizeOfVec, MallocSizeOfHash.
These each contain a single method that does shallow measurement of the
relevant type, which is often useful. (This is a different style to the
existing MallocSizeOf trait, which does deep measurement, but I'm moving away
from the always-deep-measurement style because it's less flexible.)

MozReview-Commit-ID: FgJCCmdw0ZF

--HG--
extra : rebase_source : c692c2073aa66020224489b97247c49de95a99a4
2017-09-05 11:38:45 +10:00
Nicholas Nethercote 9251ef42b7 Bug 1394729 - Measure memory usage of Stylo's Rule Tree. r=heycam.
This patch splits up the existing "layout/style-sets" measurement into
"layout/gecko-style-sets", or "layout/servo-style-sets/stylist/rule-tree" and
"layout/servo-style-sets/other". (Additional things will be measured under
"layout/servo-style-sets/" later, such as cascade data.)

This requires introducing a new type, ServoStyleSetSizes, for transferring the
multiple measurements from Rust code to C++ code.

MozReview-Commit-ID: FbmzpsjBpgI

--HG--
extra : rebase_source : f2d1441705139e6674d355792255302fcd89f748
2017-08-30 18:21:26 +10:00
Nicholas Nethercote ccabc0fa19 Bug 1393636 (part 5) - Report memory usage of Gecko style structs separately. r=heycam.
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.

MozReview-Commit-ID: 3hrkobxbX9b

--HG--
extra : rebase_source : f6b29bd7cb9bd60f2da65f5f907e161299333287
2017-08-25 14:59:44 +10:00
Nicholas Nethercote f2751f3072 Bug 1393636 (part 4) - Move ComputedValues measurements from nsStyleSizes to nsWindowSizes. r=heycam.
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.

MozReview-Commit-ID: BOnQSzzV0vC

--HG--
extra : rebase_source : 025c6161e509401a36525349083dd98bfda35621
2017-08-25 14:50:26 +10:00
Nicholas Nethercote 5c0934aaae Bug 1393636 (part 2) - Add "window-objects/dom/performance" memory report. r=heycam.
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.

MozReview-Commit-ID: 41ZcPC3seFc

--HG--
extra : rebase_source : fb4ed30ba3312e2c3fb5e1f9b186726c5ec2cd0f
2017-08-25 14:44:24 +10:00
Nicholas Nethercote 2f049cbd6c Bug 1393636 (part 1) - Reorder nsWindowSizes reporting. r=heycam.
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.)

MozReview-Commit-ID: Eu9Y078VNp

--HG--
extra : rebase_source : 95f31034a39c1057115ec4ea825ea33a774d5388
2017-08-25 14:43:29 +10:00
Nicholas Nethercote ac72ddb583 Bug 1390760 - Measure ServoComputedData::visited_style. r=bholley.
For the Obama wikipedia page, this covers about 85% of the unmeasured
ComputedValues structs. The about:memory output looks like this:

> +---2,443,648 B (02.41%) -- computed-values
> |   +--1,088,272 B (01.07%) -- dom
> |   +----945,744 B (00.93%) -- non-dom
> |   +----409,632 B (00.40%) -- visited

I'm not sure why some CVs are still being missed.

MozReview-Commit-ID: 1bYWwSi4ihn

--HG--
extra : rebase_source : 14e4bd36a54bbbd8fd265f559704bec5a5e3b154
2017-08-21 16:07:16 +10:00
Nicholas Nethercote 57c26c9834 Bug 1387956 - Overhaul ComputedValues measurement, and add style structs measurement. r=bholley.
This patch moves measurement of ComputedValues objects from Rust to C++.
Measurement now happens (a) via DOM elements and (b) remaining elements via
the frame tree. Likewise for the style structs hanging off ComputedValues
objects.

Here is an example of the output.

> ├──27,600,448 B (26.49%) -- active/window(https://en.wikipedia.org/wiki/Barack_Obama)
> │  ├──12,772,544 B (12.26%) -- layout
> │  │  ├───4,483,744 B (04.30%) -- frames
> │  │  │   ├──1,653,552 B (01.59%) ── nsInlineFrame
> │  │  │   ├──1,415,760 B (01.36%) ── nsTextFrame
> │  │  │   ├────431,376 B (00.41%) ── nsBlockFrame
> │  │  │   ├────340,560 B (00.33%) ── nsHTMLScrollFrame
> │  │  │   ├────302,544 B (00.29%) ── nsContinuingTextFrame
> │  │  │   ├────156,408 B (00.15%) ── nsBulletFrame
> │  │  │   ├─────73,024 B (00.07%) ── nsPlaceholderFrame
> │  │  │   ├─────27,656 B (00.03%) ── sundries
> │  │  │   ├─────23,520 B (00.02%) ── nsTableCellFrame
> │  │  │   ├─────16,704 B (00.02%) ── nsImageFrame
> │  │  │   ├─────15,488 B (00.01%) ── nsTableRowFrame
> │  │  │   ├─────13,776 B (00.01%) ── nsTableColFrame
> │  │  │   └─────13,376 B (00.01%) ── nsTableFrame
> │  │  ├───3,412,192 B (03.28%) -- servo-style-structs
> │  │  │   ├──1,288,224 B (01.24%) ── Display
> │  │  │   ├────742,400 B (00.71%) ── Position
> │  │  │   ├────308,736 B (00.30%) ── Font
> │  │  │   ├────226,512 B (00.22%) ── Background
> │  │  │   ├────218,304 B (00.21%) ── TextReset
> │  │  │   ├────214,896 B (00.21%) ── Text
> │  │  │   ├────130,560 B (00.13%) ── Border
> │  │  │   ├─────81,408 B (00.08%) ── UIReset
> │  │  │   ├─────61,440 B (00.06%) ── Padding
> │  │  │   ├─────38,176 B (00.04%) ── UserInterface
> │  │  │   ├─────29,232 B (00.03%) ── Margin
> │  │  │   ├─────21,824 B (00.02%) ── sundries
> │  │  │   ├─────20,080 B (00.02%) ── Color
> │  │  │   ├─────20,080 B (00.02%) ── Column
> │  │  │   └─────10,320 B (00.01%) ── Effects
> │  │  ├───2,227,680 B (02.14%) -- computed-values
> │  │  │   ├──1,182,928 B (01.14%) ── non-dom
> │  │  │   └──1,044,752 B (01.00%) ── dom
> │  │  ├───1,500,016 B (01.44%) ── text-runs
> │  │  ├─────492,640 B (00.47%) ── line-boxes
> │  │  ├─────326,688 B (00.31%) ── frame-properties
> │  │  ├─────301,760 B (00.29%) ── pres-shell
> │  │  ├──────27,648 B (00.03%) ── pres-contexts
> │  │  └─────────176 B (00.00%) ── style-sets

The 'servo-style-structs' and 'computed-values' sub-trees are new. (Prior to
this patch, ComputedValues under DOM elements were tallied under the the
'dom/element-nodes' sub-tree, and ComputedValues not under DOM element were
ignored.) 'servo-style-structs/sundries' aggregates all the style structs that
are smaller than 8 KiB.

Other notable things done by the patch are as follows.

- It significantly changes the signatures of the methods measuring nsINode and
  its subclasses, in order to handle the tallying of style structs separately
  from element-nodes. Likewise for nsIFrame.

- It renames the 'layout/style-structs' sub-tree as
  'layout/gecko-style-structs', to clearly distinguish it from the new
  'layout/servo-style-structs' sub-tree.

- It adds some FFI functions to access various Rust-side data structures from
  C++ code.

- There is a nasty hack used twice to measure Arcs, by stepping backwards from
  an interior pointer to a base pointer. It works, but I want to replace it
  with something better eventually. The "XXX WARNING" comments have details.

- It makes DMD print a line to the console if it sees a pointer it doesn't
  recognise. This is useful for detecting when we are measuring an interior
  pointer instead of a base pointer, which is bad but easy to do when Arcs are
  involved.

- It removes the Rust code for measuring CVs, because it's now all done on the
  C++ side.

MozReview-Commit-ID: BKebACLKtCi

--HG--
extra : rebase_source : 4d9a8c6b198a0ff025b811759a6bfa9f33a260ba
2017-08-11 16:37:33 +10:00
Nicholas Nethercote 9ab2597a8d Bug 1387956 (part 2) - Overhaul handling of nsWindowSizes. r=mccr8.
This patch does the following.

- Moves nsWindowSizes from nsWindowMemoryReporter.h to its own file,
  nsWindowSizes.h, so it can be included more widely without exposing
  nsWindowMemoryReporter.

- Merges nsArenaMemoryStats.h (which defines nsTabSizes and nsArenaMemoryStats)
  into nsWindowSizes.h.

- Renames nsArenaMemoryStats as nsArenaSizes, and nsWindowSizes::mArenaStats as
  nsWindowSizes::mArenaSizes. This is the more usual naming scheme for such
  types.

- Renames FRAME_ID_STAT_FIELD as NS_ARENA_SIZES_FIELD.

- Passes nsWindowSizes to PresShell::AddSizeOfIncludingThis() and
  nsPresArena::AddSizeOfExcludingThis(), instead of a bunch of smaller things.
  One nice consequence is that the odd nsArenaMemoryStats::mOther field is no
  longer necessary, because we can update nsWindowSizes::mLayoutPresShellSize
  directly in nsPresArena::AddSizeOfExcludingThis().

- Adds |const| to a few methods.

MozReview-Commit-ID: EpgFWKFqy7Y
2017-08-10 14:14:09 +10:00
Nicholas Nethercote 764c284800 Bug 1387956 (part 1) - Change |nsWindowSizes*| arguments to |nsWindowSizes&|. r=mccr8.
This makes it clear they are never null.

MozReview-Commit-ID: H4i8uqZs48H

--HG--
extra : rebase_source : c7ada64881f015c68eaee2fbfad901f806cab833
2017-08-10 14:13:22 +10:00
Ryan VanderMeulen cc7a4548cc Backed out 3 changesets (bug 1376038) to see if it affects the ghost window numbers in bug 1388111.
Backed out changeset b89df6ea668a (bug 1376038)
Backed out changeset ae6472c17577 (bug 1376038)
Backed out changeset 8c99b4e8e6c1 (bug 1376038)
2017-08-07 21:11:42 -04:00
Ryan VanderMeulen 49ca431715 Backed out changeset c8f400fc23a7 (bug 1384337) 2017-08-07 21:10:28 -04:00