mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Strict import formatting (grouping and granularity) (#30325)
* strict imports formatting * Reformat all imports
This commit is contained in:
parent
413da4ca69
commit
aad2dccc9c
802 changed files with 6861 additions and 6395 deletions
|
@ -2,25 +2,24 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use crate::sampler::{NativeStack, Sampler};
|
||||
use crossbeam_channel::{after, never, select, unbounded, Receiver, Sender};
|
||||
use ipc_channel::ipc::{IpcReceiver, IpcSender};
|
||||
use ipc_channel::router::ROUTER;
|
||||
use log::warn;
|
||||
use msg::constellation_msg::MonitoredComponentId;
|
||||
use msg::constellation_msg::{
|
||||
BackgroundHangMonitor, BackgroundHangMonitorClone, BackgroundHangMonitorExitSignal,
|
||||
BackgroundHangMonitorRegister,
|
||||
};
|
||||
use msg::constellation_msg::{
|
||||
BackgroundHangMonitorControlMsg, HangAlert, HangAnnotation, HangMonitorAlert,
|
||||
};
|
||||
use std::cell::Cell;
|
||||
use std::collections::{HashMap, VecDeque};
|
||||
use std::sync::{Arc, Weak};
|
||||
use std::thread;
|
||||
use std::time::{Duration, Instant};
|
||||
|
||||
use crossbeam_channel::{after, never, select, unbounded, Receiver, Sender};
|
||||
use ipc_channel::ipc::{IpcReceiver, IpcSender};
|
||||
use ipc_channel::router::ROUTER;
|
||||
use log::warn;
|
||||
use msg::constellation_msg::{
|
||||
BackgroundHangMonitor, BackgroundHangMonitorClone, BackgroundHangMonitorControlMsg,
|
||||
BackgroundHangMonitorExitSignal, BackgroundHangMonitorRegister, HangAlert, HangAnnotation,
|
||||
HangMonitorAlert, MonitoredComponentId,
|
||||
};
|
||||
|
||||
use crate::sampler::{NativeStack, Sampler};
|
||||
|
||||
#[derive(Clone)]
|
||||
pub struct HangMonitorRegister {
|
||||
sender: Weak<Sender<(MonitoredComponentId, MonitoredComponentMsg)>>,
|
||||
|
|
|
@ -2,9 +2,10 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use std::ptr;
|
||||
|
||||
use backtrace;
|
||||
use msg::constellation_msg::{HangProfile, HangProfileSymbol};
|
||||
use std::ptr;
|
||||
|
||||
const MAX_NATIVE_FRAMES: usize = 1024;
|
||||
|
||||
|
|
|
@ -4,20 +4,18 @@
|
|||
|
||||
#![allow(unsafe_code)]
|
||||
|
||||
use crate::sampler::{NativeStack, Sampler};
|
||||
use std::cell::UnsafeCell;
|
||||
use std::sync::atomic::{AtomicPtr, Ordering};
|
||||
use std::{io, mem, process, ptr, thread};
|
||||
|
||||
use libc;
|
||||
use nix::sys::signal::{sigaction, SaFlags, SigAction, SigHandler, SigSet, Signal};
|
||||
use std::cell::UnsafeCell;
|
||||
use std::io;
|
||||
use std::mem;
|
||||
use std::process;
|
||||
use std::ptr;
|
||||
use std::sync::atomic::{AtomicPtr, Ordering};
|
||||
use std::thread;
|
||||
use unwind_sys::{
|
||||
unw_cursor_t, unw_get_reg, unw_init_local, unw_step, UNW_ESUCCESS, UNW_REG_IP, UNW_REG_SP,
|
||||
};
|
||||
|
||||
use crate::sampler::{NativeStack, Sampler};
|
||||
|
||||
// Hack to workaround broken libunwind pkg-config contents for <1.1-3ubuntu.1.
|
||||
// https://bugs.launchpad.net/ubuntu/+source/libunwind/+bug/1336912
|
||||
#[link(name = "lzma")]
|
||||
|
|
|
@ -2,11 +2,11 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use std::{panic, process};
|
||||
|
||||
use {libc, mach};
|
||||
|
||||
use crate::sampler::{Address, NativeStack, Registers, Sampler};
|
||||
use libc;
|
||||
use mach;
|
||||
use std::panic;
|
||||
use std::process;
|
||||
|
||||
type MonitoredThreadId = mach::mach_types::thread_act_t;
|
||||
|
||||
|
|
|
@ -4,21 +4,19 @@
|
|||
|
||||
#![allow(unused_imports)]
|
||||
|
||||
use background_hang_monitor::HangMonitorRegister;
|
||||
use ipc_channel::ipc;
|
||||
use msg::constellation_msg::ScriptHangAnnotation;
|
||||
use msg::constellation_msg::TEST_PIPELINE_ID;
|
||||
use msg::constellation_msg::{
|
||||
BackgroundHangMonitorControlMsg, BackgroundHangMonitorExitSignal, HangAlert, HangAnnotation,
|
||||
HangMonitorAlert,
|
||||
};
|
||||
use msg::constellation_msg::{MonitoredComponentId, MonitoredComponentType};
|
||||
use std::sync::atomic::{AtomicBool, Ordering};
|
||||
use std::sync::Arc;
|
||||
use std::sync::Mutex;
|
||||
use std::sync::{Arc, Mutex};
|
||||
use std::thread;
|
||||
use std::time::Duration;
|
||||
|
||||
use background_hang_monitor::HangMonitorRegister;
|
||||
use ipc_channel::ipc;
|
||||
use msg::constellation_msg::{
|
||||
BackgroundHangMonitorControlMsg, BackgroundHangMonitorExitSignal, HangAlert, HangAnnotation,
|
||||
HangMonitorAlert, MonitoredComponentId, MonitoredComponentType, ScriptHangAnnotation,
|
||||
TEST_PIPELINE_ID,
|
||||
};
|
||||
|
||||
lazy_static::lazy_static! {
|
||||
static ref SERIAL: Mutex<()> = Mutex::new(());
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue