class TracingMuxer
Defined at line 64 of file ../../third_party/perfetto/include/perfetto/tracing/internal/tracing_muxer.h
This class acts as a bridge between the public API methods and the
TracingBackend(s). It exposes a simplified view of the world to the API
methods, so that they don't have to care about the multiplicity of backends.
It handles all the bookkeeping to map data source instances and trace writers
to the various backends.
See tracing_muxer_impl.h for the full picture. This class contains only the
fewer fields and methods that need to be exposed to public/ headers. Fields
and methods that are required to implement them should go into
src/tracing/internal/tracing_muxer_impl.h instead: that one can pull in
perfetto headers outside of public, this one cannot.
Protected Members
Platform *const platform_
atomic generation_
Public Methods
TracingMuxer * Get ()
Defined at line 66 of file ../../third_party/perfetto/include/perfetto/tracing/internal/tracing_muxer.h
TracingTLS * GetOrCreateTracingTLS ()
Defined at line 70 of file ../../third_party/perfetto/include/perfetto/tracing/internal/tracing_muxer.h
void ~TracingMuxer ()
bool RegisterDataSource (const DataSourceDescriptor & , DataSourceFactory , DataSourceParams , bool no_flush, DataSourceStaticState * )
void UpdateDataSourceDescriptor (const DataSourceDescriptor & , const DataSourceStaticState * )
Updates the DataSourceDescriptor for the DataSource.
std::unique_ptr<TraceWriterBase> CreateTraceWriter (DataSourceStaticState * , uint32_t data_source_instance_index, DataSourceState * , BufferExhaustedPolicy buffer_exhausted_policy)
It identifies the right backend and forwards the call to it.
The returned TraceWriter must be used within the same sequence (for most
projects this means "same thread"). Alternatively the client needs to take
care of using synchronization primitives to prevent concurrent accesses.
void DestroyStoppedTraceWritersForCurrentThread ()
void RegisterInterceptor (const InterceptorDescriptor & , InterceptorFactory , InterceptorBase::TLSFactory , InterceptorBase::TracePacketCallback )
void ActivateTriggers (const std::vector<std::string> & , uint32_t ttl_ms)
Informs the tracing services to activate any of these triggers if any
tracing session was waiting for them.
Sends the trigger signal to all the initialized backends that are currently
connected and that connect in the next `ttl_ms` milliseconds (but returns
immediately anyway).
uint32_t generation (std::memory_order ord)
Defined at line 99 of file ../../third_party/perfetto/include/perfetto/tracing/internal/tracing_muxer.h
base::PlatformThreadId GetCurrentThreadId ()
Defined at line 116 of file ../../third_party/perfetto/include/perfetto/tracing/internal/tracing_muxer.h
Protected Methods
void TracingMuxer (Platform * platform)
Defined at line 121 of file ../../third_party/perfetto/include/perfetto/tracing/internal/tracing_muxer.h