Index: src/profile-generator.h |
=================================================================== |
--- src/profile-generator.h (revision 11244) |
+++ src/profile-generator.h (working copy) |
@@ -549,6 +549,8 @@ |
void set_retained_size(int value) { retained_size_ = value; } |
int ordered_index() { return ordered_index_; } |
void set_ordered_index(int value) { ordered_index_ = value; } |
+ int entry_index() { return entry_index_; } |
+ void set_entry_index(int value) { entry_index_ = value; } |
Vector<HeapGraphEdge> children() { |
return Vector<HeapGraphEdge>(children_arr(), children_count_); } |
@@ -606,6 +608,7 @@ |
int ordered_index_; // Used during dominator tree building. |
int retained_size_; // At that moment, there is no retained size yet. |
}; |
+ int entry_index_; |
SnapshotObjectId id_; |
HeapEntry* dominator_; |
HeapSnapshot* snapshot_; |
@@ -667,8 +670,6 @@ |
void ClearPaint(); |
HeapEntry* GetEntryById(SnapshotObjectId id); |
List<HeapEntry*>* GetSortedEntriesList(); |
- template<class Visitor> |
- void IterateEntries(Visitor* visitor) { entries_.Iterate(visitor); } |
void SetDominatorsToSelf(); |
void Print(int max_depth); |
@@ -687,7 +688,7 @@ |
HeapEntry* gc_subroot_entries_[VisitorSynchronization::kNumberOfSyncTags]; |
char* raw_entries_; |
List<HeapEntry*> entries_; |
- bool entries_sorted_; |
+ List<HeapEntry*> sorted_entries_; |
size_t raw_entries_size_; |
SnapshotObjectId max_snapshot_js_object_id_; |
@@ -815,7 +816,7 @@ |
HeapEntriesMap(); |
~HeapEntriesMap(); |
- void AllocateEntries(); |
+ void AllocateEntries(HeapThing root_object); |
HeapEntry* Map(HeapThing thing); |
void Pair(HeapThing thing, HeapEntriesAllocator* allocator, HeapEntry* entry); |
void CountReference(HeapThing from, HeapThing to, |
@@ -842,6 +843,8 @@ |
int retainers_count; |
}; |
+ static inline void AllocateHeapEntryForMapEntry(HashMap::Entry* map_entry); |
+ |
static uint32_t Hash(HeapThing thing) { |
return ComputeIntegerHash( |
static_cast<uint32_t>(reinterpret_cast<uintptr_t>(thing)), |
@@ -1122,7 +1125,6 @@ |
public: |
explicit HeapSnapshotJSONSerializer(HeapSnapshot* snapshot) |
: snapshot_(snapshot), |
- nodes_(ObjectsMatch), |
strings_(ObjectsMatch), |
next_node_id_(1), |
next_string_id_(1), |
@@ -1141,9 +1143,7 @@ |
v8::internal::kZeroHashSeed); |
} |
- void EnumerateNodes(); |
HeapSnapshot* CreateFakeSnapshot(); |
- int GetNodeId(HeapEntry* entry); |
int GetStringId(const char* s); |
void SerializeEdge(HeapGraphEdge* edge); |
void SerializeImpl(); |
@@ -1157,7 +1157,6 @@ |
static const int kMaxSerializableSnapshotRawSize; |
HeapSnapshot* snapshot_; |
- HashMap nodes_; |
HashMap strings_; |
int next_node_id_; |
int next_string_id_; |