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
impl FtraceStats
Sourcepub fn phase(&self) -> Phase
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.
Sourcepub fn kernel_symbols_parsed(&self) -> u32
pub fn kernel_symbols_parsed(&self) -> u32
Returns the value of kernel_symbols_parsed
, or the default value if kernel_symbols_parsed
is unset.
Sourcepub fn kernel_symbols_mem_kb(&self) -> u32
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.
Sourcepub fn atrace_errors(&self) -> &str
pub fn atrace_errors(&self) -> &str
Returns the value of atrace_errors
, or the default value if atrace_errors
is unset.
Sourcepub fn preserve_ftrace_buffer(&self) -> bool
pub fn preserve_ftrace_buffer(&self) -> bool
Returns the value of preserve_ftrace_buffer
, or the default value if preserve_ftrace_buffer
is unset.
Sourcepub fn ftrace_parse_errors(
&self,
) -> FilterMap<Cloned<Iter<'_, i32>>, fn(_: i32) -> Option<FtraceParseStatus>>
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
.
Sourcepub fn push_ftrace_parse_errors(&mut self, value: FtraceParseStatus)
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
impl Clone for FtraceStats
Source§fn clone(&self) -> FtraceStats
fn clone(&self) -> FtraceStats
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for FtraceStats
impl Debug for FtraceStats
Source§impl Default for FtraceStats
impl Default for FtraceStats
Source§impl Message for FtraceStats
impl Message for FtraceStats
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
Source§fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
Source§fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
Source§fn decode<B>(buf: B) -> Result<Self, DecodeError>
fn decode<B>(buf: B) -> Result<Self, DecodeError>
Source§fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
Source§fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
self
. Read moreSource§fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
self
.