V8 Project
|
#include <heap-snapshot-generator.h>
Public Member Functions | |
HeapSnapshot (HeapProfiler *profiler, const char *title, unsigned uid) | |
void | Delete () |
HeapProfiler * | profiler () |
const char * | title () |
unsigned | uid () |
size_t | RawSnapshotSize () const |
HeapEntry * | root () |
HeapEntry * | gc_roots () |
HeapEntry * | gc_subroot (int index) |
List< HeapEntry > & | entries () |
List< HeapGraphEdge > & | edges () |
List< HeapGraphEdge * > & | children () |
void | RememberLastJSObjectId () |
SnapshotObjectId | max_snapshot_js_object_id () const |
HeapEntry * | AddEntry (HeapEntry::Type type, const char *name, SnapshotObjectId id, size_t size, unsigned trace_node_id) |
void | AddSyntheticRootEntries () |
HeapEntry * | GetEntryById (SnapshotObjectId id) |
List< HeapEntry * > * | GetSortedEntriesList () |
void | FillChildren () |
void | Print (int max_depth) |
void | PrintEntriesSize () |
Private Member Functions | |
HeapEntry * | AddRootEntry () |
HeapEntry * | AddGcRootsEntry () |
HeapEntry * | AddGcSubrootEntry (int tag, SnapshotObjectId id) |
DISALLOW_COPY_AND_ASSIGN (HeapSnapshot) | |
Private Attributes | |
HeapProfiler * | profiler_ |
const char * | title_ |
unsigned | uid_ |
int | root_index_ |
int | gc_roots_index_ |
int | gc_subroot_indexes_ [VisitorSynchronization::kNumberOfSyncTags] |
List< HeapEntry > | entries_ |
List< HeapGraphEdge > | edges_ |
List< HeapGraphEdge * > | children_ |
List< HeapEntry * > | sorted_entries_ |
SnapshotObjectId | max_snapshot_js_object_id_ |
Friends | |
class | HeapSnapshotTester |
Definition at line 144 of file heap-snapshot-generator.h.
v8::internal::HeapSnapshot::HeapSnapshot | ( | HeapProfiler * | profiler, |
const char * | title, | ||
unsigned | uid | ||
) |
Definition at line 183 of file heap-snapshot-generator.cc.
References gc_subroot_indexes_, v8::internal::VisitorSynchronization::kNumberOfSyncTags, v8::internal::STATIC_ASSERT(), and USE().
HeapEntry * v8::internal::HeapSnapshot::AddEntry | ( | HeapEntry::Type | type, |
const char * | name, | ||
SnapshotObjectId | id, | ||
size_t | size, | ||
unsigned | trace_node_id | ||
) |
Definition at line 267 of file heap-snapshot-generator.cc.
References v8::internal::List< T, AllocationPolicy >::Add(), entries_, v8::internal::List< T, AllocationPolicy >::last(), name, and size.
Referenced by v8::internal::V8HeapExplorer::AddEntry(), AddGcRootsEntry(), AddGcSubrootEntry(), AddRootEntry(), and v8::internal::BasicHeapEntriesAllocator::AllocateEntry().
|
private |
Definition at line 245 of file heap-snapshot-generator.cc.
References AddEntry(), DCHECK, gc_roots_index_, and v8::internal::HeapObjectsMap::kGcRootsObjectId.
Referenced by AddSyntheticRootEntries().
|
private |
Definition at line 257 of file heap-snapshot-generator.cc.
References AddEntry(), DCHECK, gc_subroot_indexes_, v8::internal::VisitorSynchronization::kNumberOfSyncTags, and v8::internal::VisitorSynchronization::kTagNames.
Referenced by AddSyntheticRootEntries().
|
private |
Definition at line 231 of file heap-snapshot-generator.cc.
References AddEntry(), DCHECK, entries_, v8::internal::HeapObjectsMap::kInternalRootObjectId, and root_index_.
Referenced by AddSyntheticRootEntries().
void v8::internal::HeapSnapshot::AddSyntheticRootEntries | ( | ) |
Definition at line 219 of file heap-snapshot-generator.cc.
References AddGcRootsEntry(), AddGcSubrootEntry(), AddRootEntry(), DCHECK, v8::internal::HeapObjectsMap::kFirstAvailableObjectId, v8::internal::HeapObjectsMap::kGcRootsFirstSubrootId, v8::internal::VisitorSynchronization::kNumberOfSyncTags, and v8::internal::HeapObjectsMap::kObjectIdStep.
Referenced by v8::internal::HeapSnapshotGenerator::GenerateSnapshot().
|
inline |
Definition at line 162 of file heap-snapshot-generator.h.
References children_.
Referenced by FillChildren(), and v8::internal::HeapSnapshotJSONSerializer::SerializeEdges().
void v8::internal::HeapSnapshot::Delete | ( | ) |
Definition at line 208 of file heap-snapshot-generator.cc.
References profiler_, and v8::internal::HeapProfiler::RemoveSnapshot().
|
private |
|
inline |
Definition at line 161 of file heap-snapshot-generator.h.
References edges_.
Referenced by FillChildren(), and v8::internal::HeapSnapshotJSONSerializer::SerializeSnapshot().
|
inline |
Definition at line 160 of file heap-snapshot-generator.h.
References entries_.
Referenced by FillChildren(), v8::internal::SnapshotFiller::FindEntry(), v8::internal::HeapSnapshotJSONSerializer::SerializeNodes(), v8::internal::HeapSnapshotJSONSerializer::SerializeSnapshot(), v8::internal::SnapshotFiller::SetIndexedAutoIndexReference(), v8::internal::SnapshotFiller::SetIndexedReference(), v8::internal::SnapshotFiller::SetNamedAutoIndexReference(), and v8::internal::SnapshotFiller::SetNamedReference().
void v8::internal::HeapSnapshot::FillChildren | ( | ) |
Definition at line 278 of file heap-snapshot-generator.cc.
References children(), DCHECK, edges(), and entries().
Referenced by v8::internal::HeapSnapshotGenerator::GenerateSnapshot().
|
inline |
Definition at line 156 of file heap-snapshot-generator.h.
References entries_, and gc_roots_index_.
Referenced by v8::internal::V8HeapExplorer::SetGcRootsReference(), and v8::internal::V8HeapExplorer::SetRootGcRootsReference().
|
inline |
Definition at line 157 of file heap-snapshot-generator.h.
References entries_, and gc_subroot_indexes_.
Referenced by v8::internal::V8HeapExplorer::SetGcRootsReference(), and v8::internal::V8HeapExplorer::SetGcSubrootReference().
HeapEntry * v8::internal::HeapSnapshot::GetEntryById | ( | SnapshotObjectId | id | ) |
Definition at line 307 of file heap-snapshot-generator.cc.
References v8::internal::List< T, AllocationPolicy >::at(), GetSortedEntriesList(), NULL, and v8::internal::SortedListBSearch().
List< HeapEntry * > * v8::internal::HeapSnapshot::GetSortedEntriesList | ( | ) |
Definition at line 325 of file heap-snapshot-generator.cc.
References entries_, v8::internal::List< T, AllocationPolicy >::Sort(), v8::internal::SortByIds(), and sorted_entries_.
Referenced by GetEntryById().
|
inline |
Definition at line 164 of file heap-snapshot-generator.h.
References max_snapshot_js_object_id_.
void v8::internal::HeapSnapshot::Print | ( | int | max_depth | ) |
Definition at line 337 of file heap-snapshot-generator.cc.
References root().
void v8::internal::HeapSnapshot::PrintEntriesSize | ( | ) |
|
inline |
Definition at line 151 of file heap-snapshot-generator.h.
References profiler_.
Referenced by v8::internal::V8HeapExplorer::AddEntry(), v8::internal::HeapSnapshotJSONSerializer::Serialize(), v8::internal::HeapSnapshotJSONSerializer::SerializeSnapshot(), v8::internal::HeapSnapshotJSONSerializer::SerializeTraceNodeInfos(), and v8::internal::HeapSnapshotJSONSerializer::SerializeTraceTree().
size_t v8::internal::HeapSnapshot::RawSnapshotSize | ( | ) | const |
Definition at line 342 of file heap-snapshot-generator.cc.
References children_, edges_, entries_, v8::internal::GetMemoryUsedByList(), and sorted_entries_.
void v8::internal::HeapSnapshot::RememberLastJSObjectId | ( | ) |
Definition at line 214 of file heap-snapshot-generator.cc.
References v8::internal::HeapProfiler::heap_object_map(), v8::internal::HeapObjectsMap::last_assigned_id(), max_snapshot_js_object_id_, and profiler_.
Referenced by v8::internal::HeapSnapshotGenerator::GenerateSnapshot().
|
inline |
Definition at line 155 of file heap-snapshot-generator.h.
References entries_, and root_index_.
Referenced by Print(), v8::internal::HeapSnapshotJSONSerializer::SerializeImpl(), v8::internal::V8HeapExplorer::SetRootGcRootsReference(), v8::internal::NativeObjectsExplorer::SetRootNativeRootsReference(), and v8::internal::V8HeapExplorer::SetUserGlobalReference().
|
inline |
Definition at line 152 of file heap-snapshot-generator.h.
References title_.
Referenced by v8::internal::HeapSnapshotJSONSerializer::SerializeSnapshot().
|
inline |
Definition at line 153 of file heap-snapshot-generator.h.
References uid_.
Referenced by v8::internal::HeapSnapshotJSONSerializer::SerializeSnapshot().
|
friend |
Definition at line 198 of file heap-snapshot-generator.h.
|
private |
Definition at line 194 of file heap-snapshot-generator.h.
Referenced by children(), and RawSnapshotSize().
|
private |
Definition at line 193 of file heap-snapshot-generator.h.
Referenced by edges(), and RawSnapshotSize().
|
private |
Definition at line 192 of file heap-snapshot-generator.h.
Referenced by AddEntry(), AddRootEntry(), entries(), gc_roots(), gc_subroot(), GetSortedEntriesList(), RawSnapshotSize(), and root().
|
private |
Definition at line 190 of file heap-snapshot-generator.h.
Referenced by AddGcRootsEntry(), and gc_roots().
|
private |
Definition at line 191 of file heap-snapshot-generator.h.
Referenced by AddGcSubrootEntry(), gc_subroot(), and HeapSnapshot().
|
private |
Definition at line 196 of file heap-snapshot-generator.h.
Referenced by max_snapshot_js_object_id(), and RememberLastJSObjectId().
|
private |
Definition at line 186 of file heap-snapshot-generator.h.
Referenced by Delete(), profiler(), and RememberLastJSObjectId().
|
private |
Definition at line 189 of file heap-snapshot-generator.h.
Referenced by AddRootEntry(), and root().
|
private |
Definition at line 195 of file heap-snapshot-generator.h.
Referenced by GetSortedEntriesList(), and RawSnapshotSize().
|
private |
Definition at line 187 of file heap-snapshot-generator.h.
Referenced by title().
|
private |
Definition at line 188 of file heap-snapshot-generator.h.
Referenced by uid().