pub enum ProviderRequest {
Initialize {
config: ProviderConfig,
control_handle: ProviderControlHandle,
},
Start {
options: StartOptions,
control_handle: ProviderControlHandle,
},
Stop {
control_handle: ProviderControlHandle,
},
Terminate {
control_handle: ProviderControlHandle,
},
GetKnownCategories {
responder: ProviderGetKnownCategoriesResponder,
},
}Expand description
The provider interface which applications must implement and register
with the TraceRegistry to participate in tracing.
See //zircon/system/ulib/trace-provider/ for a C++ implementation of this interface which can easily be configured by an application.
Variants§
Initialize
Initialize tracing and prepare for writing trace records for events in
the specified categories into buffer using fifo for signaling.
Tracing hasn’t started yet, a Start() call is still required.
At most one trace can be active at a time. Subsequent Initialize()
requests received prior to a Terminate() call must be ignored.
Start
Begin tracing.
If tracing has already started the provider must ignore the request.
There is no result. The provider must send a TRACE_PROVIDER_STARTED
packet on fifo to indicate success/failure of starting.
Stop
Stop tracing.
If tracing has already stopped the provider must ignore the request.
Once the provider has finished writing any final events to the trace
buffer, it must send a TRACE_PROVIDER_STOPPED packet on fifo.
Note that multiple Start,Stop requests can be received between
Initialize,Terminate.
Fields
control_handle: ProviderControlHandleTerminate
Terminate tracing.
Tracing is stopped first if not already stopped.
After tracing has fully terminated the provider must close both
buffer and fifo to indicate to the trace manager that tracing is
finished.
Fields
control_handle: ProviderControlHandleGetKnownCategories
Gets the trace categories that might be produced by this provider.
Fields
responder: ProviderGetKnownCategoriesResponderImplementations§
Source§impl ProviderRequest
impl ProviderRequest
pub fn into_initialize(self) -> Option<(ProviderConfig, ProviderControlHandle)>
pub fn into_start(self) -> Option<(StartOptions, ProviderControlHandle)>
pub fn into_stop(self) -> Option<ProviderControlHandle>
pub fn into_terminate(self) -> Option<ProviderControlHandle>
pub fn into_get_known_categories( self, ) -> Option<ProviderGetKnownCategoriesResponder>
Sourcepub fn method_name(&self) -> &'static str
pub fn method_name(&self) -> &'static str
Name of the method defined in FIDL