struct OnStartupTracingSetupCallbackArgs

Defined at line 280 of file ../../third_party/perfetto/include/perfetto/tracing/tracing.h

Start a new startup tracing session in the current process. Startup tracing

can be used in anticipation of a session that will be started by the

specified backend in the near future. The data source configs in the

supplied TraceConfig have to (mostly) match those in the config that will

later be provided by the backend.

Learn more about config matching at ComputeStartupConfigHash.

Note that startup tracing requires that either:

(a) the service backend already has an SMB set up, or

(b) the service backend to support producer-provided SMBs if the backend

is not yet connected or no SMB has been set up yet

(See `use_producer_provided_smb`). If necessary, the

client library will briefly disconnect and reconnect the backend to

supply an SMB to the backend. If the service does not accept the SMB,

startup tracing will be aborted, but the service may still start the

corresponding tracing session later.

Startup tracing is NOT supported with the in-process backend. For this

backend, you can just start a regular tracing session and block until it is

set up instead.

The client library will start the data sources instances specified in the

config with a placeholder target buffer. Once the backend starts a matching

tracing session, the session will resume as normal. If no matching session

is started after a timeout (or the backend doesn't accept the

producer-provided SMB), the startup tracing session will be aborted

and the data source instances stopped.

Public Members

int num_data_sources_started