pub enum SessionRequest {
StartTracing {
options: StartOptions,
responder: SessionStartTracingResponder,
},
StopTracing {
options: StopOptions,
responder: SessionStopTracingResponder,
},
WatchAlert {
responder: SessionWatchAlertResponder,
},
_UnknownMethod {
ordinal: u64,
control_handle: SessionControlHandle,
method_type: MethodType,
},
}
Expand description
The controller interface used by the trace tool to start/stop/terminate a tracing session.
The trace controller may lightly validate the structure of trace records as it copies them from trace buffers into the output. In particular, it may verify the size of each record header to ensure that the framing of trace records in the data stream is maintained.
The trace controller does not validate the contents of the trace records themselves. For example, it does not try to check argument lengths in events. This ensures that the trace format can be extended without needing to modify the trace controller.
Variants§
StartTracing
Requests to start tracing with the specified options
.
If tracing has already started then the request is ignored, except to send back an error code.
The trace controller acknowledges the request when all
registered providers have been started or after
TraceConfig.start_timeout_milliseconds
milliseconds.
One useful reason for the has-started acknowledgement is that the
trace program can start a program to trace knowing that all the
providers are started.
StopTracing
Requests to stop tracing.
If tracing has already stopped then this does nothing. Returning a result lets callers know when it’s ok to, for example, start tracing again.
WatchAlert
Returns the next alert when it arrives.
Fields
responder: SessionWatchAlertResponder
_UnknownMethod
An interaction was received which does not match any known method.
Fields
This variant is marked as non-exhaustive
control_handle: SessionControlHandle
method_type: MethodType
Implementations§
source§impl SessionRequest
impl SessionRequest
pub fn into_start_tracing( self, ) -> Option<(StartOptions, SessionStartTracingResponder)>
pub fn into_stop_tracing( self, ) -> Option<(StopOptions, SessionStopTracingResponder)>
pub fn into_watch_alert(self) -> Option<SessionWatchAlertResponder>
sourcepub fn method_name(&self) -> &'static str
pub fn method_name(&self) -> &'static str
Name of the method defined in FIDL