Reorder imports

This commit is contained in:
Pyfisch 2018-11-06 20:38:02 +01:00
parent 4a947dd719
commit 9e92eb205a
546 changed files with 1968 additions and 1536 deletions

View file

@ -2,9 +2,9 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use self::synchronized_heartbeat::{heartbeat_window_callback, lock_and_work};
use heartbeats_simple::HeartbeatPow as Heartbeat;
use profile_traits::time::ProfilerCategory;
use self::synchronized_heartbeat::{heartbeat_window_callback, lock_and_work};
use servo_config::opts;
use std::collections::HashMap;
use std::env::var_os;
@ -139,12 +139,12 @@ fn log_heartbeat_records(hb: &mut Heartbeat) {
}
mod synchronized_heartbeat {
use super::log_heartbeat_records;
use heartbeats_simple::HeartbeatPow as Heartbeat;
use heartbeats_simple::HeartbeatPowContext as HeartbeatContext;
use profile_traits::time::ProfilerCategory;
use std::collections::HashMap;
use std::sync::atomic::{ATOMIC_BOOL_INIT, AtomicBool, Ordering};
use super::log_heartbeat_records;
use std::sync::atomic::{AtomicBool, Ordering, ATOMIC_BOOL_INIT};
static mut HBS: Option<*mut HashMap<ProfilerCategory, Heartbeat>> = None;

View file

@ -7,8 +7,8 @@
use crate::time::duration_from_seconds;
use ipc_channel::ipc::{self, IpcReceiver};
use ipc_channel::router::ROUTER;
use profile_traits::mem::{ProfilerChan, ProfilerMsg, ReportKind, Reporter, ReporterRequest};
use profile_traits::mem::ReportsChan;
use profile_traits::mem::{ProfilerChan, ProfilerMsg, ReportKind, Reporter, ReporterRequest};
use std::borrow::ToOwned;
use std::cmp::Ordering;
use std::collections::HashMap;
@ -386,10 +386,11 @@ impl ReportsForest {
//---------------------------------------------------------------------------
mod system_reporter {
#[cfg(all(feature = "unstable", not(target_os = "windows")))]
use libc::{c_void, size_t};
use super::{JEMALLOC_HEAP_ALLOCATED_STR, SYSTEM_HEAP_ALLOCATED_STR};
#[cfg(target_os = "linux")]
use libc::c_int;
#[cfg(all(feature = "unstable", not(target_os = "windows")))]
use libc::{c_void, size_t};
use profile_traits::mem::{Report, ReportKind, ReporterRequest};
#[cfg(all(feature = "unstable", not(target_os = "windows")))]
use std::ffi::CString;
@ -397,9 +398,8 @@ mod system_reporter {
use std::mem::size_of;
#[cfg(all(feature = "unstable", not(target_os = "windows")))]
use std::ptr::null_mut;
use super::{JEMALLOC_HEAP_ALLOCATED_STR, SYSTEM_HEAP_ALLOCATED_STR};
#[cfg(target_os = "macos")]
use task_info::task_basic_info::{virtual_size, resident_size};
use task_info::task_basic_info::{resident_size, virtual_size};
/// Collects global measurements from the OS and heap allocators.
pub fn collect_reports(request: ReporterRequest) {
@ -601,10 +601,10 @@ mod system_reporter {
#[cfg(target_os = "linux")]
fn resident_segments() -> Vec<(String, usize)> {
use regex::Regex;
use std::collections::HashMap;
use std::collections::hash_map::Entry;
use std::collections::HashMap;
use std::fs::File;
use std::io::{BufReader, BufRead};
use std::io::{BufRead, BufReader};
// The first line of an entry in /proc/<pid>/smaps looks just like an entry
// in /proc/<pid>/maps:

View file

@ -12,10 +12,11 @@ use influent::create_client;
use influent::measurement::{Measurement, Value};
use ipc_channel::ipc::{self, IpcReceiver};
use profile_traits::energy::{energy_interval_ms, read_energy_uj};
use profile_traits::time::{ProfilerCategory, ProfilerChan, ProfilerMsg, ProfilerData, TimerMetadata};
use profile_traits::time::{
ProfilerCategory, ProfilerChan, ProfilerData, ProfilerMsg, TimerMetadata,
};
use profile_traits::time::{TimerMetadataFrameType, TimerMetadataReflowType};
use servo_config::opts::OutputOptions;
use std::{f64, thread, u32, u64};
use std::borrow::ToOwned;
use std::cmp::Ordering;
use std::collections::BTreeMap;
@ -24,6 +25,7 @@ use std::fs::File;
use std::io::{self, Write};
use std::path::Path;
use std::time::Duration;
use std::{f64, thread, u32, u64};
use tokio;
use tokio::prelude::Future;