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

#include <heap-snapshot-generator.h>

Collaboration diagram for v8::internal::HeapObjectsMap:

Classes

struct  EntryInfo
 
struct  TimeInterval
 

Public Types

enum class  MarkEntryAccessed { kNo , kYes }
 
enum class  IsNativeObject { kNo , kYes }
 

Public Member Functions

 HeapObjectsMap (Heap *heap)
 
 HeapObjectsMap (const HeapObjectsMap &)=delete
 
HeapObjectsMapoperator= (const HeapObjectsMap &)=delete
 
Heapheap () const
 
SnapshotObjectId FindEntry (Address addr)
 
SnapshotObjectId FindOrAddEntry (Address addr, unsigned int size, MarkEntryAccessed accessed=MarkEntryAccessed::kYes, IsNativeObject is_native_object=IsNativeObject::kNo)
 
SnapshotObjectId FindMergedNativeEntry (NativeObject addr)
 
void AddMergedNativeEntry (NativeObject addr, Address canonical_addr)
 
bool MoveObject (Address from, Address to, int size)
 
void UpdateObjectSize (Address addr, int size)
 
SnapshotObjectId last_assigned_id () const
 
SnapshotObjectId get_next_id ()
 
SnapshotObjectId get_next_native_id ()
 
void StopHeapObjectsTracking ()
 
SnapshotObjectId PushHeapObjectsStats (OutputStream *stream, int64_t *timestamp_us)
 
const std::vector< TimeInterval > & samples () const
 
void UpdateHeapObjectsMap ()
 
void RemoveDeadEntries ()
 

Static Public Attributes

static const int kObjectIdStep = 2
 
static const SnapshotObjectId kInternalRootObjectId = 1
 
static const SnapshotObjectId kGcRootsObjectId
 
static const SnapshotObjectId kGcRootsFirstSubrootId
 
static const SnapshotObjectId kFirstAvailableObjectId
 
static const SnapshotObjectId kFirstAvailableNativeId = 2
 

Private Attributes

SnapshotObjectId next_id_
 
SnapshotObjectId next_native_id_
 
base::HashMap entries_map_
 
std::vector< EntryInfoentries_
 
std::vector< TimeIntervaltime_intervals_
 
std::unordered_map< NativeObject, size_tmerged_native_entries_map_
 
Heapheap_
 

Detailed Description

Definition at line 306 of file heap-snapshot-generator.h.

Member Enumeration Documentation

◆ IsNativeObject

Enumerator
kNo 
kYes 

Definition at line 321 of file heap-snapshot-generator.h.

◆ MarkEntryAccessed

Enumerator
kNo 
kYes 

Definition at line 317 of file heap-snapshot-generator.h.

Constructor & Destructor Documentation

◆ HeapObjectsMap() [1/2]

v8::internal::HeapObjectsMap::HeapObjectsMap ( Heap * heap)
explicit

Definition at line 577 of file heap-snapshot-generator.cc.

◆ HeapObjectsMap() [2/2]

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

Member Function Documentation

◆ AddMergedNativeEntry()

void v8::internal::HeapObjectsMap::AddMergedNativeEntry ( NativeObject addr,
Address canonical_addr )

Definition at line 685 of file heap-snapshot-generator.cc.

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

◆ FindEntry()

SnapshotObjectId v8::internal::HeapObjectsMap::FindEntry ( Address addr)

Definition at line 639 of file heap-snapshot-generator.cc.

Here is the call graph for this function:

◆ FindMergedNativeEntry()

SnapshotObjectId v8::internal::HeapObjectsMap::FindMergedNativeEntry ( NativeObject addr)

Definition at line 678 of file heap-snapshot-generator.cc.

Here is the caller graph for this function:

◆ FindOrAddEntry()

SnapshotObjectId v8::internal::HeapObjectsMap::FindOrAddEntry ( Address addr,
unsigned int size,
MarkEntryAccessed accessed = MarkEntryAccessed::kYes,
IsNativeObject is_native_object = IsNativeObject::kNo )

Definition at line 649 of file heap-snapshot-generator.cc.

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

◆ get_next_id()

SnapshotObjectId v8::internal::HeapObjectsMap::get_next_id ( )
inline

Definition at line 344 of file heap-snapshot-generator.h.

Here is the caller graph for this function:

◆ get_next_native_id()

SnapshotObjectId v8::internal::HeapObjectsMap::get_next_native_id ( )
inline

Definition at line 348 of file heap-snapshot-generator.h.

Here is the caller graph for this function:

◆ heap()

Heap * v8::internal::HeapObjectsMap::heap ( ) const
inline

Definition at line 330 of file heap-snapshot-generator.h.

Here is the caller graph for this function:

◆ last_assigned_id()

SnapshotObjectId v8::internal::HeapObjectsMap::last_assigned_id ( ) const
inline

Definition at line 341 of file heap-snapshot-generator.h.

Here is the caller graph for this function:

◆ MoveObject()

bool v8::internal::HeapObjectsMap::MoveObject ( Address from,
Address to,
int size )

Definition at line 588 of file heap-snapshot-generator.cc.

Here is the call graph for this function:

◆ operator=()

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

◆ PushHeapObjectsStats()

SnapshotObjectId v8::internal::HeapObjectsMap::PushHeapObjectsStats ( OutputStream * stream,
int64_t * timestamp_us )

Definition at line 725 of file heap-snapshot-generator.cc.

Here is the call graph for this function:

◆ RemoveDeadEntries()

void v8::internal::HeapObjectsMap::RemoveDeadEntries ( )

Definition at line 774 of file heap-snapshot-generator.cc.

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

◆ samples()

const std::vector< TimeInterval > & v8::internal::HeapObjectsMap::samples ( ) const
inline

Definition at line 356 of file heap-snapshot-generator.h.

Here is the caller graph for this function:

◆ StopHeapObjectsTracking()

void v8::internal::HeapObjectsMap::StopHeapObjectsTracking ( )

Definition at line 697 of file heap-snapshot-generator.cc.

◆ UpdateHeapObjectsMap()

void v8::internal::HeapObjectsMap::UpdateHeapObjectsMap ( )

Definition at line 699 of file heap-snapshot-generator.cc.

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

◆ UpdateObjectSize()

void v8::internal::HeapObjectsMap::UpdateObjectSize ( Address addr,
int size )

Definition at line 635 of file heap-snapshot-generator.cc.

Here is the call graph for this function:

Member Data Documentation

◆ entries_

std::vector<EntryInfo> v8::internal::HeapObjectsMap::entries_
private

Definition at line 383 of file heap-snapshot-generator.h.

◆ entries_map_

base::HashMap v8::internal::HeapObjectsMap::entries_map_
private

Definition at line 382 of file heap-snapshot-generator.h.

◆ heap_

Heap* v8::internal::HeapObjectsMap::heap_
private

Definition at line 387 of file heap-snapshot-generator.h.

◆ kFirstAvailableNativeId

const SnapshotObjectId v8::internal::HeapObjectsMap::kFirstAvailableNativeId = 2
static

Definition at line 363 of file heap-snapshot-generator.h.

◆ kFirstAvailableObjectId

const SnapshotObjectId v8::internal::HeapObjectsMap::kFirstAvailableObjectId
static

◆ kGcRootsFirstSubrootId

const SnapshotObjectId v8::internal::HeapObjectsMap::kGcRootsFirstSubrootId
static

◆ kGcRootsObjectId

const SnapshotObjectId v8::internal::HeapObjectsMap::kGcRootsObjectId
static

◆ kInternalRootObjectId

const SnapshotObjectId v8::internal::HeapObjectsMap::kInternalRootObjectId = 1
static

Definition at line 359 of file heap-snapshot-generator.h.

◆ kObjectIdStep

const int v8::internal::HeapObjectsMap::kObjectIdStep = 2
static

Definition at line 358 of file heap-snapshot-generator.h.

◆ merged_native_entries_map_

std::unordered_map<NativeObject, size_t> v8::internal::HeapObjectsMap::merged_native_entries_map_
private

Definition at line 386 of file heap-snapshot-generator.h.

◆ next_id_

SnapshotObjectId v8::internal::HeapObjectsMap::next_id_
private

Definition at line 379 of file heap-snapshot-generator.h.

◆ next_native_id_

SnapshotObjectId v8::internal::HeapObjectsMap::next_native_id_
private

Definition at line 380 of file heap-snapshot-generator.h.

◆ time_intervals_

std::vector<TimeInterval> v8::internal::HeapObjectsMap::time_intervals_
private

Definition at line 384 of file heap-snapshot-generator.h.


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