Crate fuchsia_trace

Source

Macros§

alert
Convenience macro for the alert function.
async_enter
Convenience macro for the async_enter function, which can be used to trace the duration of a scope containing async code. This macro returns the drop guard, which the caller may then choose to manage.
async_instant
Convenience macro for the async_instant function, which can be used to emit an async instant event.
blob
counter
Convenience macro for the counter function.
duration
Convenience macro for the duration function that can be used to trace the duration of a scope. If you need finer grained control over when a duration starts and stops, see duration_begin and duration_end.
duration_begin
Convenience macro for the duration_begin function.
duration_end
Convenience macro for the duration_end function.
flow_begin
Convenience macro for the flow_begin function.
flow_end
Convenience macro for the flow_end function.
flow_step
Convenience macro for the flow_step function.
instant
Convenience macro for the instant function.
instant_flow_begin
Convenience macro to emit the beginning of a flow attached to an instant event.
instant_flow_end
Convenience macro to emit the end of a flow attached to an instant event.
instant_flow_step
Convenience macro to emit a step in a flow attached to an instant event.
trace_future_args
Macro for constructing TraceFutureArgs. The trace arguments won’t be constructed if the category is not enabled. If the category becomes enabled while the TraceFuture is still alive then the duration events will still be written but without the trace arguments.

Structs§

Arg
Arg holds an argument to a tracing function, which can be one of many types.
AsyncScope
AsyncScope maintains state around the context of async events generated via the async_enter! macro.
Context
RAII wrapper for trace contexts without a specific associated category.
DurationScope
The scope of a duration event, returned by the duration function and the duration! macro. The duration will be end'ed when this object is dropped.
Id
An identifier for flows and async spans.
ProlongedContext
TraceCategoryContext
RAII wrapper for a trace context for a specific category.
TraceFuture
Wraps a Future and writes duration events when the future is created, dropped, and every time it’s polled. The duration events are connected by flow events.
TraceFutureArgs
Arguments for TraceFuture and TraceFutureExt. Use trace_future_args! to construct this object.

Enums§

Scope
Scope represents the scope of a trace event.
TraceState

Constants§

TRACE_BLOB_TYPE_DATA
TRACE_BLOB_TYPE_LAST_BRANCH
TRACE_BLOB_TYPE_PERFETTO

Traits§

ArgValue
A trait for types that can be the values of an argument set.
TraceFutureExt
Extension trait for tracing futures.

Functions§

alert
Sends an alert, which can be mapped to an action.
async_begin
Writes an async begin event. This event must be matched by an async end event with the same id, category, and name. This function is intended to be called through use of the async_enter! macro.
async_end
Writes an async end event. This event must be associated with a prior async begin event with the same id, category, and name. This function is intended to be called implicitly when the AsyncScope object created through use of the async_enter! macro is dropped.
async_enter
Writes an async event which ends when the current scope exits, or the end method is is manually called.
async_instant
Writes an async instant event with the specified id.
blob_fn
category_enabled
Returns true if tracing has been enabled for the given category.
complete_duration
Write a “duration complete” record representing both the beginning and end of a duration.
counter
Writes a counter event with the specified id.
duration
Writes a duration event which ends when the current scope exits, or the end method is manually called.
duration_begin
Writes a duration begin event only. This event must be matched by a duration end event with the same category and name.
duration_end
Writes a duration end event only.
flow_begin
Writes a flow begin event with the specified id. This event may be followed by flow steps events and must be matched by a flow end event with the same category, name, and id.
flow_end
Writes a flow end event with the specified id.
flow_step
Writes a flow step event with the specified id.
instant
Writes an instant event representing a single moment in time. The number of args must not be greater than 15.
instant_flow_begin
Convenience function to emit the beginning of a flow attached to an instant event.
instant_flow_end
Convenience function to the end of a flow attached to an instant event.
instant_flow_step
Convenience function to emit a step in a flow attached to an instant event.
is_enabled
Returns true if tracing is enabled.
trace_state

Type Aliases§

trace_site_t