Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
v8::platform::tracing::TracingController Class Reference

#include <v8-tracing.h>

Inheritance diagram for v8::platform::tracing::TracingController:
[legend]
Collaboration diagram for v8::platform::tracing::TracingController:
[legend]

Public Types

enum  CategoryGroupEnabledFlags { ENABLED_FOR_RECORDING = 1 << 0 , ENABLED_FOR_EVENT_CALLBACK = 1 << 2 , ENABLED_FOR_ETW_EXPORT = 1 << 3 }
 

Public Member Functions

 TracingController ()
 
 ~TracingController () override
 
void Initialize (TraceBuffer *trace_buffer)
 
const uint8_t * GetCategoryGroupEnabled (const char *category_group) override
 
uint64_t AddTraceEvent (char phase, const uint8_t *category_enabled_flag, const char *name, const char *scope, uint64_t id, uint64_t bind_id, int32_t num_args, const char **arg_names, const uint8_t *arg_types, const uint64_t *arg_values, std::unique_ptr< v8::ConvertableToTraceFormat > *arg_convertables, unsigned int flags) override
 
uint64_t AddTraceEventWithTimestamp (char phase, const uint8_t *category_enabled_flag, const char *name, const char *scope, uint64_t id, uint64_t bind_id, int32_t num_args, const char **arg_names, const uint8_t *arg_types, const uint64_t *arg_values, std::unique_ptr< v8::ConvertableToTraceFormat > *arg_convertables, unsigned int flags, int64_t timestamp) override
 
void UpdateTraceEventDuration (const uint8_t *category_enabled_flag, const char *name, uint64_t handle) override
 
void AddTraceStateObserver (v8::TracingController::TraceStateObserver *observer) override
 
void RemoveTraceStateObserver (v8::TracingController::TraceStateObserver *observer) override
 
void StartTracing (TraceConfig *trace_config)
 
void StopTracing ()
 
virtual ~TracingController ()=default
 
virtual const uint8_t * GetCategoryGroupEnabled (const char *name)
 
virtual uint64_t AddTraceEvent (char phase, const uint8_t *category_enabled_flag, const char *name, const char *scope, uint64_t id, uint64_t bind_id, int32_t num_args, const char **arg_names, const uint8_t *arg_types, const uint64_t *arg_values, std::unique_ptr< ConvertableToTraceFormat > *arg_convertables, unsigned int flags)
 
virtual uint64_t AddTraceEventWithTimestamp (char phase, const uint8_t *category_enabled_flag, const char *name, const char *scope, uint64_t id, uint64_t bind_id, int32_t num_args, const char **arg_names, const uint8_t *arg_types, const uint64_t *arg_values, std::unique_ptr< ConvertableToTraceFormat > *arg_convertables, unsigned int flags, int64_t timestamp)
 
virtual void UpdateTraceEventDuration (const uint8_t *category_enabled_flag, const char *name, uint64_t handle)
 
virtual void AddTraceStateObserver (TraceStateObserver *)
 
virtual void RemoveTraceStateObserver (TraceStateObserver *)
 

Static Public Member Functions

static const char * GetCategoryGroupName (const uint8_t *category_enabled_flag)
 

Protected Member Functions

virtual int64_t CurrentTimestampMicroseconds ()
 
virtual int64_t CurrentCpuTimestampMicroseconds ()
 

Member Enumeration Documentation

◆ CategoryGroupEnabledFlags

Enumerator
ENABLED_FOR_RECORDING 
ENABLED_FOR_EVENT_CALLBACK 
ENABLED_FOR_ETW_EXPORT 

Constructor & Destructor Documentation

◆ TracingController()

v8::platform::tracing::TracingController::TracingController ( )

◆ ~TracingController()

v8::platform::tracing::TracingController::~TracingController ( )
overridevirtual

Reimplemented from v8::TracingController.

Member Function Documentation

◆ AddTraceEvent()

uint64_t v8::platform::tracing::TracingController::AddTraceEvent ( char  phase,
const uint8_t *  category_enabled_flag,
const char *  name,
const char *  scope,
uint64_t  id,
uint64_t  bind_id,
int32_t  num_args,
const char **  arg_names,
const uint8_t *  arg_types,
const uint64_t *  arg_values,
std::unique_ptr< v8::ConvertableToTraceFormat > *  arg_convertables,
unsigned int  flags 
)
overridevirtual

Adds a trace event to the platform tracing system. These function calls are usually the result of a TRACE_* macro from trace-event-no-perfetto.h when tracing and the category of the particular trace are enabled. It is not advisable to call these functions on their own; they are really only meant to be used by the trace macros. The returned handle can be used by UpdateTraceEventDuration to update the duration of COMPLETE events.

Reimplemented from v8::TracingController.

◆ AddTraceEventWithTimestamp()

uint64_t v8::platform::tracing::TracingController::AddTraceEventWithTimestamp ( char  phase,
const uint8_t *  category_enabled_flag,
const char *  name,
const char *  scope,
uint64_t  id,
uint64_t  bind_id,
int32_t  num_args,
const char **  arg_names,
const uint8_t *  arg_types,
const uint64_t *  arg_values,
std::unique_ptr< v8::ConvertableToTraceFormat > *  arg_convertables,
unsigned int  flags,
int64_t  timestamp 
)
overridevirtual

Reimplemented from v8::TracingController.

◆ AddTraceStateObserver()

void v8::platform::tracing::TracingController::AddTraceStateObserver ( v8::TracingController::TraceStateObserver )
overridevirtual

Adds tracing state change observer. Does nothing in Perfetto SDK build (v8_use_perfetto = true).

Reimplemented from v8::TracingController.

◆ CurrentCpuTimestampMicroseconds()

virtual int64_t v8::platform::tracing::TracingController::CurrentCpuTimestampMicroseconds ( )
protectedvirtual

◆ CurrentTimestampMicroseconds()

virtual int64_t v8::platform::tracing::TracingController::CurrentTimestampMicroseconds ( )
protectedvirtual

◆ GetCategoryGroupEnabled()

const uint8_t * v8::platform::tracing::TracingController::GetCategoryGroupEnabled ( const char *  name)
overridevirtual

Called by TRACE_EVENT* macros, don't call this directly. The name parameter is a category group for example: TRACE_EVENT0("v8,parse", "V8.Parse") The pointer returned points to a value with zero or more of the bits defined in CategoryGroupEnabledFlags.

Reimplemented from v8::TracingController.

◆ GetCategoryGroupName()

static const char * v8::platform::tracing::TracingController::GetCategoryGroupName ( const uint8_t *  category_enabled_flag)
static

◆ Initialize()

void v8::platform::tracing::TracingController::Initialize ( TraceBuffer trace_buffer)

◆ RemoveTraceStateObserver()

void v8::platform::tracing::TracingController::RemoveTraceStateObserver ( v8::TracingController::TraceStateObserver )
overridevirtual

Removes tracing state change observer. Does nothing in Perfetto SDK build (v8_use_perfetto = true).

Reimplemented from v8::TracingController.

◆ StartTracing()

void v8::platform::tracing::TracingController::StartTracing ( TraceConfig trace_config)

◆ StopTracing()

void v8::platform::tracing::TracingController::StopTracing ( )

◆ UpdateTraceEventDuration()

void v8::platform::tracing::TracingController::UpdateTraceEventDuration ( const uint8_t *  category_enabled_flag,
const char *  name,
uint64_t  handle 
)
overridevirtual

Sets the duration field of a COMPLETE trace event. It must be called with the handle returned from AddTraceEvent().

Reimplemented from v8::TracingController.


The documentation for this class was generated from the following file: