diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2017-08-31 00:31:31 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-08-31 00:31:31 -0500 |
commit | d795ceae17b2ce5346d4f211f73c62e5c25dce79 (patch) | |
tree | fa09e6aea66f66c58c0c207c80daaf041348bf95 /components/style/gecko/generated/structs_debug.rs | |
parent | 5624c0e3f16e0057bb228627eaf9018ef88e7786 (diff) | |
parent | e08829703afe44fffb2940ceaddd2b893647ea48 (diff) | |
download | servo-d795ceae17b2ce5346d4f211f73c62e5c25dce79.tar.gz servo-d795ceae17b2ce5346d4f211f73c62e5c25dce79.zip |
Auto merge of #18310 - nnethercote:bug-1394729, r=heycam
Measure memory usage of Stylo's Rule Tree.
<!-- Please describe your changes on the following line: -->
This is for https://bugzilla.mozilla.org/show_bug.cgi?id=1394729, which was r=heycam.
---
<!-- 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 tests exist in Gecko.
<!-- 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/18310)
<!-- Reviewable:end -->
Diffstat (limited to 'components/style/gecko/generated/structs_debug.rs')
-rw-r--r-- | components/style/gecko/generated/structs_debug.rs | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/components/style/gecko/generated/structs_debug.rs b/components/style/gecko/generated/structs_debug.rs index ff7d3d0436d..ba87266ca7d 100644 --- a/components/style/gecko/generated/structs_debug.rs +++ b/components/style/gecko/generated/structs_debug.rs @@ -5456,6 +5456,38 @@ pub mod root { "Alignment of field: " , stringify ! ( GeckoEffects ) , "::" , stringify ! ( gecko ) )); } + #[repr(C)] + #[derive(Debug, Copy)] + pub struct ServoStyleSetSizes { + pub mStylistRuleTree: usize, + pub mOther: usize, + } + #[test] + fn bindgen_test_layout_ServoStyleSetSizes() { + assert_eq!(::std::mem::size_of::<ServoStyleSetSizes>() , 16usize , + concat ! ( + "Size of: " , stringify ! ( ServoStyleSetSizes ) )); + assert_eq! (::std::mem::align_of::<ServoStyleSetSizes>() , 8usize + , concat ! ( + "Alignment of " , stringify ! ( ServoStyleSetSizes ) + )); + assert_eq! (unsafe { + & ( * ( 0 as * const ServoStyleSetSizes ) ) . + mStylistRuleTree as * const _ as usize } , 0usize , + concat ! ( + "Alignment of field: " , stringify ! ( + ServoStyleSetSizes ) , "::" , stringify ! ( + mStylistRuleTree ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const ServoStyleSetSizes ) ) . mOther + as * const _ as usize } , 8usize , concat ! ( + "Alignment of field: " , stringify ! ( + ServoStyleSetSizes ) , "::" , stringify ! ( mOther ) + )); + } + impl Clone for ServoStyleSetSizes { + fn clone(&self) -> Self { *self } + } #[repr(u8)] /// Enumeration that represents one of the two supported style system backends. #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] |