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

#include <cpu-profiler.h>

Inheritance diagram for v8::internal::ProfilerEventsProcessor:
Collaboration diagram for v8::internal::ProfilerEventsProcessor:

Public Member Functions

 ~ProfilerEventsProcessor () override
 
void CodeEventHandler (const CodeEventsContainer &evt_rec) override
 
void Run () override=0
 
void StopSynchronously ()
 
bool running ()
 
void Enqueue (const CodeEventsContainer &event)
 
void AddCurrentStack (bool update_stats=false, const std::optional< uint64_t > trace_id=std::nullopt)
 
void AddDeoptStack (Address from, int fp_to_sp_delta)
 
void AddSample (TickSample sample)
 
virtual void SetSamplingInterval (base::TimeDelta)
 
- Public Member Functions inherited from v8::base::Thread
 Thread (const Options &options)
 
 Thread (const Thread &)=delete
 
Threadoperator= (const Thread &)=delete
 
virtual ~Thread ()
 
V8_WARN_UNUSED_RESULT bool Start ()
 
bool StartSynchronously ()
 
void Join ()
 
const char * name () const
 
PlatformDatadata ()
 
Priority priority () const
 
void NotifyStartedAndRun ()
 
- Public Member Functions inherited from v8::internal::CodeEventObserver
virtual ~CodeEventObserver ()=default
 

Protected Types

enum  SampleProcessingResult { OneSampleProcessed , FoundSampleForNextCodeEvent , NoSamplesInQueue }
 

Protected Member Functions

 ProfilerEventsProcessor (Isolate *isolate, Symbolizer *symbolizer, ProfilerCodeObserver *code_observer, CpuProfilesCollection *profiles)
 
bool ProcessCodeEvent ()
 
virtual SampleProcessingResult ProcessOneSample ()=0
 

Protected Attributes

Symbolizersymbolizer_
 
ProfilerCodeObservercode_observer_
 
CpuProfilesCollectionprofiles_
 
std::atomic_bool running_ {true}
 
base::ConditionVariable running_cond_
 
base::Mutex running_mutex_
 
LockedQueue< CodeEventsContainerevents_buffer_
 
LockedQueue< TickSampleEventRecordticks_from_vm_buffer_
 
std::atomic< unsigned > last_code_event_id_
 
unsigned last_processed_code_event_id_
 
Isolateisolate_
 

Additional Inherited Members

- Public Types inherited from v8::base::Thread
enum class  Priority { kBestEffort , kUserVisible , kUserBlocking , kDefault }
 
using LocalStorageKey = int32_t
 
- Static Public Member Functions inherited from v8::base::Thread
static LocalStorageKey CreateThreadLocalKey ()
 
static void DeleteThreadLocalKey (LocalStorageKey key)
 
static void * GetThreadLocal (LocalStorageKey key)
 
static void SetThreadLocal (LocalStorageKey key, void *value)
 
static bool HasThreadLocal (LocalStorageKey key)
 
static void * GetExistingThreadLocal (LocalStorageKey key)
 
- Static Public Attributes inherited from v8::base::Thread
static const int kMaxThreadNameLength = 16
 

Detailed Description

Definition at line 169 of file cpu-profiler.h.

Member Enumeration Documentation

◆ SampleProcessingResult

Enumerator
OneSampleProcessed 
FoundSampleForNextCodeEvent 
NoSamplesInQueue 

Definition at line 199 of file cpu-profiler.h.

Constructor & Destructor Documentation

◆ ~ProfilerEventsProcessor()

v8::internal::ProfilerEventsProcessor::~ProfilerEventsProcessor ( )
override

Definition at line 142 of file cpu-profiler.cc.

Here is the call graph for this function:

◆ ProfilerEventsProcessor()

v8::internal::ProfilerEventsProcessor::ProfilerEventsProcessor ( Isolate * isolate,
Symbolizer * symbolizer,
ProfilerCodeObserver * code_observer,
CpuProfilesCollection * profiles )
protected

Definition at line 111 of file cpu-profiler.cc.

Here is the call graph for this function:

Member Function Documentation

◆ AddCurrentStack()

void v8::internal::ProfilerEventsProcessor::AddCurrentStack ( bool update_stats = false,
const std::optional< uint64_t > trace_id = std::nullopt )

Definition at line 164 of file cpu-profiler.cc.

Here is the call graph for this function:

◆ AddDeoptStack()

void v8::internal::ProfilerEventsProcessor::AddDeoptStack ( Address from,
int fp_to_sp_delta )

Definition at line 152 of file cpu-profiler.cc.

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

◆ AddSample()

void v8::internal::ProfilerEventsProcessor::AddSample ( TickSample sample)

Definition at line 180 of file cpu-profiler.cc.

◆ CodeEventHandler()

void v8::internal::ProfilerEventsProcessor::CodeEventHandler ( const CodeEventsContainer & evt_rec)
overridevirtual

Implements v8::internal::CodeEventObserver.

Definition at line 216 of file cpu-profiler.cc.

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

◆ Enqueue()

void v8::internal::ProfilerEventsProcessor::Enqueue ( const CodeEventsContainer & event)

Definition at line 147 of file cpu-profiler.cc.

Here is the caller graph for this function:

◆ ProcessCodeEvent()

bool v8::internal::ProfilerEventsProcessor::ProcessCodeEvent ( )
protected

Definition at line 199 of file cpu-profiler.cc.

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

◆ ProcessOneSample()

virtual SampleProcessingResult v8::internal::ProfilerEventsProcessor::ProcessOneSample ( )
protectedpure virtual

◆ Run()

void v8::internal::ProfilerEventsProcessor::Run ( )
overridepure virtual

◆ running()

bool v8::internal::ProfilerEventsProcessor::running ( )
inline

Definition at line 179 of file cpu-profiler.h.

◆ SetSamplingInterval()

virtual void v8::internal::ProfilerEventsProcessor::SetSamplingInterval ( base::TimeDelta )
inlinevirtual

Reimplemented in v8::internal::SamplingEventsProcessor.

Definition at line 189 of file cpu-profiler.h.

◆ StopSynchronously()

void v8::internal::ProfilerEventsProcessor::StopSynchronously ( )

Definition at line 186 of file cpu-profiler.cc.

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

Member Data Documentation

◆ code_observer_

ProfilerCodeObserver* v8::internal::ProfilerEventsProcessor::code_observer_
protected

Definition at line 207 of file cpu-profiler.h.

◆ events_buffer_

LockedQueue<CodeEventsContainer> v8::internal::ProfilerEventsProcessor::events_buffer_
protected

Definition at line 212 of file cpu-profiler.h.

◆ isolate_

Isolate* v8::internal::ProfilerEventsProcessor::isolate_
protected

Definition at line 216 of file cpu-profiler.h.

◆ last_code_event_id_

std::atomic<unsigned> v8::internal::ProfilerEventsProcessor::last_code_event_id_
protected

Definition at line 214 of file cpu-profiler.h.

◆ last_processed_code_event_id_

unsigned v8::internal::ProfilerEventsProcessor::last_processed_code_event_id_
protected

Definition at line 215 of file cpu-profiler.h.

◆ profiles_

CpuProfilesCollection* v8::internal::ProfilerEventsProcessor::profiles_
protected

Definition at line 208 of file cpu-profiler.h.

◆ running_

std::atomic_bool v8::internal::ProfilerEventsProcessor::running_ {true}
protected

Definition at line 209 of file cpu-profiler.h.

◆ running_cond_

base::ConditionVariable v8::internal::ProfilerEventsProcessor::running_cond_
protected

Definition at line 210 of file cpu-profiler.h.

◆ running_mutex_

base::Mutex v8::internal::ProfilerEventsProcessor::running_mutex_
protected

Definition at line 211 of file cpu-profiler.h.

◆ symbolizer_

Symbolizer* v8::internal::ProfilerEventsProcessor::symbolizer_
protected

Definition at line 206 of file cpu-profiler.h.

◆ ticks_from_vm_buffer_

LockedQueue<TickSampleEventRecord> v8::internal::ProfilerEventsProcessor::ticks_from_vm_buffer_
protected

Definition at line 213 of file cpu-profiler.h.


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