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