V8 Project
v8::internal::SnapshotFiller Class Reference
+ Collaboration diagram for v8::internal::SnapshotFiller:

Public Member Functions

 SnapshotFiller (HeapSnapshot *snapshot, HeapEntriesMap *entries)
 
HeapEntry * AddEntry (HeapThing ptr, HeapEntriesAllocator *allocator)
 
HeapEntry * FindEntry (HeapThing ptr)
 
HeapEntry * FindOrAddEntry (HeapThing ptr, HeapEntriesAllocator *allocator)
 
void SetIndexedReference (HeapGraphEdge::Type type, int parent, int index, HeapEntry *child_entry)
 
void SetIndexedAutoIndexReference (HeapGraphEdge::Type type, int parent, HeapEntry *child_entry)
 
void SetNamedReference (HeapGraphEdge::Type type, int parent, const char *reference_name, HeapEntry *child_entry)
 
void SetNamedAutoIndexReference (HeapGraphEdge::Type type, int parent, HeapEntry *child_entry)
 

Private Attributes

HeapSnapshotsnapshot_
 
StringsStoragenames_
 
HeapEntriesMapentries_
 

Detailed Description

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

Constructor & Destructor Documentation

◆ SnapshotFiller()

v8::internal::SnapshotFiller::SnapshotFiller ( HeapSnapshot snapshot,
HeapEntriesMap entries 
)
inlineexplicit

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

897  : snapshot_(snapshot),
898  names_(snapshot->profiler()->names()),
899  entries_(entries) { }
enable harmony numeric enable harmony object literal extensions Optimize object Array DOM strings and string trace pretenuring decisions of HAllocate instructions Enables optimizations which favor memory size over execution speed maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining trace the tracking of allocation sites deoptimize every n garbage collections perform array bounds checks elimination analyze liveness of environment slots and zap dead values flushes the cache of optimized code for closures on every GC allow uint32 values on optimize frames if they are used only in safe operations track concurrent recompilation artificial compilation delay in ms do not emit check maps for constant values that have a leaf deoptimize the optimized code if the layout of the maps changes enable context specialization in TurboFan execution budget before interrupt is triggered max percentage of megamorphic generic ICs to allow optimization enable use of SAHF instruction if enable use of VFP3 instructions if available enable use of NEON instructions if enable use of SDIV and UDIV instructions if enable use of MLS instructions if enable loading bit constant by means of movw movt instruction enable unaligned accesses for enable use of d16 d31 registers on ARM this requires VFP3 force all emitted branches to be in long enable alignment of csp to bytes on platforms which prefer the register to always be expose gc extension under the specified name show built in functions in stack traces use random jit cookie to mask large constants minimum length for automatic enable preparsing CPU profiler sampling interval in microseconds trace out of bounds accesses to external arrays default size of stack region v8 is allowed to maximum length of function source code printed in a stack trace min size of a semi the new space consists of two semi spaces print one trace line following each garbage collection do not print trace line after scavenger collection print cumulative GC statistics in only print modified registers Trace simulator debug messages Implied by trace sim abort randomize hashes to avoid predictable hash Fixed seed to use to hash property Print the time it takes to deserialize the snapshot A filename with extra code to be included in the snapshot(mksnapshot only)") DEFINE_STRING(raw_file

Member Function Documentation

◆ AddEntry()

HeapEntry* v8::internal::SnapshotFiller::AddEntry ( HeapThing  ptr,
HeapEntriesAllocator allocator 
)
inline

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

900  {
901  HeapEntry* entry = allocator->AllocateEntry(ptr);
902  entries_->Pair(ptr, entry->index());
903  return entry;
904  }
void Pair(HeapThing thing, int entry)

References v8::internal::HeapEntriesAllocator::AllocateEntry(), entries_, and v8::internal::HeapEntriesMap::Pair().

Referenced by FindOrAddEntry().

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

◆ FindEntry()

HeapEntry* v8::internal::SnapshotFiller::FindEntry ( HeapThing  ptr)
inline

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

905  {
906  int index = entries_->Map(ptr);
907  return index != HeapEntry::kNoEntry ? &snapshot_->entries()[index] : NULL;
908  }
enable harmony numeric enable harmony object literal extensions Optimize object Array DOM strings and string trace pretenuring decisions of HAllocate instructions Enables optimizations which favor memory size over execution speed maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining trace the tracking of allocation sites deoptimize every n garbage collections perform array bounds checks elimination analyze liveness of environment slots and zap dead values flushes the cache of optimized code for closures on every GC allow uint32 values on optimize frames if they are used only in safe operations track concurrent recompilation artificial compilation delay in ms do not emit check maps for constant values that have a leaf deoptimize the optimized code if the layout of the maps changes enable context specialization in TurboFan execution budget before interrupt is triggered max percentage of megamorphic generic ICs to allow optimization enable use of SAHF instruction if enable use of VFP3 instructions if available enable use of NEON instructions if enable use of SDIV and UDIV instructions if enable use of MLS instructions if enable loading bit constant by means of movw movt instruction enable unaligned accesses for enable use of d16 d31 registers on ARM this requires VFP3 force all emitted branches to be in long enable alignment of csp to bytes on platforms which prefer the register to always be NULL

References v8::internal::HeapSnapshot::entries(), entries_, v8::internal::HeapEntriesMap::Map(), NULL, and snapshot_.

Referenced by FindOrAddEntry(), and v8::internal::NativeObjectsExplorer::SetWrapperNativeReferences().

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

◆ FindOrAddEntry()

HeapEntry* v8::internal::SnapshotFiller::FindOrAddEntry ( HeapThing  ptr,
HeapEntriesAllocator allocator 
)
inline

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

909  {
910  HeapEntry* entry = FindEntry(ptr);
911  return entry != NULL ? entry : AddEntry(ptr, allocator);
912  }
HeapEntry * FindEntry(HeapThing ptr)
HeapEntry * AddEntry(HeapThing ptr, HeapEntriesAllocator *allocator)

References AddEntry(), FindEntry(), and NULL.

Referenced by v8::internal::V8HeapExplorer::ExtractJSArrayBufferReferences(), v8::internal::NativeObjectsExplorer::FillImplicitReferences(), v8::internal::V8HeapExplorer::GetEntry(), v8::internal::NativeObjectsExplorer::SetNativeRootReference(), v8::internal::NativeObjectsExplorer::SetRootNativeRootsReference(), and v8::internal::NativeObjectsExplorer::SetWrapperNativeReferences().

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

◆ SetIndexedAutoIndexReference()

void v8::internal::SnapshotFiller::SetIndexedAutoIndexReference ( HeapGraphEdge::Type  type,
int  parent,
HeapEntry *  child_entry 
)
inline

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

922  {
923  HeapEntry* parent_entry = &snapshot_->entries()[parent];
924  int index = parent_entry->children_count() + 1;
925  parent_entry->SetIndexedReference(type, index, child_entry);
926  }

References v8::internal::HeapSnapshot::entries(), and snapshot_.

Referenced by v8::internal::V8HeapExplorer::SetGcRootsReference(), v8::internal::V8HeapExplorer::SetGcSubrootReference(), v8::internal::V8HeapExplorer::SetRootGcRootsReference(), v8::internal::NativeObjectsExplorer::SetRootNativeRootsReference(), and v8::internal::NativeObjectsExplorer::SetWrapperNativeReferences().

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

◆ SetIndexedReference()

void v8::internal::SnapshotFiller::SetIndexedReference ( HeapGraphEdge::Type  type,
int  parent,
int  index,
HeapEntry *  child_entry 
)
inline

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

916  {
917  HeapEntry* parent_entry = &snapshot_->entries()[parent];
918  parent_entry->SetIndexedReference(type, index, child_entry);
919  }

References v8::internal::HeapSnapshot::entries(), and snapshot_.

Referenced by v8::internal::V8HeapExplorer::SetElementReference(), and v8::internal::V8HeapExplorer::SetHiddenReference().

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

◆ SetNamedAutoIndexReference()

void v8::internal::SnapshotFiller::SetNamedAutoIndexReference ( HeapGraphEdge::Type  type,
int  parent,
HeapEntry *  child_entry 
)
inline

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

936  {
937  HeapEntry* parent_entry = &snapshot_->entries()[parent];
938  int index = parent_entry->children_count() + 1;
939  parent_entry->SetNamedReference(
940  type,
941  names_->GetName(index),
942  child_entry);
943  }
const char * GetName(Name *name)

References v8::internal::HeapSnapshot::entries(), v8::internal::StringsStorage::GetName(), names_, and snapshot_.

Referenced by v8::internal::V8HeapExplorer::SetGcSubrootReference(), v8::internal::NativeObjectsExplorer::SetNativeRootReference(), and v8::internal::V8HeapExplorer::SetUserGlobalReference().

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

◆ SetNamedReference()

void v8::internal::SnapshotFiller::SetNamedReference ( HeapGraphEdge::Type  type,
int  parent,
const char *  reference_name,
HeapEntry *  child_entry 
)
inline

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

930  {
931  HeapEntry* parent_entry = &snapshot_->entries()[parent];
932  parent_entry->SetNamedReference(type, reference_name, child_entry);
933  }

References v8::internal::HeapSnapshot::entries(), and snapshot_.

Referenced by v8::internal::V8HeapExplorer::ExtractJSArrayBufferReferences(), v8::internal::NativeObjectsExplorer::FillImplicitReferences(), v8::internal::V8HeapExplorer::SetContextReference(), v8::internal::V8HeapExplorer::SetGcSubrootReference(), v8::internal::V8HeapExplorer::SetInternalReference(), v8::internal::V8HeapExplorer::SetNativeBindReference(), v8::internal::V8HeapExplorer::SetPropertyReference(), v8::internal::V8HeapExplorer::SetWeakReference(), and v8::internal::NativeObjectsExplorer::SetWrapperNativeReferences().

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

Member Data Documentation

◆ entries_

HeapEntriesMap* v8::internal::SnapshotFiller::entries_
private

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

Referenced by AddEntry(), and FindEntry().

◆ names_

StringsStorage* v8::internal::SnapshotFiller::names_
private

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

Referenced by SetNamedAutoIndexReference().

◆ snapshot_

HeapSnapshot* v8::internal::SnapshotFiller::snapshot_
private

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