V8 Project
|
#include <heap-snapshot-generator.h>
Public Member Functions | |
NativeObjectsExplorer (HeapSnapshot *snapshot, SnapshottingProgressReportingInterface *progress) | |
virtual | ~NativeObjectsExplorer () |
void | AddRootEntries (SnapshotFiller *filler) |
int | EstimateObjectsCount () |
bool | IterateAndExtractReferences (SnapshotFiller *filler) |
Private Member Functions | |
void | FillRetainedObjects () |
void | FillImplicitReferences () |
List< HeapObject * > * | GetListMaybeDisposeInfo (v8::RetainedObjectInfo *info) |
void | SetNativeRootReference (v8::RetainedObjectInfo *info) |
void | SetRootNativeRootsReference () |
void | SetWrapperNativeReferences (HeapObject *wrapper, v8::RetainedObjectInfo *info) |
void | VisitSubtreeWrapper (Object **p, uint16_t class_id) |
INLINE (static bool StringsMatch(void *key1, void *key2)) | |
NativeGroupRetainedObjectInfo * | FindOrAddGroupInfo (const char *label) |
DISALLOW_COPY_AND_ASSIGN (NativeObjectsExplorer) | |
Static Private Member Functions | |
static uint32_t | InfoHash (v8::RetainedObjectInfo *info) |
static bool | RetainedInfosMatch (void *key1, void *key2) |
Static Private Attributes | |
static HeapThing const | kNativesRootObject |
Friends | |
class | GlobalHandlesExtractor |
Definition at line 471 of file heap-snapshot-generator.h.
v8::internal::NativeObjectsExplorer::NativeObjectsExplorer | ( | HeapSnapshot * | snapshot, |
SnapshottingProgressReportingInterface * | progress | ||
) |
Definition at line 2294 of file heap-snapshot-generator.cc.
References native_entries_allocator_, snapshot(), and synthetic_entries_allocator_.
|
virtual |
Definition at line 2312 of file heap-snapshot-generator.cc.
References v8::RetainedObjectInfo::Dispose(), native_entries_allocator_, native_groups_, v8::internal::TemplateHashMapImpl< AllocationPolicy >::Next(), NULL, objects_by_info_, v8::internal::TemplateHashMapImpl< AllocationPolicy >::Start(), and synthetic_entries_allocator_.
void v8::internal::NativeObjectsExplorer::AddRootEntries | ( | SnapshotFiller * | filler | ) |
|
private |
int v8::internal::NativeObjectsExplorer::EstimateObjectsCount | ( | ) |
Definition at line 2335 of file heap-snapshot-generator.cc.
References FillRetainedObjects(), objects_by_info_, and v8::internal::TemplateHashMapImpl< AllocationPolicy >::occupancy().
Referenced by IterateAndExtractReferences(), and v8::internal::HeapSnapshotGenerator::SetProgressTotal().
|
private |
Definition at line 2369 of file heap-snapshot-generator.cc.
References v8::internal::List< T, AllocationPolicy >::at(), v8::internal::ImplicitRefGroup::children, DCHECK, filler_, v8::internal::SnapshotFiller::FindOrAddEntry(), v8::internal::Isolate::global_handles(), v8::internal::GlobalHandles::implicit_ref_groups(), isolate_, v8::HeapGraphEdge::kInternal, v8::internal::ImplicitRefGroup::length, native_entries_allocator_, v8::internal::ImplicitRefGroup::parent, v8::internal::GlobalHandles::RemoveImplicitRefGroups(), and v8::internal::SnapshotFiller::SetNamedReference().
Referenced by IterateAndExtractReferences().
|
private |
Definition at line 2341 of file heap-snapshot-generator.cc.
References v8::internal::List< T, AllocationPolicy >::Add(), v8::internal::List< T, AllocationPolicy >::at(), v8::internal::Heap::CallGCEpilogueCallbacks(), v8::internal::Heap::CallGCPrologueCallbacks(), embedder_queried_, GetListMaybeDisposeInfo(), v8::internal::Isolate::global_handles(), v8::internal::Isolate::heap(), in_groups_, v8::internal::ObjectGroup::info, v8::internal::HeapObjectsSet::Insert(), isolate_, v8::internal::GlobalHandles::IterateAllRootsWithClassIds(), v8::kGCCallbackFlagConstructRetainedObjectInfos, v8::kGCTypeMarkSweepCompact, v8::kNoGCCallbackFlags, v8::internal::ObjectGroup::length, NULL, v8::internal::GlobalHandles::object_groups(), v8::internal::ObjectGroup::objects, and v8::internal::GlobalHandles::RemoveObjectGroups().
Referenced by EstimateObjectsCount(), and IterateAndExtractReferences().
|
private |
Definition at line 2459 of file heap-snapshot-generator.cc.
References v8::internal::StringsStorage::GetCopy(), v8::internal::Heap::HashSeed(), v8::internal::StringHasher::HashSequentialString(), v8::internal::Isolate::heap(), isolate_, v8::internal::TemplateHashMapImpl< AllocationPolicy >::Lookup(), names_, native_groups_, and NULL.
Referenced by SetNativeRootReference().
|
private |
Definition at line 2394 of file heap-snapshot-generator.cc.
References v8::RetainedObjectInfo::Dispose(), InfoHash(), v8::internal::TemplateHashMapImpl< AllocationPolicy >::Lookup(), NULL, and objects_by_info_.
Referenced by FillRetainedObjects(), and VisitSubtreeWrapper().
|
inlinestaticprivate |
Definition at line 490 of file heap-snapshot-generator.h.
References v8::internal::ComputeIntegerHash(), v8::RetainedObjectInfo::GetHash(), and v8::internal::kZeroHashSeed.
Referenced by GetListMaybeDisposeInfo().
|
inlineprivate |
Definition at line 499 of file heap-snapshot-generator.h.
bool v8::internal::NativeObjectsExplorer::IterateAndExtractReferences | ( | SnapshotFiller * | filler | ) |
Definition at line 2407 of file heap-snapshot-generator.cc.
References v8::internal::List< T, AllocationPolicy >::at(), EstimateObjectsCount(), filler_, FillImplicitReferences(), FillRetainedObjects(), v8::internal::TemplateHashMapImpl< AllocationPolicy >::Next(), NULL, objects_by_info_, SetNativeRootReference(), SetRootNativeRootsReference(), SetWrapperNativeReferences(), and v8::internal::TemplateHashMapImpl< AllocationPolicy >::Start().
Referenced by v8::internal::HeapSnapshotGenerator::FillReferences().
|
inlinestaticprivate |
Definition at line 494 of file heap-snapshot-generator.h.
|
private |
Definition at line 2475 of file heap-snapshot-generator.cc.
References DCHECK, filler_, v8::internal::SnapshotFiller::FindOrAddEntry(), FindOrAddGroupInfo(), v8::RetainedObjectInfo::GetGroupLabel(), v8::HeapGraphEdge::kInternal, native_entries_allocator_, NULL, v8::internal::SnapshotFiller::SetNamedAutoIndexReference(), and synthetic_entries_allocator_.
Referenced by IterateAndExtractReferences().
|
private |
Definition at line 2508 of file heap-snapshot-generator.cc.
References DCHECK, filler_, v8::internal::SnapshotFiller::FindOrAddEntry(), v8::HeapGraphEdge::kElement, native_entries_allocator_, native_groups_, v8::internal::TemplateHashMapImpl< AllocationPolicy >::Next(), NULL, v8::internal::HeapSnapshot::root(), v8::internal::SnapshotFiller::SetIndexedAutoIndexReference(), snapshot_, and v8::internal::TemplateHashMapImpl< AllocationPolicy >::Start().
Referenced by IterateAndExtractReferences().
|
private |
Definition at line 2491 of file heap-snapshot-generator.cc.
References DCHECK, filler_, v8::internal::SnapshotFiller::FindEntry(), v8::internal::SnapshotFiller::FindOrAddEntry(), v8::HeapGraphEdge::kElement, v8::HeapGraphEdge::kInternal, native_entries_allocator_, NULL, v8::internal::SnapshotFiller::SetIndexedAutoIndexReference(), and v8::internal::SnapshotFiller::SetNamedReference().
Referenced by IterateAndExtractReferences().
|
private |
Definition at line 2525 of file heap-snapshot-generator.cc.
References v8::internal::HeapObjectsSet::Contains(), v8::internal::HeapProfiler::ExecuteWrapperClassCallback(), GetListMaybeDisposeInfo(), v8::internal::Isolate::heap_profiler(), in_groups_, isolate_, and NULL.
Referenced by v8::internal::GlobalHandlesExtractor::VisitEmbedderReference().
|
friend |
Definition at line 522 of file heap-snapshot-generator.h.
|
private |
Definition at line 510 of file heap-snapshot-generator.h.
Referenced by FillRetainedObjects().
|
private |
Definition at line 518 of file heap-snapshot-generator.h.
Referenced by FillImplicitReferences(), IterateAndExtractReferences(), SetNativeRootReference(), SetRootNativeRootsReference(), and SetWrapperNativeReferences().
|
private |
Definition at line 511 of file heap-snapshot-generator.h.
Referenced by FillRetainedObjects(), and VisitSubtreeWrapper().
|
private |
Definition at line 506 of file heap-snapshot-generator.h.
Referenced by FillImplicitReferences(), FillRetainedObjects(), FindOrAddGroupInfo(), and VisitSubtreeWrapper().
|
staticprivate |
Definition at line 520 of file heap-snapshot-generator.h.
|
private |
Definition at line 508 of file heap-snapshot-generator.h.
Referenced by FindOrAddGroupInfo().
|
private |
Definition at line 516 of file heap-snapshot-generator.h.
Referenced by FillImplicitReferences(), NativeObjectsExplorer(), SetNativeRootReference(), SetRootNativeRootsReference(), SetWrapperNativeReferences(), and ~NativeObjectsExplorer().
|
private |
Definition at line 514 of file heap-snapshot-generator.h.
Referenced by FindOrAddGroupInfo(), SetRootNativeRootsReference(), and ~NativeObjectsExplorer().
|
private |
Definition at line 513 of file heap-snapshot-generator.h.
Referenced by EstimateObjectsCount(), GetListMaybeDisposeInfo(), IterateAndExtractReferences(), and ~NativeObjectsExplorer().
|
private |
Definition at line 509 of file heap-snapshot-generator.h.
|
private |
Definition at line 507 of file heap-snapshot-generator.h.
Referenced by SetRootNativeRootsReference().
|
private |
Definition at line 515 of file heap-snapshot-generator.h.
Referenced by NativeObjectsExplorer(), SetNativeRootReference(), and ~NativeObjectsExplorer().