| Index: src/profile-generator.h
|
| diff --git a/src/profile-generator.h b/src/profile-generator.h
|
| index f9ae5f9d26bd5b66ff7fda38312654e5ed8073b2..4f14a0d3e42ec7d48842d45ab6956a8b83059969 100644
|
| --- a/src/profile-generator.h
|
| +++ b/src/profile-generator.h
|
| @@ -35,6 +35,8 @@
|
| namespace v8 {
|
| namespace internal {
|
|
|
| +typedef uint32_t ObjectId;
|
| +
|
| class TokenEnumerator {
|
| public:
|
| TokenEnumerator();
|
| @@ -533,7 +535,7 @@ class HeapEntry BASE_EMBEDDED {
|
| void Init(HeapSnapshot* snapshot,
|
| Type type,
|
| const char* name,
|
| - uint64_t id,
|
| + ObjectId id,
|
| int self_size,
|
| int children_count,
|
| int retainers_count);
|
| @@ -542,7 +544,7 @@ class HeapEntry BASE_EMBEDDED {
|
| Type type() { return static_cast<Type>(type_); }
|
| const char* name() { return name_; }
|
| void set_name(const char* name) { name_ = name; }
|
| - inline uint64_t id();
|
| + inline ObjectId id();
|
| int self_size() { return self_size_; }
|
| int retained_size() { return retained_size_; }
|
| void add_retained_size(int size) { retained_size_ += size; }
|
| @@ -651,7 +653,7 @@ class HeapSnapshot {
|
| int entries_count, int children_count, int retainers_count);
|
| HeapEntry* AddEntry(HeapEntry::Type type,
|
| const char* name,
|
| - uint64_t id,
|
| + ObjectId id,
|
| int size,
|
| int children_count,
|
| int retainers_count);
|
| @@ -662,7 +664,7 @@ class HeapSnapshot {
|
| int retainers_count);
|
| HeapEntry* AddNativesRootEntry(int children_count, int retainers_count);
|
| void ClearPaint();
|
| - HeapEntry* GetEntryById(uint64_t id);
|
| + HeapEntry* GetEntryById(ObjectId id);
|
| List<HeapEntry*>* GetSortedEntriesList();
|
| template<class Visitor>
|
| void IterateEntries(Visitor* visitor) { entries_.Iterate(visitor); }
|
| @@ -699,29 +701,29 @@ class HeapObjectsMap {
|
| ~HeapObjectsMap();
|
|
|
| void SnapshotGenerationFinished();
|
| - uint64_t FindObject(Address addr);
|
| + ObjectId FindObject(Address addr);
|
| void MoveObject(Address from, Address to);
|
|
|
| - static uint64_t GenerateId(v8::RetainedObjectInfo* info);
|
| - static inline uint64_t GetNthGcSubrootId(int delta);
|
| + static ObjectId GenerateId(v8::RetainedObjectInfo* info);
|
| + static inline ObjectId GetNthGcSubrootId(int delta);
|
|
|
| static const int kObjectIdStep = 2;
|
| - static const uint64_t kInternalRootObjectId;
|
| - static const uint64_t kGcRootsObjectId;
|
| - static const uint64_t kNativesRootObjectId;
|
| - static const uint64_t kGcRootsFirstSubrootId;
|
| - static const uint64_t kFirstAvailableObjectId;
|
| + static const ObjectId kInternalRootObjectId;
|
| + static const ObjectId kGcRootsObjectId;
|
| + static const ObjectId kNativesRootObjectId;
|
| + static const ObjectId kGcRootsFirstSubrootId;
|
| + static const ObjectId kFirstAvailableObjectId;
|
|
|
| private:
|
| struct EntryInfo {
|
| - explicit EntryInfo(uint64_t id) : id(id), accessed(true) { }
|
| - EntryInfo(uint64_t id, bool accessed) : id(id), accessed(accessed) { }
|
| - uint64_t id;
|
| + explicit EntryInfo(ObjectId id) : id(id), accessed(true) { }
|
| + EntryInfo(ObjectId id, bool accessed) : id(id), accessed(accessed) { }
|
| + ObjectId id;
|
| bool accessed;
|
| };
|
|
|
| - void AddEntry(Address addr, uint64_t id);
|
| - uint64_t FindEntry(Address addr);
|
| + void AddEntry(Address addr, ObjectId id);
|
| + ObjectId FindEntry(Address addr);
|
| void RemoveDeadEntries();
|
|
|
| static bool AddressesMatch(void* key1, void* key2) {
|
| @@ -735,7 +737,7 @@ class HeapObjectsMap {
|
| }
|
|
|
| bool initial_fill_mode_;
|
| - uint64_t next_id_;
|
| + ObjectId next_id_;
|
| HashMap entries_map_;
|
| List<EntryInfo>* entries_;
|
|
|
| @@ -760,8 +762,8 @@ class HeapSnapshotsCollection {
|
| StringsStorage* names() { return &names_; }
|
| TokenEnumerator* token_enumerator() { return token_enumerator_; }
|
|
|
| - uint64_t GetObjectId(Address addr) { return ids_.FindObject(addr); }
|
| - Handle<HeapObject> FindHeapObjectById(uint64_t id);
|
| + ObjectId GetObjectId(Address addr) { return ids_.FindObject(addr); }
|
| + Handle<HeapObject> FindHeapObjectById(ObjectId id);
|
| void ObjectMoveEvent(Address from, Address to) { ids_.MoveObject(from, to); }
|
|
|
| private:
|
|
|