class TrackEventInternal
Defined at line 216 of file ../../third_party/perfetto/include/perfetto/tracing/internal/track_event_internal.h
The backend portion of the track event trace point implemention. Outlined to
a separate .cc file so it can be shared by different track event category
namespaces.
Public Members
static Track kDefaultTrack
Public Methods
std::vector<const TrackEventCategoryRegistry *> AddRegistry (const TrackEventCategoryRegistry * )
void EnableTracing (const protos::gen::TrackEventConfig & config, const DataSourceBase::SetupArgs & )
void DisableTracing (uint32_t internal_instance_index)
protos::pbzero::BuiltinClock GetClockId ()
Defined at line 344 of file ../../third_party/perfetto/include/perfetto/tracing/internal/track_event_internal.h
TrackEventInternal & GetInstance ()
void ResetRegistriesForTesting ()
bool Initialize (const std::vector<const TrackEventCategoryRegistry *> registries, bool (*)(const DataSourceDescriptor &) register_data_source)
bool AddSessionObserver (const TrackEventCategoryRegistry & , TrackEventSessionObserver * )
void RemoveSessionObserver (const TrackEventCategoryRegistry & , TrackEventSessionObserver * )
void EnableRegistry (const TrackEventCategoryRegistry * registry, const protos::gen::TrackEventConfig & config, uint32_t internal_instance_index)
bool GetDisallowMergingWithSystemTracks ()
Defined at line 349 of file ../../third_party/perfetto/include/perfetto/tracing/internal/track_event_internal.h
void OnStart (const DataSourceBase::StartArgs & )
void OnStop (const DataSourceBase::StopArgs & )
void WillClearIncrementalState (const DataSourceBase::ClearIncrementalStateArgs & )
bool IsCategoryEnabled (const TrackEventCategoryRegistry & registry, const protos::gen::TrackEventConfig & config, const Category & category)
void ResetIncrementalStateIfRequired (TraceWriterBase * trace_writer, TrackEventIncrementalState * incr_state, const TrackEventTlsState & tls_state, const TraceTimestamp & timestamp)
Defined at line 266 of file ../../third_party/perfetto/include/perfetto/tracing/internal/track_event_internal.h
template <typename NameType, typename ValueType>
void AddDebugAnnotation (perfetto::EventContext * event_ctx, NameType && name, ValueType && value)
TODO(altimin): Remove this method once Chrome uses
EventContext::AddDebugAnnotation directly.
Defined at line 280 of file ../../third_party/perfetto/include/perfetto/tracing/internal/track_event_internal.h
void SetClockId (protos::pbzero::BuiltinClock clock)
Defined at line 345 of file ../../third_party/perfetto/include/perfetto/tracing/internal/track_event_internal.h
void SetDisallowMergingWithSystemTracks (bool disallow_merging_with_system_tracks)
Defined at line 352 of file ../../third_party/perfetto/include/perfetto/tracing/internal/track_event_internal.h
void WriteEventName (perfetto::DynamicString event_name, perfetto::EventContext & event_ctx, const TrackEventTlsState & )
void WriteEventName (perfetto::StaticString event_name, perfetto::EventContext & event_ctx, const TrackEventTlsState & )
perfetto::EventContext WriteEvent (TraceWriterBase * , TrackEventIncrementalState * , TrackEventTlsState & tls_state, const Category * category, perfetto::protos::pbzero::TrackEvent::Type , const TraceTimestamp & timestamp, bool on_current_thread_track)
uint64_t GetTimeNs ()
Get the current time in nanoseconds in the trace clock timebase.
TraceTimestamp GetTraceTime ()
int GetSessionCount ()
template <typename TrackType>
void WriteTrackDescriptorIfNeeded (const TrackType & track, TraceWriterBase * trace_writer, TrackEventIncrementalState * incr_state, const TrackEventTlsState & tls_state, const TraceTimestamp & timestamp)
If the given track hasn't been seen by the trace writer yet, write a
descriptor for it into the trace. Doesn't take a lock unless the track
descriptor is new.
Defined at line 294 of file ../../third_party/perfetto/include/perfetto/tracing/internal/track_event_internal.h
template <typename TrackType>
uint64_t WriteTrackDescriptor (const TrackType & track, TraceWriterBase * trace_writer, TrackEventIncrementalState * incr_state, const TrackEventTlsState & tls_state, const TraceTimestamp & timestamp)
Unconditionally write a track descriptor into the trace.
Returns the parent track uuid.
Defined at line 328 of file ../../third_party/perfetto/include/perfetto/tracing/internal/track_event_internal.h