Add a sampling profiler and a script to generate profiles for use with Gecko tooling.

This commit is contained in:
Josh Matthews 2019-03-22 13:15:50 -04:00
parent db7bb2a510
commit 90f67c11e5
13 changed files with 379 additions and 28 deletions

View file

@ -350,6 +350,24 @@ pub enum HangAnnotation {
Script(ScriptHangAnnotation),
}
/// Hang-alerts are sent by the monitor to the constellation.
#[derive(Deserialize, Serialize)]
pub enum HangMonitorAlert {
/// A component hang has been detected.
Hang(HangAlert),
/// Report a completed sampled profile.
Profile(Vec<u8>),
}
impl fmt::Debug for HangMonitorAlert {
fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
match *self {
HangMonitorAlert::Hang(..) => write!(fmt, "Hang"),
HangMonitorAlert::Profile(..) => write!(fmt, "Profile"),
}
}
}
/// Hang-alerts are sent by the monitor to the constellation.
#[derive(Deserialize, Serialize)]
pub enum HangAlert {