pub struct FtraceStats {Show 13 fields
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 exclusive_feature_error: 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>,
pub kprobe_stats: Option<FtraceKprobeStats>,
pub cpu_buffer_size_pages: Option<u32>,
pub cached_cpu_buffer_size_pages: Option<u32>,
}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.
exclusive_feature_error: Option<String>Error message due to exclusivity violation of a single-tenant feature.
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.
kprobe_stats: Option<FtraceKprobeStats>Kprobe profile stats for functions hits and misses
cpu_buffer_size_pages: Option<u32>Per-cpu buffer size as returned by buffer_size_kb in pages (rounded up). Added in: perfetto v52.
cached_cpu_buffer_size_pages: Option<u32>Per-cpu buffer size as cached by our implementation (ftrace muxer), based on the value we’re writing into the tracefs control file. Might not be exactly equal to |cpu_buffer_size_pages| due to the kernel allocating extra scratch pages (and/or other factors). Added in: perfetto v52.
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.
Sourcepub fn cpu_buffer_size_pages(&self) -> u32
pub fn cpu_buffer_size_pages(&self) -> u32
Returns the value of cpu_buffer_size_pages, or the default value if cpu_buffer_size_pages is unset.
Sourcepub fn cached_cpu_buffer_size_pages(&self) -> u32
pub fn cached_cpu_buffer_size_pages(&self) -> u32
Returns the value of cached_cpu_buffer_size_pages, or the default value if cached_cpu_buffer_size_pages is unset.
Sourcepub fn exclusive_feature_error(&self) -> &str
pub fn exclusive_feature_error(&self) -> &str
Returns the value of exclusive_feature_error, or the default value if exclusive_feature_error is unset.
Trait Implementations§
Source§impl Clone for FtraceStats
impl Clone for FtraceStats
Source§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(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
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(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
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(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self.