tracing_perfetto_sdk_schema

Struct FtraceStats

Source
pub struct FtraceStats {
    pub phase: Option<i32>,
    pub cpu_stats: Vec<FtraceCpuStats>,
    pub kernel_symbols_parsed: Option<u32>,
    pub kernel_symbols_mem_kb: Option<u32>,
    pub atrace_errors: Option<String>,
    pub unknown_ftrace_events: Vec<String>,
    pub failed_ftrace_events: Vec<String>,
    pub preserve_ftrace_buffer: Option<bool>,
    pub ftrace_parse_errors: Vec<i32>,
}
Expand description

Errors and kernel buffer stats for the ftrace data source.

Fields§

§phase: Option<i32>

A pair of FtraceStats is written on every trace flush:

  • START_OF_TRACE - stats recorded at the beginning of the trace.
  • END_OF_TRACE - stats recorded during the flush. In other words shortly before this packet was written. For simple traces this will be once at the end of the trace.
§cpu_stats: Vec<FtraceCpuStats>

Per-CPU stats (one entry for each CPU).

§kernel_symbols_parsed: Option<u32>

When FtraceConfig.symbolize_ksyms = true, this records the number of symbols parsed from /proc/kallsyms, whether they have been seen in the trace or not. It can be used to debug kptr_restrict or security-related errors. Note: this will be valid only when phase = END_OF_TRACE. The symbolizer is initialized. When START_OF_TRACE is emitted it is not ready yet.

§kernel_symbols_mem_kb: Option<u32>

The memory used by the kernel symbolizer (KernelSymbolMap.size_bytes()).

§atrace_errors: Option<String>

Atrace errors (even non-fatal ones) are reported here. A typical example is one or more atrace categories not available on the device.

§unknown_ftrace_events: Vec<String>

Ftrace events requested by the config but not present on device.

§failed_ftrace_events: Vec<String>

Ftrace events requested by the config and present on device, but which we failed to enable due to permissions, or due to a conflicting option (currently FtraceConfig.disable_generic_events).

§preserve_ftrace_buffer: Option<bool>

The data source was configured to preserve existing events in the ftrace buffer before the start of the trace.

§ftrace_parse_errors: Vec<i32>

Unique errors encountered during reading and parsing of the raw ftrace data. Ring buffer ABI related errors will also be recorded in the affected FtraceEventBundles with a timestamp. Any traces with entries in this field should be investigated, as they indicate a bug in perfetto or the kernel.

Implementations§

Source§

impl FtraceStats

Source

pub fn phase(&self) -> Phase

Returns the enum value of phase, or the default if the field is unset or set to an invalid enum value.

Source

pub fn set_phase(&mut self, value: Phase)

Sets phase to the provided enum value.

Source

pub fn kernel_symbols_parsed(&self) -> u32

Returns the value of kernel_symbols_parsed, or the default value if kernel_symbols_parsed is unset.

Source

pub fn kernel_symbols_mem_kb(&self) -> u32

Returns the value of kernel_symbols_mem_kb, or the default value if kernel_symbols_mem_kb is unset.

Source

pub fn atrace_errors(&self) -> &str

Returns the value of atrace_errors, or the default value if atrace_errors is unset.

Source

pub fn preserve_ftrace_buffer(&self) -> bool

Returns the value of preserve_ftrace_buffer, or the default value if preserve_ftrace_buffer is unset.

Source

pub fn ftrace_parse_errors( &self, ) -> FilterMap<Cloned<Iter<'_, i32>>, fn(_: i32) -> Option<FtraceParseStatus>>

Returns an iterator which yields the valid enum values contained in ftrace_parse_errors.

Source

pub fn push_ftrace_parse_errors(&mut self, value: FtraceParseStatus)

Appends the provided enum value to ftrace_parse_errors.

Trait Implementations§

Source§

impl Clone for FtraceStats

Source§

fn clone(&self) -> FtraceStats

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for FtraceStats

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for FtraceStats

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Message for FtraceStats

Source§

fn encoded_len(&self) -> usize

Returns the encoded length of the message without a length delimiter.
Source§

fn clear(&mut self)

Clears the message, resetting all fields to their default.
Source§

fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
where B: BufMut, Self: Sized,

Encodes the message to a buffer. Read more
Source§

fn encode_to_vec(&self) -> Vec<u8>
where Self: Sized,

Encodes the message to a newly allocated buffer.
Source§

fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
where B: BufMut, Self: Sized,

Encodes the message with a length-delimiter to a buffer. Read more
Source§

fn encode_length_delimited_to_vec(&self) -> Vec<u8>
where Self: Sized,

Encodes the message with a length-delimiter to a newly allocated buffer.
Source§

fn decode<B>(buf: B) -> Result<Self, DecodeError>
where B: Buf, Self: Default,

Decodes an instance of the message from a buffer. Read more
Source§

fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
where B: Buf, Self: Default,

Decodes a length-delimited instance of the message from the buffer.
Source§

fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
where B: Buf, Self: Sized,

Decodes an instance of the message from a buffer, and merges it into self. Read more
Source§

fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
where B: Buf, Self: Sized,

Decodes a length-delimited instance of the message from buffer, and merges it into self.
Source§

impl PartialEq for FtraceStats

Source§

fn eq(&self, other: &FtraceStats) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for FtraceStats

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.