v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
v8::sampler::Sampler Class Referenceabstract

#include <sampler.h>

Inheritance diagram for v8::sampler::Sampler:
Collaboration diagram for v8::sampler::Sampler:

Public Member Functions

 Sampler (Isolate *isolate)
 
virtual ~Sampler ()
 
Isolateisolate () const
 
virtual void SampleStack (const v8::RegisterState &regs)=0
 
void Start ()
 
void Stop ()
 
bool IsActive () const
 
bool ShouldRecordSample ()
 
void DoSample ()
 
unsigned js_sample_count () const
 
unsigned external_sample_count () const
 
void StartCountingSamples ()
 
PlatformData * platform_data () const
 

Static Public Attributes

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

Protected Member Functions

void SetActive (bool value)
 
void SetShouldRecordSample ()
 
 DISALLOW_IMPLICIT_CONSTRUCTORS (Sampler)
 

Protected Attributes

bool is_counting_samples_ = false
 
unsigned js_sample_count_ = 0
 
unsigned external_sample_count_ = 0
 
Isolateisolate_
 
std::atomic_bool active_ {false}
 
std::atomic_bool record_sample_ {false}
 
std::unique_ptr< PlatformData > data_
 

Detailed Description

Definition at line 34 of file sampler.h.

Constructor & Destructor Documentation

◆ Sampler()

v8::sampler::Sampler::Sampler ( Isolate * isolate)
explicit

Definition at line 568 of file sampler.cc.

◆ ~Sampler()

v8::sampler::Sampler::~Sampler ( )
virtual

Definition at line 575 of file sampler.cc.

Here is the call graph for this function:

Member Function Documentation

◆ DISALLOW_IMPLICIT_CONSTRUCTORS()

v8::sampler::Sampler::DISALLOW_IMPLICIT_CONSTRUCTORS ( Sampler )
protected

◆ DoSample()

void v8::sampler::Sampler::DoSample ( )
Here is the caller graph for this function:

◆ external_sample_count()

unsigned v8::sampler::Sampler::external_sample_count ( ) const
inline

Definition at line 67 of file sampler.h.

◆ IsActive()

bool v8::sampler::Sampler::IsActive ( ) const
inline

Definition at line 55 of file sampler.h.

Here is the caller graph for this function:

◆ isolate()

Isolate * v8::sampler::Sampler::isolate ( ) const
inline

Definition at line 43 of file sampler.h.

Here is the caller graph for this function:

◆ js_sample_count()

unsigned v8::sampler::Sampler::js_sample_count ( ) const
inline

Definition at line 66 of file sampler.h.

◆ platform_data()

PlatformData * v8::sampler::Sampler::platform_data ( ) const
inline

Definition at line 75 of file sampler.h.

◆ SampleStack()

virtual void v8::sampler::Sampler::SampleStack ( const v8::RegisterState & regs)
pure virtual

◆ SetActive()

void v8::sampler::Sampler::SetActive ( bool value)
inlineprotected

Definition at line 83 of file sampler.h.

Here is the caller graph for this function:

◆ SetShouldRecordSample()

void v8::sampler::Sampler::SetShouldRecordSample ( )
inlineprotected

Definition at line 87 of file sampler.h.

◆ ShouldRecordSample()

bool v8::sampler::Sampler::ShouldRecordSample ( )
inline

Definition at line 59 of file sampler.h.

◆ Start()

void v8::sampler::Sampler::Start ( )

Definition at line 577 of file sampler.cc.

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

◆ StartCountingSamples()

void v8::sampler::Sampler::StartCountingSamples ( )
inline

Definition at line 68 of file sampler.h.

◆ Stop()

void v8::sampler::Sampler::Stop ( )

Definition at line 586 of file sampler.cc.

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

Member Data Documentation

◆ active_

std::atomic_bool v8::sampler::Sampler::active_ {false}
protected

Definition at line 92 of file sampler.h.

◆ data_

std::unique_ptr<PlatformData> v8::sampler::Sampler::data_
protected

Definition at line 94 of file sampler.h.

◆ external_sample_count_

unsigned v8::sampler::Sampler::external_sample_count_ = 0
protected

Definition at line 81 of file sampler.h.

◆ is_counting_samples_

bool v8::sampler::Sampler::is_counting_samples_ = false
protected

Definition at line 79 of file sampler.h.

◆ isolate_

Isolate* v8::sampler::Sampler::isolate_
protected

Definition at line 91 of file sampler.h.

◆ js_sample_count_

unsigned v8::sampler::Sampler::js_sample_count_ = 0
protected

Definition at line 80 of file sampler.h.

◆ kMaxFramesCount

const unsigned v8::sampler::Sampler::kMaxFramesCount = (1u << kMaxFramesCountLog2) - 1
static

Definition at line 37 of file sampler.h.

◆ kMaxFramesCountLog2

const int v8::sampler::Sampler::kMaxFramesCountLog2 = 8
static

Definition at line 36 of file sampler.h.

◆ record_sample_

std::atomic_bool v8::sampler::Sampler::record_sample_ {false}
protected

Definition at line 93 of file sampler.h.


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