| Index: src/profile-generator-inl.h
|
| diff --git a/src/profile-generator-inl.h b/src/profile-generator-inl.h
|
| index 284e2dfa361af19df6f6f8cf159dbb977d612922..9afc52fa080a37d1daf91b130701854c125086b4 100644
|
| --- a/src/profile-generator-inl.h
|
| +++ b/src/profile-generator-inl.h
|
| @@ -96,8 +96,51 @@ CodeEntry* ProfileGenerator::EntryForVMState(StateTag tag) {
|
|
|
|
|
| HeapEntry* HeapGraphEdge::from() const {
|
| - return const_cast<HeapEntry*>(
|
| - reinterpret_cast<const HeapEntry*>(this - child_index_) - 1);
|
| + return &snapshot()->entries()[from_index_];
|
| +}
|
| +
|
| +
|
| +HeapSnapshot* HeapGraphEdge::snapshot() const {
|
| + return to_entry_->snapshot();
|
| +}
|
| +
|
| +
|
| +int HeapEntry::index() const {
|
| + return static_cast<int>(this - &snapshot_->entries().first());
|
| +}
|
| +
|
| +
|
| +int HeapEntry::set_children_index(int index) {
|
| + children_index_ = index;
|
| + int next_index = index + children_count_;
|
| + children_count_ = 0;
|
| + return next_index;
|
| +}
|
| +
|
| +
|
| +int HeapEntry::set_retainers_index(int index) {
|
| + retainers_index_ = index;
|
| + int next_index = index + retainers_count_;
|
| + retainers_count_ = 0;
|
| + return next_index;
|
| +}
|
| +
|
| +
|
| +HeapGraphEdge** HeapEntry::children_arr() {
|
| + ASSERT(children_index_ >= 0);
|
| + return &snapshot_->children()[children_index_];
|
| +}
|
| +
|
| +
|
| +HeapGraphEdge** HeapEntry::retainers_arr() {
|
| + ASSERT(retainers_index_ >= 0);
|
| + return &snapshot_->retainers()[retainers_index_];
|
| +}
|
| +
|
| +
|
| +HeapEntry* HeapEntry::dominator() const {
|
| + ASSERT(dominator_ >= 0);
|
| + return &snapshot_->entries()[dominator_];
|
| }
|
|
|
|
|
|
|