v8  8.1.307(node14.1.0)
V8 is Google's open source JavaScript engine
TracingController Class Reference

#include <v8-platform.h>

Data Structures

class  TraceStateObserver
 

Public Member Functions

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

Detailed Description

V8 Tracing controller.

Can be implemented by an embedder to record trace events from V8.

Definition at line 137 of file v8-platform.h.

Constructor & Destructor Documentation

◆ ~TracingController()

virtual ~TracingController ( )
virtualdefault

Member Function Documentation

◆ AddTraceEvent()

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

Adds a trace event to the platform tracing system. These function calls are usually the result of a TRACE_* macro from trace_event_common.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.

Definition at line 161 of file v8-platform.h.

◆ AddTraceEventWithTimestamp()

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

Definition at line 170 of file v8-platform.h.

◆ AddTraceStateObserver()

virtual void AddTraceStateObserver ( TraceStateObserver )
inlinevirtual

Adds tracing state change observer.

Definition at line 195 of file v8-platform.h.

◆ GetCategoryGroupEnabled()

virtual const uint8_t* GetCategoryGroupEnabled ( const char *  name)
inlinevirtual

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.

Definition at line 148 of file v8-platform.h.

◆ RemoveTraceStateObserver()

virtual void RemoveTraceStateObserver ( TraceStateObserver )
inlinevirtual

Removes tracing state change observer.

Definition at line 198 of file v8-platform.h.

◆ UpdateTraceEventDuration()

virtual void UpdateTraceEventDuration ( const uint8_t *  category_enabled_flag,
const char *  name,
uint64_t  handle 
)
inlinevirtual

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

Definition at line 184 of file v8-platform.h.


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