template <const internal::TrackEventCategoryRegistry*>

class TrackEvent

Defined at line 373 of file ../../third_party/perfetto/include/perfetto/tracing/internal/track_event_data_source.h

Public Methods

bool Register ()

Defined at line 376 of file ../../third_party/perfetto/include/perfetto/tracing/internal/track_event_data_source.h

bool AddSessionObserver (TrackEventSessionObserver * observer)

Add or remove a session observer for this track event data source. The

observer will be notified about started and stopped tracing sessions.

Returns |true| if the observer was successfully added (i.e., the maximum

number of observers wasn't exceeded).

Defined at line 382 of file ../../third_party/perfetto/include/perfetto/tracing/internal/track_event_data_source.h

void RemoveSessionObserver (TrackEventSessionObserver * observer)

Defined at line 386 of file ../../third_party/perfetto/include/perfetto/tracing/internal/track_event_data_source.h

void Flush ()

Defined at line 390 of file ../../third_party/perfetto/include/perfetto/tracing/internal/track_event_data_source.h

template <typename Callback>
void Trace (Callback cb)

Defined at line 396 of file ../../third_party/perfetto/include/perfetto/tracing/internal/track_event_data_source.h

template <typename Callback>
void CallIfEnabled (Callback callback)

Defined at line 401 of file ../../third_party/perfetto/include/perfetto/tracing/internal/track_event_data_source.h

bool IsEnabled ()

Determine if *any* tracing category is enabled.

Defined at line 406 of file ../../third_party/perfetto/include/perfetto/tracing/internal/track_event_data_source.h

bool IsCategoryEnabledByConfig (const protos::gen::TrackEventConfig & config, size_t category_index)

Determine if `config` enables a given static category.

Defined at line 413 of file ../../third_party/perfetto/include/perfetto/tracing/internal/track_event_data_source.h

bool IsCategoryEnabledByConfig (const protos::gen::TrackEventConfig & config, const DynamicCategory & category)

Determine if `config` enables a given dynamic category.

Defined at line 421 of file ../../third_party/perfetto/include/perfetto/tracing/internal/track_event_data_source.h

bool IsCategoryEnabledBySession (size_t internal_instance_index, size_t category_index)

Determine if tracing for the given static category is enabled in a session

identified by `internal_instance_index`.

Defined at line 430 of file ../../third_party/perfetto/include/perfetto/tracing/internal/track_event_data_source.h

bool IsCategoryEnabled (size_t category_index)

Determine if tracing for the given static category is enabled.

Defined at line 438 of file ../../third_party/perfetto/include/perfetto/tracing/internal/track_event_data_source.h

bool IsDynamicCategoryEnabled (const DynamicCategory & dynamic_category)

Determine if tracing for the given dynamic category is enabled.

Defined at line 444 of file ../../third_party/perfetto/include/perfetto/tracing/internal/track_event_data_source.h

template <typename Callback>
void CallIfCategoryEnabled (size_t category_index, Callback callback)

This is the inlined entrypoint for all track event trace points. It tries

to be as lightweight as possible in terms of instructions and aims to

compile down to an unlikely conditional jump to the actual trace writing

function.

Defined at line 458 of file ../../third_party/perfetto/include/perfetto/tracing/internal/track_event_data_source.h

template <typename CategoryType, typename EventNameType, typename... Arguments>
void TraceForCategory (uint32_t instances, const CategoryType & category, const EventNameType & name, perfetto::protos::pbzero::TrackEvent::Type type, Arguments &&... args)

The following methods forward all arguments to TraceForCategoryBody

while casting string constants to const char* and integer arguments to

int64_t, uint64_t or bool.

Defined at line 471 of file ../../third_party/perfetto/include/perfetto/tracing/internal/track_event_data_source.h

void SetTrackDescriptor (const Track & track, const protos::gen::TrackDescriptor & desc)

Record metadata about different types of timeline tracks. See Track.

Defined at line 580 of file ../../third_party/perfetto/include/perfetto/tracing/internal/track_event_data_source.h

void EraseTrackDescriptor (const Track & track)

Defined at line 591 of file ../../third_party/perfetto/include/perfetto/tracing/internal/track_event_data_source.h

uint64_t GetTraceTimeNs ()

Returns the current trace timestamp in nanoseconds. Note the returned

timebase may vary depending on the platform, but will always match the

timestamps recorded by track events (see GetTraceClockId).

Defined at line 598 of file ../../third_party/perfetto/include/perfetto/tracing/internal/track_event_data_source.h

protos::pbzero::BuiltinClock GetTraceClockId ()

Returns the type of clock used by GetTraceTimeNs().

Defined at line 601 of file ../../third_party/perfetto/include/perfetto/tracing/internal/track_event_data_source.h