Commit graph

45 commits

Author SHA1 Message Date
Bastien Orivel
570d865065 Bump ipc-channel and bincode
This required bumping uuid too which unfortunately duplicated rand.
2018-03-21 13:05:47 +01:00
Emilio Cobos Álvarez
25868beabd
style: Back out ordermap.
It was worth a shot!
2018-02-12 12:20:46 +01:00
janczer
661d234c3c Change debug assertions to specific ones 2018-02-07 09:21:24 +01:00
Emilio Cobos Álvarez
a2c2d34753
hashglobe: Add a shim on top of OrderMap. 2018-01-31 15:14:30 +01:00
CYBAI
73bc7a81e9 Use specific negative assertion for hashglobe hash set 2018-01-26 01:55:12 +08:00
CYBAI
d4d32c9962 Use specific negative assertion for hashglobe hash map 2018-01-26 01:54:55 +08:00
Simon Sapin
4be3096040 Add some FIXME comments about using ptr::NonNull 2018-01-22 17:41:26 +01:00
Boris Chiou
aebe2cfac2 Dump the requested aligment if out of memory while allocating a table. 2018-01-02 11:31:03 +08:00
tigercosmos
6d6491e814 deny warnings 2017-12-22 03:34:11 +08:00
Emilio Cobos Álvarez
6c37edf602
hashglobe: Use ? on Option more often. 2017-12-09 20:27:02 +01:00
Boris Chiou
cfe6451d8e hashglobe: Dump more information if out of memory while allocating a table.
Sometimes, we got a crash message:
"called `Result::unwrap()` on an `Err` value: FailedAllocationError {
reason: "out of memory when allocating RawTable" }" on stylo, but
this is not enough to debug, so let's add one more field in
FailedAllocationError, so we can know the size we are allocating.
2017-12-06 16:37:14 +08:00
Bobby Holley
3cffc8c427 Revert "Poison hashtable buffers."
This reverts commit c866486b99.
2017-10-23 13:51:51 -07:00
Manish Goregaokar
b118ba72d0 Revert "Diagnostic map semantics."
This reverts commit f5c5be00a7.
2017-10-23 13:51:08 -07:00
Manish Goregaokar
d6bafde971 Revert "Add canary and journaling."
This reverts commit 58322d0021.
2017-10-23 13:46:05 -07:00
Manish Goregaokar
f7ad19f500 Revert "Assert more things in hashtables."
This reverts commit e5023a3eb4.
2017-10-23 13:45:57 -07:00
Manish Goregaokar
fde96d0ff5 Revert "Stuff HashMap journal into a string and verify invariants in a few more places."
This reverts commit 4b64390b81.
2017-10-23 13:45:48 -07:00
Manish Goregaokar
f98f83ceb3 Revert "Verify in DiagnosticHashMap::drop."
This reverts commit c9b5ffb586.
2017-10-23 13:45:38 -07:00
Manish Goregaokar
f9eff7f546 Revert "Write poison to canary when removing item from diagnostic hashmap"
This reverts commit b547e96b44.
2017-10-23 13:45:17 -07:00
Manish Goregaokar
2931e71d40 Revert "Correct the position and record count of broken canary"
This reverts commit cb2772b46c.
2017-10-23 13:45:09 -07:00
Manish Goregaokar
d48aa12b8d Revert "Report hash value at HashMap corruption location."
This reverts commit f7f898b3b3.
2017-10-23 13:44:58 -07:00
Manish Goregaokar
bf69d1b460 Revert "Include map length in diagnostics"
This reverts commit a10329f8ff.
2017-10-23 13:44:47 -07:00
Manish Goregaokar
a10329f8ff Include map length in diagnostics 2017-10-20 16:31:42 -07:00
Alexis Beingessner
f7f898b3b3
Report hash value at HashMap corruption location. 2017-10-20 15:15:22 +02:00
Nicholas Nethercote
4506f0d30c Replace all uses of the heapsize crate with malloc_size_of.
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`.
2017-10-18 22:20:37 +11:00
Xidorn Quan
cb2772b46c Correct the position and record count of broken canary 2017-10-13 15:39:07 +11:00
Xidorn Quan
b547e96b44 Write poison to canary when removing item from diagnostic hashmap 2017-10-13 15:19:55 +11:00
Bobby Holley
c9b5ffb586 Verify in DiagnosticHashMap::drop. 2017-10-11 10:24:00 -07:00
Bobby Holley
4b64390b81 Stuff HashMap journal into a string and verify invariants in a few more places.
The RegisterAppMemory approach isn't working for some reason.

MozReview-Commit-ID: GjGaq6GALI5
2017-10-10 14:16:56 -07:00
Bobby Holley
e5023a3eb4 Assert more things in hashtables.
MozReview-Commit-ID: H8jKywUewcZ
2017-10-08 22:40:34 -07:00
Bobby Holley
58322d0021 Add canary and journaling.
MozReview-Commit-ID: 582ZiTmcvgs
2017-10-07 12:54:17 -07:00
Bobby Holley
f5c5be00a7 Diagnostic map semantics.
MozReview-Commit-ID: C0a5g6xMPY0
2017-10-07 12:54:15 -07:00
Bobby Holley
c866486b99 Poison hashtable buffers.
MozReview-Commit-ID: 8uLGtFv6X4P
2017-10-04 15:59:04 -07:00
Manish Goregaokar
8bce37e6ba stylo: use FnvHashMap everywhere, remove default HashMap construction methods 2017-10-03 14:10:31 -07:00
Bobby Holley
15b866d8de Revert #18668 - Add mprotect diagnostics for HashMap crash 2017-10-03 12:44:26 -07:00
Julian Seward
419642a2bd Bug 1400754 - stylo: crash on Win64 Asan build. r=manishearth, dmajor.
* 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.
2017-10-02 20:53:23 +02:00
Bobby Holley
039fe176b9 Protect the hashmaps outside of rebuilds.
MozReview-Commit-ID: KACmfw4pZY2
2017-09-28 15:06:49 -07:00
Bobby Holley
ef042899d2 Round hashglobe allocations up to the nearest page size.
MozReview-Commit-ID: 34KFtcwCkBB
2017-09-28 15:06:48 -07:00
Bobby Holley
98f370130d Semantics for ProtectedHashMap.
MozReview-Commit-ID: K0m65uZi7iw
2017-09-28 14:13:01 -07:00
Julian Seward
e7e03fac7b Bug 1398593 - stylo: mitigate performance impact of fallible allocation on stylist rebuilds. r=emilio. 2017-09-12 15:18:49 +02:00
Emilio Cobos Álvarez
7a6b891a29
hashglobe: Inline error constructor so we don't pay a function call even when there's no error. 2017-09-10 16:57:09 +02:00
Julian Seward
c85633f48e
stylo: Add uses of fallible Vec, SmallVec and HashMap facilities.
Bug: 1395064
Reviewed-by: emilio
2017-09-10 16:42:06 +02:00
Manish Goregaokar
02fe616b86 Clean imports in hashglobe 2017-09-05 14:00:01 -07:00
Manish Goregaokar
3ddb1fda74 Tidy fixes 2017-09-01 09:53:18 -07:00
Manish Goregaokar
ce4e1e4194
stylo: Add appropriate traits to hashglobe::fake 2017-08-31 16:28:32 -07:00
Manish Goregaokar
5d3115fa8e Move to components/hashglobe 2017-08-31 15:17:02 -07:00