#[global_allocator] is stable

This commit is contained in:
Simon Sapin 2019-07-01 14:55:01 +02:00
parent eddfe3af83
commit 99669b0831
3 changed files with 8 additions and 12 deletions

View file

@ -10,9 +10,6 @@ publish = false
name = "profile" name = "profile"
path = "lib.rs" path = "lib.rs"
[features]
unstable = ["servo_allocator"]
[dependencies] [dependencies]
profile_traits = {path = "../profile_traits"} profile_traits = {path = "../profile_traits"}
influent = "0.5" influent = "0.5"
@ -33,4 +30,4 @@ regex = "1.1"
[target.'cfg(not(target_os = "windows"))'.dependencies] [target.'cfg(not(target_os = "windows"))'.dependencies]
libc = "0.2" libc = "0.2"
servo_allocator = {path = "../allocator", optional = true} servo_allocator = {path = "../allocator"}

View file

@ -389,14 +389,14 @@ mod system_reporter {
use super::{JEMALLOC_HEAP_ALLOCATED_STR, SYSTEM_HEAP_ALLOCATED_STR}; use super::{JEMALLOC_HEAP_ALLOCATED_STR, SYSTEM_HEAP_ALLOCATED_STR};
#[cfg(target_os = "linux")] #[cfg(target_os = "linux")]
use libc::c_int; use libc::c_int;
#[cfg(all(feature = "unstable", not(target_os = "windows")))] #[cfg(not(target_os = "windows"))]
use libc::{c_void, size_t}; use libc::{c_void, size_t};
use profile_traits::mem::{Report, ReportKind, ReporterRequest}; use profile_traits::mem::{Report, ReportKind, ReporterRequest};
#[cfg(all(feature = "unstable", not(target_os = "windows")))] #[cfg(not(target_os = "windows"))]
use std::ffi::CString; use std::ffi::CString;
#[cfg(all(feature = "unstable", not(target_os = "windows")))] #[cfg(not(target_os = "windows"))]
use std::mem::size_of; use std::mem::size_of;
#[cfg(all(feature = "unstable", not(target_os = "windows")))] #[cfg(not(target_os = "windows"))]
use std::ptr::null_mut; use std::ptr::null_mut;
#[cfg(target_os = "macos")] #[cfg(target_os = "macos")]
use task_info::task_basic_info::{resident_size, virtual_size}; use task_info::task_basic_info::{resident_size, virtual_size};
@ -495,10 +495,10 @@ mod system_reporter {
None None
} }
#[cfg(all(feature = "unstable", not(target_os = "windows")))] #[cfg(not(target_os = "windows"))]
use servo_allocator::jemalloc_sys::mallctl; use servo_allocator::jemalloc_sys::mallctl;
#[cfg(all(feature = "unstable", not(target_os = "windows")))] #[cfg(not(target_os = "windows"))]
fn jemalloc_stat(value_name: &str) -> Option<usize> { fn jemalloc_stat(value_name: &str) -> Option<usize> {
// Before we request the measurement of interest, we first send an "epoch" // Before we request the measurement of interest, we first send an "epoch"
// request. Without that jemalloc gives cached statistics(!) which can be // request. Without that jemalloc gives cached statistics(!) which can be
@ -545,7 +545,7 @@ mod system_reporter {
Some(value as usize) Some(value as usize)
} }
#[cfg(any(target_os = "windows", not(feature = "unstable")))] #[cfg(target_os = "windows")]
fn jemalloc_stat(_value_name: &str) -> Option<usize> { fn jemalloc_stat(_value_name: &str) -> Option<usize> {
None None
} }

View file

@ -28,7 +28,6 @@ no_static_freetype = ["webrender/no_static_freetype"]
oculusvr = ["webvr/oculusvr"] oculusvr = ["webvr/oculusvr"]
unstable = [ unstable = [
"euclid/unstable", "euclid/unstable",
"profile/unstable",
"script/unstable", "script/unstable",
] ]
webdriver = ["webdriver_server"] webdriver = ["webdriver_server"]