98
uint64_t HeapEntry::id() {
101
uint64_t returned_id;
102
} id_adaptor = {id_};
103
return id_adaptor.returned_id;
99
HeapEntry* HeapGraphEdge::from() const {
100
return &snapshot()->entries()[from_index_];
104
HeapSnapshot* HeapGraphEdge::snapshot() const {
105
return to_entry_->snapshot();
109
int HeapEntry::index() const {
110
return static_cast<int>(this - &snapshot_->entries().first());
114
int HeapEntry::set_children_index(int index) {
115
children_index_ = index;
116
int next_index = index + children_count_;
122
HeapGraphEdge** HeapEntry::children_arr() {
123
ASSERT(children_index_ >= 0);
124
return &snapshot_->children()[children_index_];
128
SnapshotObjectId HeapObjectsMap::GetNthGcSubrootId(int delta) {
129
return kGcRootsFirstSubrootId + delta * kObjectIdStep;
133
HeapObject* V8HeapExplorer::GetNthGcSubrootObject(int delta) {
134
return reinterpret_cast<HeapObject*>(
135
reinterpret_cast<char*>(kFirstGcSubrootObject) +
136
delta * HeapObjectsMap::kObjectIdStep);
140
int V8HeapExplorer::GetGcSubrootOrder(HeapObject* subroot) {
141
return static_cast<int>(
142
(reinterpret_cast<char*>(subroot) -
143
reinterpret_cast<char*>(kFirstGcSubrootObject)) /
144
HeapObjectsMap::kObjectIdStep);
106
147
} } // namespace v8::internal