Project: /_project.yaml Book: /_book.yaml

fuchsia.tracing.provider

PROTOCOLS

Provider {:#Provider}

Defined in fuchsia.tracing.provider/provider.fidl

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.

Initialize {:#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.

Request

Start {:#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.

Request

Stop {:#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.

Request

Terminate {:#Terminate}

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.

Request

Registry {:#Registry}

Defined in fuchsia.tracing.provider/provider.fidl

The service which trace providers use to register themselves with the tracing system. Note that one property of this interface is that once registration is made the provider can drop this connection.

RegisterProvider {:#RegisterProvider}

Registers the trace provider. Note: Registration is asynchronous, it's only at some point after this returns that the provider is actually registered. To unregister, simply close the Provider pipe. pid is the process id of the provider, name is the name of the provider. Both of these are used in logging and diagnostic messages.

Request

RegisterProviderSynchronously {:#RegisterProviderSynchronously}

Registers the trace provider synchronously. The call doesn't return until the provider is registered. On return s is ZX_OK if registration was successful. started is true if tracing has already started, which is a hint to the provider to wait for the Start() message before continuing if it wishes to not drop trace records before Start() is received. To unregister, simply close the Provider pipe. pid is the process id of the provider, name is the name of the provider. Both of these are used in logging and diagnostic messages.

Request

Response

Provider {:#Provider}

Defined in fuchsia.tracing.provider/provider.fidl

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.

Initialize {:#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.

Request

Start {:#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.

Request

Stop {:#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.

Request

Terminate {:#Terminate}

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.

Request

Registry {:#Registry}

Defined in fuchsia.tracing.provider/provider.fidl

The service which trace providers use to register themselves with the tracing system. Note that one property of this interface is that once registration is made the provider can drop this connection.

RegisterProvider {:#RegisterProvider}

Registers the trace provider. Note: Registration is asynchronous, it's only at some point after this returns that the provider is actually registered. To unregister, simply close the Provider pipe. pid is the process id of the provider, name is the name of the provider. Both of these are used in logging and diagnostic messages.

Request

RegisterProviderSynchronously {:#RegisterProviderSynchronously}

Registers the trace provider synchronously. The call doesn't return until the provider is registered. On return s is ZX_OK if registration was successful. started is true if tracing has already started, which is a hint to the provider to wait for the Start() message before continuing if it wishes to not drop trace records before Start() is received. To unregister, simply close the Provider pipe. pid is the process id of the provider, name is the name of the provider. Both of these are used in logging and diagnostic messages.

Request

Response

STRUCTS

ProviderConfig {:#ProviderConfig}

Defined in fuchsia.tracing.provider/provider.fidl

Trace provider configuration.

StartOptions {:#StartOptions}

Defined in fuchsia.tracing.provider/provider.fidl

Additional options to control tracing at start.

ProviderConfig {:#ProviderConfig}

Defined in fuchsia.tracing.provider/provider.fidl

Trace provider configuration.

StartOptions {:#StartOptions}

Defined in fuchsia.tracing.provider/provider.fidl

Additional options to control tracing at start.

ENUMS

BufferingMode {:#BufferingMode}

Type: uint8

Defined in fuchsia.tracing.provider/provider.fidl

The trace buffering mode.

BufferDisposition {:#BufferDisposition}

Type: uint8

Defined in fuchsia.tracing.provider/provider.fidl

Choices for clearing/retaining trace buffer contents at Start. A brief summary of buffer contents: The trace buffer is divided into two main pieces: durable and non-durable. The durable portion contains things like the string and thread data for their respective references (trace_encoded_string_ref_t and trace_encoded_thread_ref_t). The non-durable portion contains the rest of the trace data like events); this is the portion that, for example, is discarded in circular buffering mode when the (non-durable) buffer fills.

This is typically used when buffer contents were saved after the preceding Stop.

This is typically used when buffer contents were not saved after the preceding Stop and the current contents are to be discarded.

This is typically used when buffer contents were not saved after the preceding Stop and the current contents are to be retained.

BufferingMode {:#BufferingMode}

Type: uint8

Defined in fuchsia.tracing.provider/provider.fidl

The trace buffering mode.

BufferDisposition {:#BufferDisposition}

Type: uint8

Defined in fuchsia.tracing.provider/provider.fidl

Choices for clearing/retaining trace buffer contents at Start. A brief summary of buffer contents: The trace buffer is divided into two main pieces: durable and non-durable. The durable portion contains things like the string and thread data for their respective references (trace_encoded_string_ref_t and trace_encoded_thread_ref_t). The non-durable portion contains the rest of the trace data like events); this is the portion that, for example, is discarded in circular buffering mode when the (non-durable) buffer fills.

This is typically used when buffer contents were saved after the preceding Stop.

This is typically used when buffer contents were not saved after the preceding Stop and the current contents are to be discarded.

This is typically used when buffer contents were not saved after the preceding Stop and the current contents are to be retained.

CONSTANTS