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

#include <heap-snapshot-generator.h>

Collaboration diagram for v8::internal::HeapSnapshot:

Public Member Functions

 HeapSnapshot (HeapProfiler *profiler, v8::HeapProfiler::HeapSnapshotMode snapshot_mode, v8::HeapProfiler::NumericsMode numerics_mode)
 
 HeapSnapshot (const HeapSnapshot &)=delete
 
HeapSnapshotoperator= (const HeapSnapshot &)=delete
 
void Delete ()
 
HeapProfilerprofiler () const
 
HeapEntryroot () const
 
HeapEntrygc_roots () const
 
HeapEntrygc_subroot (Root root) const
 
std::deque< HeapEntry > & entries ()
 
const std::deque< HeapEntry > & entries () const
 
std::deque< HeapGraphEdge > & edges ()
 
const std::deque< HeapGraphEdge > & edges () const
 
std::vector< HeapGraphEdge * > & children ()
 
const std::vector< EntrySourceLocation > & locations () const
 
void RememberLastJSObjectId ()
 
SnapshotObjectId max_snapshot_js_object_id () const
 
bool is_complete () const
 
bool capture_numeric_value () const
 
bool expose_internals () const
 
size_t extra_native_bytes () const
 
void set_extra_native_bytes (size_t bytes)
 
void AddLocation (HeapEntry *entry, int scriptId, int line, int col)
 
HeapEntryAddEntry (HeapEntry::Type type, const char *name, SnapshotObjectId id, size_t size, unsigned trace_node_id)
 
void AddSyntheticRootEntries ()
 
HeapEntryGetEntryById (SnapshotObjectId id)
 
void FillChildren ()
 
void AddScriptLineEnds (int script_id, String::LineEndsVector &&line_ends)
 
String::LineEndsVectorGetScriptLineEnds (int script_id)
 
void Print (int max_depth)
 

Private Types

using ScriptId = int
 
using ScriptsLineEndsMap
 

Private Member Functions

void AddRootEntry ()
 
void AddGcRootsEntry ()
 
void AddGcSubrootEntry (Root root, SnapshotObjectId id)
 

Private Attributes

HeapProfilerprofiler_
 
HeapEntryroot_entry_ = nullptr
 
HeapEntrygc_roots_entry_ = nullptr
 
HeapEntrygc_subroot_entries_ [static_cast< int >(Root::kNumberOfRoots)]
 
std::deque< HeapEntryentries_
 
std::deque< HeapGraphEdgeedges_
 
std::vector< HeapGraphEdge * > children_
 
std::unordered_map< SnapshotObjectId, HeapEntry * > entries_by_id_cache_
 
std::vector< EntrySourceLocationlocations_
 
SnapshotObjectId max_snapshot_js_object_id_ = -1
 
v8::HeapProfiler::HeapSnapshotMode snapshot_mode_
 
v8::HeapProfiler::NumericsMode numerics_mode_
 
size_t extra_native_bytes_ = 0
 
ScriptsLineEndsMap scripts_line_ends_map_
 

Detailed Description

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

Member Typedef Documentation

◆ ScriptId

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

◆ ScriptsLineEndsMap

Initial value:
std::unordered_map<ScriptId, String::LineEndsVector>

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

Constructor & Destructor Documentation

◆ HeapSnapshot() [1/2]

v8::internal::HeapSnapshot::HeapSnapshot ( HeapProfiler * profiler,
v8::HeapProfiler::HeapSnapshotMode snapshot_mode,
v8::HeapProfiler::NumericsMode numerics_mode )

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

◆ HeapSnapshot() [2/2]

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

Member Function Documentation

◆ AddEntry()

HeapEntry * v8::internal::HeapSnapshot::AddEntry ( HeapEntry::Type type,
const char * name,
SnapshotObjectId id,
size_t size,
unsigned trace_node_id )

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

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

◆ AddGcRootsEntry()

void v8::internal::HeapSnapshot::AddGcRootsEntry ( )
private

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

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

◆ AddGcSubrootEntry()

void v8::internal::HeapSnapshot::AddGcSubrootEntry ( Root root,
SnapshotObjectId id )
private

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

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

◆ AddLocation()

void v8::internal::HeapSnapshot::AddLocation ( HeapEntry * entry,
int scriptId,
int line,
int col )

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

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

◆ AddRootEntry()

void v8::internal::HeapSnapshot::AddRootEntry ( )
private

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

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

◆ AddScriptLineEnds()

void v8::internal::HeapSnapshot::AddScriptLineEnds ( int script_id,
String::LineEndsVector && line_ends )

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

Here is the caller graph for this function:

◆ AddSyntheticRootEntries()

void v8::internal::HeapSnapshot::AddSyntheticRootEntries ( )

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

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

◆ capture_numeric_value()

bool v8::internal::HeapSnapshot::capture_numeric_value ( ) const
inline

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

Here is the caller graph for this function:

◆ children()

std::vector< HeapGraphEdge * > & v8::internal::HeapSnapshot::children ( )
inline

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

Here is the caller graph for this function:

◆ Delete()

void v8::internal::HeapSnapshot::Delete ( )

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

Here is the call graph for this function:

◆ edges() [1/2]

std::deque< HeapGraphEdge > & v8::internal::HeapSnapshot::edges ( )
inline

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

Here is the caller graph for this function:

◆ edges() [2/2]

const std::deque< HeapGraphEdge > & v8::internal::HeapSnapshot::edges ( ) const
inline

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

◆ entries() [1/2]

std::deque< HeapEntry > & v8::internal::HeapSnapshot::entries ( )
inline

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

Here is the caller graph for this function:

◆ entries() [2/2]

const std::deque< HeapEntry > & v8::internal::HeapSnapshot::entries ( ) const
inline

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

◆ expose_internals()

bool v8::internal::HeapSnapshot::expose_internals ( ) const
inline

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

Here is the caller graph for this function:

◆ extra_native_bytes()

size_t v8::internal::HeapSnapshot::extra_native_bytes ( ) const
inline

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

Here is the caller graph for this function:

◆ FillChildren()

void v8::internal::HeapSnapshot::FillChildren ( )

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

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

◆ gc_roots()

HeapEntry * v8::internal::HeapSnapshot::gc_roots ( ) const
inline

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

Here is the caller graph for this function:

◆ gc_subroot()

HeapEntry * v8::internal::HeapSnapshot::gc_subroot ( Root root) const
inline

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

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

◆ GetEntryById()

HeapEntry * v8::internal::HeapSnapshot::GetEntryById ( SnapshotObjectId id)

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

Here is the call graph for this function:

◆ GetScriptLineEnds()

String::LineEndsVector & v8::internal::HeapSnapshot::GetScriptLineEnds ( int script_id)

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

Here is the caller graph for this function:

◆ is_complete()

bool v8::internal::HeapSnapshot::is_complete ( ) const
inline

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

Here is the caller graph for this function:

◆ locations()

const std::vector< EntrySourceLocation > & v8::internal::HeapSnapshot::locations ( ) const
inline

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

Here is the caller graph for this function:

◆ max_snapshot_js_object_id()

SnapshotObjectId v8::internal::HeapSnapshot::max_snapshot_js_object_id ( ) const
inline

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

◆ operator=()

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

◆ Print()

void v8::internal::HeapSnapshot::Print ( int max_depth)

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

Here is the call graph for this function:

◆ profiler()

HeapProfiler * v8::internal::HeapSnapshot::profiler ( ) const
inline

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

Here is the caller graph for this function:

◆ RememberLastJSObjectId()

void v8::internal::HeapSnapshot::RememberLastJSObjectId ( )

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

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

◆ root()

HeapEntry * v8::internal::HeapSnapshot::root ( ) const
inline

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

Here is the caller graph for this function:

◆ set_extra_native_bytes()

void v8::internal::HeapSnapshot::set_extra_native_bytes ( size_t bytes)
inline

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

Here is the caller graph for this function:

Member Data Documentation

◆ children_

std::vector<HeapGraphEdge*> v8::internal::HeapSnapshot::children_
private

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

◆ edges_

std::deque<HeapGraphEdge> v8::internal::HeapSnapshot::edges_
private

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

◆ entries_

std::deque<HeapEntry> v8::internal::HeapSnapshot::entries_
private

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

◆ entries_by_id_cache_

std::unordered_map<SnapshotObjectId, HeapEntry*> v8::internal::HeapSnapshot::entries_by_id_cache_
private

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

◆ extra_native_bytes_

size_t v8::internal::HeapSnapshot::extra_native_bytes_ = 0
private

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

◆ gc_roots_entry_

HeapEntry* v8::internal::HeapSnapshot::gc_roots_entry_ = nullptr
private

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

◆ gc_subroot_entries_

HeapEntry* v8::internal::HeapSnapshot::gc_subroot_entries_[static_cast< int >(Root::kNumberOfRoots)]
private

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

◆ locations_

std::vector<EntrySourceLocation> v8::internal::HeapSnapshot::locations_
private

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

◆ max_snapshot_js_object_id_

SnapshotObjectId v8::internal::HeapSnapshot::max_snapshot_js_object_id_ = -1
private

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

◆ numerics_mode_

v8::HeapProfiler::NumericsMode v8::internal::HeapSnapshot::numerics_mode_
private

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

◆ profiler_

HeapProfiler* v8::internal::HeapSnapshot::profiler_
private

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

◆ root_entry_

HeapEntry* v8::internal::HeapSnapshot::root_entry_ = nullptr
private

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

◆ scripts_line_ends_map_

ScriptsLineEndsMap v8::internal::HeapSnapshot::scripts_line_ends_map_
private

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

◆ snapshot_mode_

v8::HeapProfiler::HeapSnapshotMode v8::internal::HeapSnapshot::snapshot_mode_
private

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


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