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

#include <allocation-tracker.h>

Collaboration diagram for v8::internal::AllocationTracker:

Classes

struct  FunctionInfo
 
class  ScriptData
 

Public Member Functions

 AllocationTracker (HeapObjectsMap *ids, StringsStorage *names)
 
 ~AllocationTracker ()
 
 AllocationTracker (const AllocationTracker &)=delete
 
AllocationTrackeroperator= (const AllocationTracker &)=delete
 
void AllocationEvent (Address addr, int size)
 
AllocationTraceTreetrace_tree ()
 
const std::vector< FunctionInfo * > & function_info_list () const
 
AddressToTraceMapaddress_to_trace ()
 

Private Types

using ScriptId = int
 
using ScriptsDataMap = std::unordered_map<ScriptId, ScriptData>
 

Private Member Functions

unsigned AddFunctionInfo (Tagged< SharedFunctionInfo > info, SnapshotObjectId id, Isolate *isolate)
 
String::LineEndsVectorGetOrCreateLineEnds (Tagged< Script > script, Isolate *isolate)
 
Script::PositionInfo GetScriptPositionInfo (Tagged< Script > script, Isolate *isolate, int start)
 
unsigned functionInfoIndexForVMState (StateTag state)
 

Private Attributes

HeapObjectsMapids_
 
StringsStoragenames_
 
AllocationTraceTree trace_tree_
 
unsigned allocation_trace_buffer_ [kMaxAllocationTraceLength]
 
std::vector< FunctionInfo * > function_info_list_
 
base::HashMap id_to_function_info_index_
 
unsigned info_index_for_other_state_
 
AddressToTraceMap address_to_trace_
 
ScriptsDataMap scripts_data_map_
 

Static Private Attributes

static const int kMaxAllocationTraceLength = 64
 

Detailed Description

Definition at line 103 of file allocation-tracker.h.

Member Typedef Documentation

◆ ScriptId

Definition at line 147 of file allocation-tracker.h.

◆ ScriptsDataMap

Definition at line 161 of file allocation-tracker.h.

Constructor & Destructor Documentation

◆ AllocationTracker() [1/2]

v8::internal::AllocationTracker::AllocationTracker ( HeapObjectsMap * ids,
StringsStorage * names )

Definition at line 176 of file allocation-tracker.cc.

◆ ~AllocationTracker()

v8::internal::AllocationTracker::~AllocationTracker ( )

Definition at line 186 of file allocation-tracker.cc.

◆ AllocationTracker() [2/2]

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

Member Function Documentation

◆ AddFunctionInfo()

unsigned v8::internal::AllocationTracker::AddFunctionInfo ( Tagged< SharedFunctionInfo > info,
SnapshotObjectId id,
Isolate * isolate )
private

Definition at line 279 of file allocation-tracker.cc.

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

◆ address_to_trace()

AddressToTraceMap * v8::internal::AllocationTracker::address_to_trace ( )
inline

Definition at line 127 of file allocation-tracker.h.

◆ AllocationEvent()

void v8::internal::AllocationTracker::AllocationEvent ( Address addr,
int size )

Definition at line 190 of file allocation-tracker.cc.

Here is the call graph for this function:

◆ function_info_list()

const std::vector< FunctionInfo * > & v8::internal::AllocationTracker::function_info_list ( ) const
inline

Definition at line 124 of file allocation-tracker.h.

Here is the caller graph for this function:

◆ functionInfoIndexForVMState()

unsigned v8::internal::AllocationTracker::functionInfoIndexForVMState ( StateTag state)
private

Definition at line 307 of file allocation-tracker.cc.

Here is the caller graph for this function:

◆ GetOrCreateLineEnds()

String::LineEndsVector & v8::internal::AllocationTracker::GetOrCreateLineEnds ( Tagged< Script > script,
Isolate * isolate )
private

Definition at line 254 of file allocation-tracker.cc.

Here is the caller graph for this function:

◆ GetScriptPositionInfo()

Script::PositionInfo v8::internal::AllocationTracker::GetScriptPositionInfo ( Tagged< Script > script,
Isolate * isolate,
int start )
private

Definition at line 267 of file allocation-tracker.cc.

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

◆ operator=()

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

◆ trace_tree()

AllocationTraceTree * v8::internal::AllocationTracker::trace_tree ( )
inline

Definition at line 123 of file allocation-tracker.h.

Here is the caller graph for this function:

Member Data Documentation

◆ address_to_trace_

AddressToTraceMap v8::internal::AllocationTracker::address_to_trace_
private

Definition at line 146 of file allocation-tracker.h.

◆ allocation_trace_buffer_

unsigned v8::internal::AllocationTracker::allocation_trace_buffer_[kMaxAllocationTraceLength]
private

Definition at line 142 of file allocation-tracker.h.

◆ function_info_list_

std::vector<FunctionInfo*> v8::internal::AllocationTracker::function_info_list_
private

Definition at line 143 of file allocation-tracker.h.

◆ id_to_function_info_index_

base::HashMap v8::internal::AllocationTracker::id_to_function_info_index_
private

Definition at line 144 of file allocation-tracker.h.

◆ ids_

HeapObjectsMap* v8::internal::AllocationTracker::ids_
private

Definition at line 139 of file allocation-tracker.h.

◆ info_index_for_other_state_

unsigned v8::internal::AllocationTracker::info_index_for_other_state_
private

Definition at line 145 of file allocation-tracker.h.

◆ kMaxAllocationTraceLength

const int v8::internal::AllocationTracker::kMaxAllocationTraceLength = 64
staticprivate

Definition at line 138 of file allocation-tracker.h.

◆ names_

StringsStorage* v8::internal::AllocationTracker::names_
private

Definition at line 140 of file allocation-tracker.h.

◆ scripts_data_map_

ScriptsDataMap v8::internal::AllocationTracker::scripts_data_map_
private

Definition at line 162 of file allocation-tracker.h.

◆ trace_tree_

AllocationTraceTree v8::internal::AllocationTracker::trace_tree_
private

Definition at line 141 of file allocation-tracker.h.


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