pub enum SessionRequest {
StartTracing {
payload: StartOptions,
responder: SessionStartTracingResponder,
},
StopTracing {
payload: StopOptions,
responder: SessionStopTracingResponder,
},
WatchAlert {
responder: SessionWatchAlertResponder,
},
_UnknownMethod {
ordinal: u64,
control_handle: SessionControlHandle,
method_type: MethodType,
},
}
Expand description
The session interface used by the trace tool to start/stop/terminate a trace Session.
The trace Session 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 Session 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 Session.
The trace Session must be initialized from the provisioner. It can then be used to start/stop tracing as many times as needed. Dropping the Session will terminate tracing.
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 Session 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.
Alerts received by the Session are queued until a WatchAlert request is received. Alerts are sent to the caller in the order they were received.
WatchAlert requests are also queued until an alert is received and the requests are serviced in the order they were received.
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