V8 API Reference, 7.2.502.16 (for Deno 0.2.4)
v8::TickSample Struct Reference
Inheritance diagram for v8::TickSample:
v8::internal::TickSample

Public Types

enum  RecordCEntryFrame { kIncludeCEntryFrame, kSkipCEntryFrame }
 

Public Member Functions

void Init (Isolate *isolate, const v8::RegisterState &state, RecordCEntryFrame record_c_entry_frame, bool update_stats, bool use_simulator_reg_state=true)
 

Static Public Member Functions

static bool GetStackSample (Isolate *isolate, v8::RegisterState *state, RecordCEntryFrame record_c_entry_frame, void **frames, size_t frames_limit, v8::SampleInfo *sample_info, bool use_simulator_reg_state=true)
 

Public Attributes

StateTag state
 
void * pc
 
union {
   void *   tos
 
   void *   external_callback_entry
 
}; 
 
void * stack [kMaxFramesCount]
 
unsigned frames_count: kMaxFramesCountLog2
 
bool has_external_callback: 1
 
bool update_stats: 1
 

Static Public Attributes

static const unsigned kMaxFramesCountLog2 = 8
 
static const unsigned kMaxFramesCount = (1 << kMaxFramesCountLog2) - 1
 

Detailed Description

Definition at line 51 of file v8-profiler.h.

Member Function Documentation

◆ GetStackSample()

bool v8::TickSample::GetStackSample ( Isolate *  isolate,
v8::RegisterState state,
RecordCEntryFrame  record_c_entry_frame,
void **  frames,
size_t  frames_limit,
v8::SampleInfo sample_info,
bool  use_simulator_reg_state = true 
)
static

Get a call stack sample from the isolate.

Parameters
isolateThe isolate.
stateRegister state.
record_c_entry_frameInclude or skip the runtime function.
framesCaller allocated buffer to store stack frames.
frames_limitMaximum number of frames to capture. The buffer must be large enough to hold the number of frames.
sample_infoThe sample info is filled up by the function provides number of actual captured stack frames and the current VM state.
use_simulator_reg_stateWhen set to true and V8 is running under a simulator, the method will use the simulator register state rather than the one provided with |state| argument. Otherwise the method will use provided register |state| as is.
Note
GetStackSample is thread and signal safe and should only be called when the JS thread is paused or interrupted. Otherwise the behavior is undefined.

Definition at line 183 of file tick-sample.cc.

◆ Init()

DISABLE_ASAN void v8::TickSample::Init ( Isolate *  isolate,
const v8::RegisterState state,
RecordCEntryFrame  record_c_entry_frame,
bool  update_stats,
bool  use_simulator_reg_state = true 
)

Initialize a tick sample from the isolate.

Parameters
isolateThe isolate.
stateExecution state.
record_c_entry_frameInclude or skip the runtime function.
update_statsWhether update the sample to the aggregated stats.
use_simulator_reg_stateWhen set to true and V8 is running under a simulator, the method will use the simulator register state rather than the one provided with |state| argument. Otherwise the method will use provided register |state| as is.

Definition at line 148 of file tick-sample.cc.


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