pub struct DataSourceDescriptor {
pub name: Option<String>,
pub id: Option<u64>,
pub will_notify_on_stop: Option<bool>,
pub will_notify_on_start: Option<bool>,
pub handles_incremental_state_clear: Option<bool>,
pub no_flush: Option<bool>,
pub gpu_counter_descriptor: Option<GpuCounterDescriptor>,
pub track_event_descriptor: Option<TrackEventDescriptor>,
pub ftrace_descriptor: Option<FtraceDescriptor>,
}
Expand description
This message is sent from Producer(s) to the tracing Service when registering to advertise their capabilities. It describes the structure of tracing protos that will be produced by the data source and the supported filters.
Fields§
§name: Option<String>
e.g., “linux.ftrace”, “chromium.tracing”
id: Option<u64>
When non-zero, this is a unique ID within the scope of the Producer for this data source (it is NOT globally unique). This is useful to differentiate between data sources with matching names when calling UpdateDataSource(). This field has been introduced in November 2021 (v22, Android T) and is not supported on older versions.
will_notify_on_stop: Option<bool>
When true the data source is expected to ack the stop request through the NotifyDataSourceStopped() IPC. This field has been introduced after Android P in Jul 2018 and is not supported on older versions.
will_notify_on_start: Option<bool>
When true the data source is expected to ack the start request through the NotifyDataSourceStarted() IPC. This field has been introduced after Android P in March 2019 and is not supported on older versions.
handles_incremental_state_clear: Option<bool>
If true, opt into receiving the ClearIncrementalState() IPC. This should be set if the data source writes packets that refer to previous trace contents, and knows how to stop referring to the already-emitted data.
no_flush: Option<bool>
If true, indicates that the data source does nothing upon Flush. This allows the service to reduce the flush-related IPC traffic and better deal with frozen producers (see go/perfetto-frozen). This is usually the case for data sources like ‘track_event’ that don’t have access to the various thread task runners to post a flush task and rely purely on server-side scraping. Introduced in v39 / Android V.
gpu_counter_descriptor: Option<GpuCounterDescriptor>
Optional specification about available GPU counters.
track_event_descriptor: Option<TrackEventDescriptor>
§ftrace_descriptor: Option<FtraceDescriptor>
Implementations§
Source§impl DataSourceDescriptor
impl DataSourceDescriptor
Sourcepub fn will_notify_on_stop(&self) -> bool
pub fn will_notify_on_stop(&self) -> bool
Returns the value of will_notify_on_stop
, or the default value if will_notify_on_stop
is unset.
Sourcepub fn will_notify_on_start(&self) -> bool
pub fn will_notify_on_start(&self) -> bool
Returns the value of will_notify_on_start
, or the default value if will_notify_on_start
is unset.
Sourcepub fn handles_incremental_state_clear(&self) -> bool
pub fn handles_incremental_state_clear(&self) -> bool
Returns the value of handles_incremental_state_clear
, or the default value if handles_incremental_state_clear
is unset.
Trait Implementations§
Source§impl Clone for DataSourceDescriptor
impl Clone for DataSourceDescriptor
Source§fn clone(&self) -> DataSourceDescriptor
fn clone(&self) -> DataSourceDescriptor
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for DataSourceDescriptor
impl Debug for DataSourceDescriptor
Source§impl Default for DataSourceDescriptor
impl Default for DataSourceDescriptor
Source§impl Message for DataSourceDescriptor
impl Message for DataSourceDescriptor
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
.