aboutsummaryrefslogtreecommitdiffstats
path: root/components/profile
diff options
context:
space:
mode:
Diffstat (limited to 'components/profile')
-rw-r--r--components/profile/Cargo.toml8
-rw-r--r--components/profile/lib.rs16
-rw-r--r--components/profile/mem.rs2
-rw-r--r--components/profile/time.rs2
4 files changed, 7 insertions, 21 deletions
diff --git a/components/profile/Cargo.toml b/components/profile/Cargo.toml
index d9b3a14aecb..6008c31b10f 100644
--- a/components/profile/Cargo.toml
+++ b/components/profile/Cargo.toml
@@ -1,3 +1,5 @@
+cargo-features = ["rename-dependency"]
+
[package]
name = "profile"
version = "0.0.1"
@@ -11,7 +13,7 @@ name = "profile"
path = "lib.rs"
[features]
-unstable = ["jemalloc-sys"]
+unstable = ["servo_allocator"]
[dependencies]
profile_traits = {path = "../profile_traits"}
@@ -22,7 +24,7 @@ log = "0.4"
serde = "1.0"
serde_json = "1.0"
servo_config = {path = "../config"}
-time = "0.1.12"
+time_crate = {package = "time", version = "0.1.12"}
tokio = "0.1"
[target.'cfg(target_os = "macos")'.dependencies]
@@ -33,4 +35,4 @@ regex = "1.0"
[target.'cfg(not(target_os = "windows"))'.dependencies]
libc = "0.2"
-jemalloc-sys = {version = "0.1.3", optional = true}
+servo_allocator = {path = "../allocator", optional = true}
diff --git a/components/profile/lib.rs b/components/profile/lib.rs
index 248fd0ab19b..b9c6085be46 100644
--- a/components/profile/lib.rs
+++ b/components/profile/lib.rs
@@ -4,28 +4,12 @@
#![deny(unsafe_code)]
-#[allow(unused_extern_crates)]
-extern crate heartbeats_simple;
-extern crate influent;
-extern crate ipc_channel;
-#[cfg(all(feature = "unstable", not(target_os = "windows")))]
-extern crate jemalloc_sys;
-#[cfg(not(target_os = "windows"))]
-extern crate libc;
#[macro_use]
extern crate log;
#[macro_use]
extern crate profile_traits;
-#[cfg(target_os = "linux")]
-extern crate regex;
#[macro_use]
extern crate serde;
-extern crate serde_json;
-extern crate servo_config;
-#[cfg(target_os = "macos")]
-extern crate task_info;
-extern crate time as std_time;
-extern crate tokio;
#[allow(unsafe_code)]
mod heartbeats;
diff --git a/components/profile/mem.rs b/components/profile/mem.rs
index 8e6a86c59cd..7c60ba07b67 100644
--- a/components/profile/mem.rs
+++ b/components/profile/mem.rs
@@ -496,7 +496,7 @@ mod system_reporter {
}
#[cfg(all(feature = "unstable", not(target_os = "windows")))]
- use jemalloc_sys::mallctl;
+ use servo_allocator::jemalloc_sys::mallctl;
#[cfg(all(feature = "unstable", not(target_os = "windows")))]
fn jemalloc_stat(value_name: &str) -> Option<usize> {
diff --git a/components/profile/time.rs b/components/profile/time.rs
index 7cfdbcee14d..cd78fee4ed6 100644
--- a/components/profile/time.rs
+++ b/components/profile/time.rs
@@ -5,7 +5,6 @@
//! Timing functions.
use crate::heartbeats;
-use crate::std_time::precise_time_ns;
use crate::trace_dump::TraceDump;
use influent::client::{Client, Credentials};
use influent::create_client;
@@ -26,6 +25,7 @@ use std::io::{self, Write};
use std::path::Path;
use std::time::Duration;
use std::{f64, thread, u32, u64};
+use time_crate::precise_time_ns;
use tokio;
use tokio::prelude::Future;