v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
v8::platform::tracing::TracingController Class Reference

#include <v8-tracing.h>

Inheritance diagram for v8::platform::tracing::TracingController:
Collaboration diagram for v8::platform::tracing::TracingController:

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 ()
 

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 ()
 

Private Member Functions

void UpdateCategoryGroupEnabledFlag (size_t category_index)
 
void UpdateCategoryGroupEnabledFlags ()
 
 TracingController (const TracingController &)=delete
 
void operator= (const TracingController &)=delete
 

Private Attributes

std::unique_ptr< base::Mutexmutex_
 
std::unique_ptr< TraceConfigtrace_config_
 
std::atomic_bool recording_ {false}
 
std::unordered_set< v8::TracingController::TraceStateObserver * > observers_
 
std::unique_ptr< TraceBuffertrace_buffer_
 

Detailed Description

Definition at line 234 of file v8-tracing.h.

Member Enumeration Documentation

◆ CategoryGroupEnabledFlags

Enumerator
ENABLED_FOR_RECORDING 
ENABLED_FOR_EVENT_CALLBACK 
ENABLED_FOR_ETW_EXPORT 

Definition at line 252 of file v8-tracing.h.

Constructor & Destructor Documentation

◆ TracingController() [1/2]

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

Definition at line 72 of file tracing-controller.cc.

◆ ~TracingController()

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

Definition at line 74 of file tracing-controller.cc.

Here is the call graph for this function:

◆ TracingController() [2/2]

v8::platform::tracing::TracingController::TracingController ( const TracingController & )
privatedelete

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 )
override

◆ 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 )
override

◆ AddTraceStateObserver()

void v8::platform::tracing::TracingController::AddTraceStateObserver ( v8::TracingController::TraceStateObserver * observer)
override

Definition at line 345 of file tracing-controller.cc.

Here is the call graph for this function:

◆ CurrentCpuTimestampMicroseconds()

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

Definition at line 111 of file tracing-controller.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CurrentTimestampMicroseconds()

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

Definition at line 107 of file tracing-controller.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetCategoryGroupEnabled()

const uint8_t * v8::platform::tracing::TracingController::GetCategoryGroupEnabled ( const char * category_group)
override

Definition at line 294 of file tracing-controller.cc.

Here is the call graph for this function:

◆ GetCategoryGroupName()

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

Definition at line 164 of file tracing-controller.cc.

Here is the caller graph for this function:

◆ Initialize()

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

Definition at line 103 of file tracing-controller.cc.

Here is the caller graph for this function:

◆ operator=()

void v8::platform::tracing::TracingController::operator= ( const TracingController & )
privatedelete

◆ RemoveTraceStateObserver()

void v8::platform::tracing::TracingController::RemoveTraceStateObserver ( v8::TracingController::TraceStateObserver * observer)
override

Definition at line 356 of file tracing-controller.cc.

◆ StartTracing()

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

Definition at line 181 of file tracing-controller.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ StopTracing()

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

Definition at line 223 of file tracing-controller.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ UpdateCategoryGroupEnabledFlag()

void v8::platform::tracing::TracingController::UpdateCategoryGroupEnabledFlag ( size_t category_index)
private

Definition at line 267 of file tracing-controller.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ UpdateCategoryGroupEnabledFlags()

void v8::platform::tracing::TracingController::UpdateCategoryGroupEnabledFlags ( )
private

Definition at line 289 of file tracing-controller.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ UpdateTraceEventDuration()

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

Definition at line 154 of file tracing-controller.cc.

Here is the call graph for this function:

Member Data Documentation

◆ mutex_

std::unique_ptr<base::Mutex> v8::platform::tracing::TracingController::mutex_
private

Definition at line 306 of file v8-tracing.h.

◆ observers_

std::unordered_set<v8::TracingController::TraceStateObserver*> v8::platform::tracing::TracingController::observers_
private

Definition at line 317 of file v8-tracing.h.

◆ recording_

std::atomic_bool v8::platform::tracing::TracingController::recording_ {false}
private

Definition at line 308 of file v8-tracing.h.

◆ trace_buffer_

std::unique_ptr<TraceBuffer> v8::platform::tracing::TracingController::trace_buffer_
private

Definition at line 318 of file v8-tracing.h.

◆ trace_config_

std::unique_ptr<TraceConfig> v8::platform::tracing::TracingController::trace_config_
private

Definition at line 307 of file v8-tracing.h.


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