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

#include <profile-generator.h>

Collaboration diagram for v8::internal::CpuProfilesCollection:

Public Member Functions

 CpuProfilesCollection (Isolate *isolate)
 
 CpuProfilesCollection (const CpuProfilesCollection &)=delete
 
CpuProfilesCollectionoperator= (const CpuProfilesCollection &)=delete
 
void set_cpu_profiler (CpuProfiler *profiler)
 
CpuProfilingResult StartProfiling (const char *title=nullptr, CpuProfilingOptions options={}, std::unique_ptr< DiscardedSamplesDelegate > delegate=nullptr)
 
CpuProfilingResult StartProfilingForTesting (ProfilerId id)
 
CpuProfileStopProfiling (ProfilerId id)
 
bool IsLastProfileLeft (ProfilerId id)
 
CpuProfileLookup (const char *title)
 
std::vector< std::unique_ptr< CpuProfile > > * profiles ()
 
const char * GetName (Tagged< Name > name)
 
void RemoveProfile (CpuProfile *profile)
 
base::TimeDelta GetCommonSamplingInterval ()
 
void AddPathToCurrentProfiles (base::TimeTicks timestamp, const ProfileStackTrace &path, int src_line, bool update_stats, base::TimeDelta sampling_interval, StateTag state, EmbedderStateTag embedder_state_tag, Address native_context_address=kNullAddress, Address native_embedder_context_address=kNullAddress, const std::optional< uint64_t > trace_id=std::nullopt)
 
void UpdateNativeContextAddressForCurrentProfiles (Address from, Address to)
 

Static Public Attributes

static const int kMaxSimultaneousProfiles = 100
 

Private Member Functions

CpuProfilingResult StartProfiling (ProfilerId id, const char *title=nullptr, CpuProfilingOptions options={}, std::unique_ptr< DiscardedSamplesDelegate > delegate=nullptr)
 

Private Attributes

StringsStorage resource_names_
 
std::vector< std::unique_ptr< CpuProfile > > finished_profiles_
 
CpuProfilerprofiler_
 
std::vector< std::unique_ptr< CpuProfile > > current_profiles_
 
base::RecursiveMutex current_profiles_mutex_
 
Isolateisolate_
 

Static Private Attributes

static std::atomic< ProfilerIdlast_id_ {0}
 

Detailed Description

Definition at line 544 of file profile-generator.h.

Constructor & Destructor Documentation

◆ CpuProfilesCollection() [1/2]

v8::internal::CpuProfilesCollection::CpuProfilesCollection ( Isolate * isolate)
explicit

Definition at line 1059 of file profile-generator.cc.

◆ CpuProfilesCollection() [2/2]

v8::internal::CpuProfilesCollection::CpuProfilesCollection ( const CpuProfilesCollection & )
delete

Member Function Documentation

◆ AddPathToCurrentProfiles()

void v8::internal::CpuProfilesCollection::AddPathToCurrentProfiles ( base::TimeTicks timestamp,
const ProfileStackTrace & path,
int src_line,
bool update_stats,
base::TimeDelta sampling_interval,
StateTag state,
EmbedderStateTag embedder_state_tag,
Address native_context_address = kNullAddress,
Address native_embedder_context_address = kNullAddress,
const std::optional< uint64_t > trace_id = std::nullopt )

Definition at line 1195 of file profile-generator.cc.

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

◆ GetCommonSamplingInterval()

base::TimeDelta v8::internal::CpuProfilesCollection::GetCommonSamplingInterval ( )

Definition at line 1170 of file profile-generator.cc.

Here is the call graph for this function:

◆ GetName()

const char * v8::internal::CpuProfilesCollection::GetName ( Tagged< Name > name)
inline

Definition at line 564 of file profile-generator.h.

◆ IsLastProfileLeft()

bool v8::internal::CpuProfilesCollection::IsLastProfileLeft ( ProfilerId id)

Definition at line 1144 of file profile-generator.cc.

◆ Lookup()

CpuProfile * v8::internal::CpuProfilesCollection::Lookup ( const char * title)

Definition at line 1128 of file profile-generator.cc.

◆ operator=()

CpuProfilesCollection & v8::internal::CpuProfilesCollection::operator= ( const CpuProfilesCollection & )
delete

◆ profiles()

std::vector< std::unique_ptr< CpuProfile > > * v8::internal::CpuProfilesCollection::profiles ( )
inline

Definition at line 561 of file profile-generator.h.

◆ RemoveProfile()

void v8::internal::CpuProfilesCollection::RemoveProfile ( CpuProfile * profile)

Definition at line 1150 of file profile-generator.cc.

Here is the call graph for this function:

◆ set_cpu_profiler()

void v8::internal::CpuProfilesCollection::set_cpu_profiler ( CpuProfiler * profiler)
inline

Definition at line 550 of file profile-generator.h.

◆ StartProfiling() [1/2]

CpuProfilingResult v8::internal::CpuProfilesCollection::StartProfiling ( const char * title = nullptr,
CpuProfilingOptions options = {},
std::unique_ptr< DiscardedSamplesDelegate > delegate = nullptr )

Definition at line 1069 of file profile-generator.cc.

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

◆ StartProfiling() [2/2]

CpuProfilingResult v8::internal::CpuProfilesCollection::StartProfiling ( ProfilerId id,
const char * title = nullptr,
CpuProfilingOptions options = {},
std::unique_ptr< DiscardedSamplesDelegate > delegate = nullptr )
private

Definition at line 1076 of file profile-generator.cc.

◆ StartProfilingForTesting()

CpuProfilingResult v8::internal::CpuProfilesCollection::StartProfilingForTesting ( ProfilerId id)

Definition at line 1064 of file profile-generator.cc.

Here is the call graph for this function:

◆ StopProfiling()

CpuProfile * v8::internal::CpuProfilesCollection::StopProfiling ( ProfilerId id)

Definition at line 1110 of file profile-generator.cc.

◆ UpdateNativeContextAddressForCurrentProfiles()

void v8::internal::CpuProfilesCollection::UpdateNativeContextAddressForCurrentProfiles ( Address from,
Address to )

Definition at line 1228 of file profile-generator.cc.

Here is the caller graph for this function:

Member Data Documentation

◆ current_profiles_

std::vector<std::unique_ptr<CpuProfile> > v8::internal::CpuProfilesCollection::current_profiles_
private

Definition at line 599 of file profile-generator.h.

◆ current_profiles_mutex_

base::RecursiveMutex v8::internal::CpuProfilesCollection::current_profiles_mutex_
private

Definition at line 600 of file profile-generator.h.

◆ finished_profiles_

std::vector<std::unique_ptr<CpuProfile> > v8::internal::CpuProfilesCollection::finished_profiles_
private

Definition at line 595 of file profile-generator.h.

◆ isolate_

Isolate* v8::internal::CpuProfilesCollection::isolate_
private

Definition at line 602 of file profile-generator.h.

◆ kMaxSimultaneousProfiles

const int v8::internal::CpuProfilesCollection::kMaxSimultaneousProfiles = 100
static

Definition at line 587 of file profile-generator.h.

◆ last_id_

std::atomic< ProfilerId > v8::internal::CpuProfilesCollection::last_id_ {0}
staticprivate

Definition at line 601 of file profile-generator.h.

◆ profiler_

CpuProfiler* v8::internal::CpuProfilesCollection::profiler_
private

Definition at line 596 of file profile-generator.h.

◆ resource_names_

StringsStorage v8::internal::CpuProfilesCollection::resource_names_
private

Definition at line 594 of file profile-generator.h.


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