Copy as Markdown

Other Tools

/* This Source Code Form is subject to the terms of the Mozilla Public
* 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/. */
/* This file is generated by generate_profiling_categories.py from
profiling_categories.yaml. DO NOT EDIT! */
#[repr(u32)]
#[derive(Debug, Copy, Clone)]
pub enum Idle {
Other = 0,
}
impl Default for Idle {
fn default() -> Self {
Idle::Other
}
}
#[repr(u32)]
#[derive(Debug, Copy, Clone)]
pub enum Other {
Other = 1,
PreferenceRead = 2,
Profiling = 3,
}
impl Default for Other {
fn default() -> Self {
Other::Other
}
}
#[repr(u32)]
#[derive(Debug, Copy, Clone)]
pub enum Test {
Test = 4,
}
impl Default for Test {
fn default() -> Self {
Test::Test
}
}
#[repr(u32)]
#[derive(Debug, Copy, Clone)]
pub enum Layout {
Other = 5,
FrameConstruction = 6,
Reflow = 7,
CSSParsing = 8,
SelectorQuery = 9,
StyleComputation = 10,
Destroy = 11,
}
impl Default for Layout {
fn default() -> Self {
Layout::Other
}
}
#[repr(u32)]
#[derive(Debug, Copy, Clone)]
pub enum JavaScript {
Other = 12,
Parsing = 13,
BaselineCompilation = 14,
IonCompilation = 15,
Interpreter = 16,
BaselineInterpret = 17,
Baseline = 18,
IonMonkey = 19,
Builtin = 20,
Wasm = 21,
}
impl Default for JavaScript {
fn default() -> Self {
JavaScript::Other
}
}
#[repr(u32)]
#[derive(Debug, Copy, Clone)]
pub enum GCCC {
Other = 22,
MinorGC = 23,
MajorGC = 24,
MajorGCMark = 25,
MajorGCSweep = 26,
MajorGCCompact = 27,
UnmarkGray = 28,
Barrier = 29,
FreeSnowWhite = 30,
BuildGraph = 31,
ScanRoots = 32,
CollectWhite = 33,
Finalize = 34,
}
impl Default for GCCC {
fn default() -> Self {
GCCC::Other
}
}
#[repr(u32)]
#[derive(Debug, Copy, Clone)]
pub enum Network {
Other = 35,
}
impl Default for Network {
fn default() -> Self {
Network::Other
}
}
#[repr(u32)]
#[derive(Debug, Copy, Clone)]
pub enum Graphics {
Other = 36,
DisplayListBuilding = 37,
DisplayListMerging = 38,
LayerBuilding = 39,
TileAllocation = 40,
WRDisplayList = 41,
Rasterization = 42,
FlushingAsyncPaints = 43,
ImageDecoding = 44,
}
impl Default for Graphics {
fn default() -> Self {
Graphics::Other
}
}
#[repr(u32)]
#[derive(Debug, Copy, Clone)]
pub enum DOM {
Other = 45,
}
impl Default for DOM {
fn default() -> Self {
DOM::Other
}
}
#[repr(u32)]
#[derive(Debug, Copy, Clone)]
pub enum Android {
Other = 46,
}
impl Default for Android {
fn default() -> Self {
Android::Other
}
}
#[repr(u32)]
#[derive(Debug, Copy, Clone)]
pub enum AndroidX {
Other = 47,
}
impl Default for AndroidX {
fn default() -> Self {
AndroidX::Other
}
}
#[repr(u32)]
#[derive(Debug, Copy, Clone)]
pub enum Java {
Other = 48,
}
impl Default for Java {
fn default() -> Self {
Java::Other
}
}
#[repr(u32)]
#[derive(Debug, Copy, Clone)]
pub enum Mozilla {
Other = 49,
}
impl Default for Mozilla {
fn default() -> Self {
Mozilla::Other
}
}
#[repr(u32)]
#[derive(Debug, Copy, Clone)]
pub enum Kotlin {
Other = 50,
}
impl Default for Kotlin {
fn default() -> Self {
Kotlin::Other
}
}
#[repr(u32)]
#[derive(Debug, Copy, Clone)]
pub enum Blocked {
Other = 51,
}
impl Default for Blocked {
fn default() -> Self {
Blocked::Other
}
}
#[repr(u32)]
#[derive(Debug, Copy, Clone)]
pub enum IPC {
Other = 52,
}
impl Default for IPC {
fn default() -> Self {
IPC::Other
}
}
#[repr(u32)]
#[derive(Debug, Copy, Clone)]
pub enum Media {
Other = 53,
CUBEB = 54,
PLAYBACK = 55,
RT = 56,
}
impl Default for Media {
fn default() -> Self {
Media::Other
}
}
#[repr(u32)]
#[derive(Debug, Copy, Clone)]
pub enum Accessibility {
Other = 57,
}
impl Default for Accessibility {
fn default() -> Self {
Accessibility::Other
}
}
#[repr(u32)]
#[derive(Debug, Copy, Clone)]
pub enum Profiler {
Other = 58,
}
impl Default for Profiler {
fn default() -> Self {
Profiler::Other
}
}
#[repr(u32)]
#[derive(Debug, Copy, Clone)]
pub enum ProfilingCategoryPair {
Idle(Option<Idle>),
Other(Option<Other>),
Test(Option<Test>),
Layout(Option<Layout>),
JavaScript(Option<JavaScript>),
GCCC(Option<GCCC>),
Network(Option<Network>),
Graphics(Option<Graphics>),
DOM(Option<DOM>),
Android(Option<Android>),
AndroidX(Option<AndroidX>),
Java(Option<Java>),
Mozilla(Option<Mozilla>),
Kotlin(Option<Kotlin>),
Blocked(Option<Blocked>),
IPC(Option<IPC>),
Media(Option<Media>),
Accessibility(Option<Accessibility>),
Profiler(Option<Profiler>),
}
impl ProfilingCategoryPair {
pub fn to_cpp_enum_value(&self) -> u32 {
match *self {
ProfilingCategoryPair::Idle(val) => val.unwrap_or_default() as u32,
ProfilingCategoryPair::Other(val) => val.unwrap_or_default() as u32,
ProfilingCategoryPair::Test(val) => val.unwrap_or_default() as u32,
ProfilingCategoryPair::Layout(val) => val.unwrap_or_default() as u32,
ProfilingCategoryPair::JavaScript(val) => val.unwrap_or_default() as u32,
ProfilingCategoryPair::GCCC(val) => val.unwrap_or_default() as u32,
ProfilingCategoryPair::Network(val) => val.unwrap_or_default() as u32,
ProfilingCategoryPair::Graphics(val) => val.unwrap_or_default() as u32,
ProfilingCategoryPair::DOM(val) => val.unwrap_or_default() as u32,
ProfilingCategoryPair::Android(val) => val.unwrap_or_default() as u32,
ProfilingCategoryPair::AndroidX(val) => val.unwrap_or_default() as u32,
ProfilingCategoryPair::Java(val) => val.unwrap_or_default() as u32,
ProfilingCategoryPair::Mozilla(val) => val.unwrap_or_default() as u32,
ProfilingCategoryPair::Kotlin(val) => val.unwrap_or_default() as u32,
ProfilingCategoryPair::Blocked(val) => val.unwrap_or_default() as u32,
ProfilingCategoryPair::IPC(val) => val.unwrap_or_default() as u32,
ProfilingCategoryPair::Media(val) => val.unwrap_or_default() as u32,
ProfilingCategoryPair::Accessibility(val) => val.unwrap_or_default() as u32,
ProfilingCategoryPair::Profiler(val) => val.unwrap_or_default() as u32,
}
}
}
#[repr(u32)]
#[derive(Debug, Copy, Clone)]
pub enum ProfilingCategory {
Idle = 0,
Other = 1,
Test = 2,
Layout = 3,
JavaScript = 4,
GCCC = 5,
Network = 6,
Graphics = 7,
DOM = 8,
Android = 9,
AndroidX = 10,
Java = 11,
Mozilla = 12,
Kotlin = 13,
Blocked = 14,
IPC = 15,
Media = 16,
Accessibility = 17,
Profiler = 18,
}
impl ProfilingCategory {
pub fn to_cpp_enum_value(&self) -> u32 {
*self as u32
}
}