Commit Graph

17 Commits

Author SHA1 Message Date
Manish Goregaokar
4e69fca2a2 servo: Merge #18995 - Revert all hashmap diagnostics changes (from Manishearth:rm-diagnostics); r=emilio
We don't need them anymore

Source-Repo: https://github.com/servo/servo
Source-Revision: 69b9c221f65243562a5dc54cba45a083d1d046cc

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : fa9cedf5cb5224af165963f07b16a1ab5ac24469
2017-10-23 19:00:24 -05:00
Manish Goregaokar
9a4066a31d servo: Merge #18977 - Include map length in diagnostics (from Manishearth:map-len); r=Gankro
If this doesn't match with the size it's more likely for anything caught
t be hardware corruption. If it does the situation is more interesting.

Source-Repo: https://github.com/servo/servo
Source-Revision: ba9af5c124935734437b9258c3bdb5fee1e487a0

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 23fdab8eaae62883df3d3a42a5b120c1e46dbb64
2017-10-20 18:52:54 -05:00
Nicholas Nethercote
5a62942911 servo: Merge #18938 - Replace all uses of the heapsize crate with malloc_size_of (from nnethercote:bug-1409255); r=SimonSapin
Servo currently uses `heapsize`, but Stylo/Gecko use `malloc_size_of`.
`malloc_size_of` is better -- it handles various cases that `heapsize` does not
-- so this patch changes Servo to use `malloc_size_of`.

This patch makes the following changes to the `malloc_size_of` crate.

- Adds `MallocSizeOf` trait implementations for numerous types, some built-in
  (e.g. `VecDeque`), some external and Servo-only (e.g. `string_cache`).

- Makes `enclosing_size_of_op` optional, because vanilla jemalloc doesn't
  support that operation.

- For `HashSet`/`HashMap`, falls back to a computed estimate when
  `enclosing_size_of_op` isn't available.

- Adds an extern "C" `malloc_size_of` function that does the actual heap
  measurement; this is based on the same functions from the `heapsize` crate.

This patch makes the following changes elsewhere.

- Converts all the uses of `heapsize` to instead use `malloc_size_of`.

- Disables the "heapsize"/"heap_size" feature for the external crates that
  provide it.

- Removes the `HeapSizeOf` implementation from `hashglobe`.

- Adds `ignore` annotations to a few `Rc`/`Arc`, because `malloc_size_of`
  doesn't derive those types, unlike `heapsize`.

<!-- 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 https://bugzilla.mozilla.org/show_bug.cgi?id=1409255

<!-- Either: -->
- [ ] There are tests for these changes OR
- [ ] 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. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: 4c538b642e4bdfbf42c522c5a59c258a6d14546e

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : f9a6feed1088d0b0be2b55d7f0c2ec9c594ac33b
2017-10-18 13:56:05 -05:00
Xidorn Quan
85b882aef9 servo: Merge #18861 - Some fixes to diagnostic hashmap (from upsuper:diagnose-fix); r=Manishearth
Source-Repo: https://github.com/servo/servo
Source-Revision: ec00c660f0a1892033ca89a31d393427d3c6a2d3

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 5ff695c2c2c0a938223da1b7ef7096e44e246e2e
2017-10-13 02:11:55 -05:00
Bobby Holley
a5771a57cb servo: Merge #18829 - Verify in DiagnosticHashMap::drop (from bholley:verify_in_drop); r=Manishearth
This will let us reason better about the drop_in_place crashes.

Source-Repo: https://github.com/servo/servo
Source-Revision: 882b22b6068826f49e8279910784db8b3ebb61f0

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 333c60a2e9fe2dd23e4032acbf7ffb71998b4d0d
2017-10-11 13:53:01 -05:00
Bobby Holley
37b2d10987 servo: Merge #18822 - More hashmap diagnostics (from bholley:more_hashmap_diagnostics); r=Manishearth
https://bugzilla.mozilla.org/show_bug.cgi?id=1407080

Source-Repo: https://github.com/servo/servo
Source-Revision: be5839fae6444c5134faa67e43c44d4d277a778a

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 74b3d6e1dbc8a3a27cda5f1dc7364c61d20f9bca
2017-10-10 16:17:20 -05:00
Bobby Holley
2b9d87e53c servo: Merge #18789 - Assert more things in hashtables (from bholley:more_hashmap_asserts); r=Manishearth
https://bugzilla.mozilla.org/show_bug.cgi?id=1406815

Source-Repo: https://github.com/servo/servo
Source-Revision: 49376c9e544c6b3f0d340dff0450ad3267219428

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : bd5bd5b614114c1e46c1446a0534cc7e48e84d91
2017-10-09 02:04:17 -05:00
Bobby Holley
eb2f43263b servo: Merge #18779 - DiagnosticHashMap (from bholley:canary_and_journal); r=Manishearth
https://bugzilla.mozilla.org/show_bug.cgi?id=1405879

Source-Repo: https://github.com/servo/servo
Source-Revision: 3f4afbafab7c0a8bfcf596ea444269bb01af3955

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 10b36c80557ca2591954a3400f1812629865ac54
2017-10-07 14:55:03 -05:00
Bobby Holley
64bac56a29 servo: Merge #18751 - Poison hashtable buffers (from bholley:poison_hashtable); r=Manishearth
This gives us extra defense in depth.

Source-Repo: https://github.com/servo/servo
Source-Revision: 2bbc458c5b2ad44d008cfa57415fe41d1a7ada5e

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : b4c8722fd8a88da9c8d3f21b600085da637e9a9e
2017-10-04 23:54:56 -05:00
Manish Goregaokar
5e35e3886f servo: Merge #18712 - stylo: use FnvHashMap everywhere, remove default HashMap construction methods (from Manishearth:fnv); r=bholley
r=bholley bug 1385971

Source-Repo: https://github.com/servo/servo
Source-Revision: 89724c6b32c6c0b7673df6d5b735e057a392f51b

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 83c9102c7fc7c6339ee9d5d0e31d645f39a85428
2017-10-03 18:47:46 -05:00
Bobby Holley
ff4aa007bc servo: Merge #18732 - Revert #18668 - Add mprotect diagnostics for HashMap crash (except for round-up-to-page behavior) (from bholley:revert_mprotect_diagnostics); r=bholley
These diagnostics have served their purpose, time to remove them.

https://bugzilla.mozilla.org/show_bug.cgi?id=1403397

Source-Repo: https://github.com/servo/servo
Source-Revision: 0b69887387567d1bbaa93fe874014a925ef9fe05

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 048d7a45ecf6d963209a252d4dbde30a5e890489
2017-10-03 14:45:33 -05:00
Julian Seward
44781caca8 servo: Merge #18661 - Bug 1400754 - stylo: crash on Win64 Asan build. r=manishearth, dmajor (from julian-seward1:master); r=emilio
* adds a hashglobe::alloc::realloc, as that was previously not implemented,
  copying and simplifying from liballoc_system.

* routes malloc and realloc calls through hashglobe::alloc::, instead of
  doing it via direct 'extern "C"' calls.

* removes the #[cfg(feature = "known_system_malloc")] markings in
  fallible/lib.rs (the fallible vec stuff) on the assumption that we no
  longer need to special-case these uses.

<!-- 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: -->
- [ ] `./mach build -d` does not report any errors
- [ ] `./mach test-tidy` does not report any errors
- [ ] These changes fix #__ (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because _____

<!-- 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. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: 04de056cde3c2626e2c8a4910dd69c9b5f9a5e11

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 02222d67a19928ce374fc93ac1b31a8503b5e062
2017-10-03 06:06:14 -05:00
Bobby Holley
32026a5fa7 servo: Merge #18668 - Add mprotect diagnostics for HashMap crash (from bholley:mprotect_diagnostics); r=Manishearth
https://bugzilla.mozilla.org/show_bug.cgi?id=1403397

Source-Repo: https://github.com/servo/servo
Source-Revision: 5d2ac4aa2e746daf312198278369686627360895

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 5f5fa574e740c8e60766c5c1220d3955dbef05ea
2017-09-28 19:10:46 -05:00
Julian Seward
78b2118921 servo: Merge #18460 - Bug 1398593 - stylo: mitigate performance impact of fallible allocati… (from julian-seward1:master); r=emilio
…on on stylist rebuilds.  r=emilio.

<!-- 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: -->
- [ ] `./mach build -d` does not report any errors
- [ ] `./mach test-tidy` does not report any errors
- [ ] These changes fix #__ (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because _____

<!-- 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. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: 66778851a80d3227e396c1d6d35c585265327f57

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 71727d18a8f93c7d53cdafd9759ab85d07584a34
2017-09-12 15:25:52 -05:00
Emilio Cobos Álvarez
1a0185ad38 servo: Merge #18434 - Bug 1395064 - stylo: Add uses of fallible Vec, SmallVec and HashMap f… (from julian-seward1:master); r=bholley
…acilities.  r=emilio@crisal.io.

<!-- 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: -->
- [ ] `./mach build -d` does not report any errors
- [ ] `./mach test-tidy` does not report any errors
- [ ] These changes fix #__ (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because _____

<!-- 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. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: be804a8155b0a942324f564df569233d13c97dcd

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : b0279b7e9545549faa5975eae219c30085005d8d
2017-09-10 12:30:39 -05:00
Manish Goregaokar
b382487faa servo: Merge #18385 - Clean imports in hashglobe (from Manishearth:clean-imports); r=mbrubeck
Source-Repo: https://github.com/servo/servo
Source-Revision: f29fd7757396e8763753215b8e7d82cb437f8f5a

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 993da1529e834001ab485e10a08444485bf445df
2017-09-06 00:32:53 -05:00
Manish Goregaokar
5617e0da7b servo: Merge #18334 - Add fallible hashmaps from HashGlobe for stylo (from Manishearth:hashglobe); r=emilio,Gankro
HashGlobe code is r=emilio,Gankro

integration code is r=emilio from https://bugzilla.mozilla.org/show_bug.cgi?id=1393656

Source-Repo: https://github.com/servo/servo
Source-Revision: ac7cf536927a42a5cece379c53d6f39813a77d71

--HG--
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : cfe64a9acc5c8dbb187af4eae03510c18bdbe9c4
2017-09-01 16:09:53 -05:00