diff options
author | modal-d17 <modal-d17@github.com> | 2018-02-20 16:00:16 -0500 |
---|---|---|
committer | modal17 <modal17@github.com> | 2018-04-01 13:30:57 -0400 |
commit | af445a357d0429f68cad1bf12982c81e3a122bad (patch) | |
tree | 4c309857d4fbcd8d7b53519273b2ba52afcec2c1 /components/net/lib.rs | |
parent | d232705106478e0a2e5de78f8b40144408879c36 (diff) | |
download | servo-af445a357d0429f68cad1bf12982c81e3a122bad.tar.gz servo-af445a357d0429f68cad1bf12982c81e3a122bad.zip |
Measure cache memory usage (#19251):
Made the memory cache data structure derive MallocSizeOf, along with
manual size_of() implementations in malloc_size_of.
Added a Measurable struct that acts as a container for fields size_of() can be called for.
Added a new IpcReceiver used for listening to messages from the memory profiler,
and used run_with_memory reporting to register a memory reporter in the thread.
Now when a message from the memory profiler arrives, report includes sizes of public and private http caches.
Updated test file.
Diffstat (limited to 'components/net/lib.rs')
-rw-r--r-- | components/net/lib.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/components/net/lib.rs b/components/net/lib.rs index 666e7bdb2d5..d5dfbf74c4f 100644 --- a/components/net/lib.rs +++ b/components/net/lib.rs @@ -17,6 +17,8 @@ extern crate ipc_channel; #[macro_use] extern crate lazy_static; #[macro_use] extern crate log; +extern crate malloc_size_of; +#[macro_use] extern crate malloc_size_of_derive; #[macro_use] #[no_link] extern crate matches; #[macro_use] extern crate mime; @@ -24,9 +26,12 @@ extern crate mime_guess; extern crate msg; extern crate net_traits; extern crate openssl; +#[macro_use] extern crate profile_traits; #[macro_use] extern crate serde; extern crate serde_json; +extern crate servo_allocator; +extern crate servo_arc; extern crate servo_config; extern crate servo_url; extern crate time; |