Auto merge of #18495 - nnethercote:derive-PropertyDeclaration, r=jdm

Measure PropertyDeclaration more thoroughly.

This patch replaces the handwritten MallocSizeOf implementation for
PropertyDeclaration with a derived one, which gives much more thorough
measurement.

This requires (a) deriving MallocSizeOf for a *lot* of additional types (most
of which already have `derive(HeapSizeOf)` in Servo builds), and (b)
implementing MallocSizeOf for a few more types in the `malloc_size_of` crate.

These changes would significantly improve the reporting coverage for gmail if
it weren't for the fact that SpecifiedUrl isn't measured due to a lack of
clarity about its fields; that can be fixed as a follow-up once bug 1397971 has
landed.

<!-- Please describe your changes on the following line: -->

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [ ] These changes fix #__ (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because testing is on the Gecko side.

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/18495)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2017-09-14 02:10:40 -05:00 committed by GitHub
commit 097cea240f
66 changed files with 302 additions and 59 deletions

5
Cargo.lock generated
View file

@ -1748,6 +1748,9 @@ dependencies = [
name = "malloc_size_of"
version = "0.0.1"
dependencies = [
"app_units 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)",
"cssparser 0.21.0 (registry+https://github.com/rust-lang/crates.io-index)",
"euclid 0.15.2 (registry+https://github.com/rust-lang/crates.io-index)",
"hashglobe 0.1.0",
"servo_arc 0.0.1",
"smallbitvec 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
@ -3212,6 +3215,8 @@ dependencies = [
"euclid 0.15.2 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"heapsize_derive 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
"malloc_size_of 0.0.1",
"malloc_size_of_derive 0.0.1",
"selectors 0.19.0",
"serde 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)",
"servo_atoms 0.0.1",