| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 631 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 642 | 642 |
| 643 void SnapshotGenerationFinished(); | 643 void SnapshotGenerationFinished(); |
| 644 SnapshotObjectId FindEntry(Address addr); | 644 SnapshotObjectId FindEntry(Address addr); |
| 645 SnapshotObjectId FindOrAddEntry(Address addr, unsigned int size); | 645 SnapshotObjectId FindOrAddEntry(Address addr, unsigned int size); |
| 646 void MoveObject(Address from, Address to); | 646 void MoveObject(Address from, Address to); |
| 647 SnapshotObjectId last_assigned_id() const { | 647 SnapshotObjectId last_assigned_id() const { |
| 648 return next_id_ - kObjectIdStep; | 648 return next_id_ - kObjectIdStep; |
| 649 } | 649 } |
| 650 | 650 |
| 651 void StopHeapObjectsTracking(); | 651 void StopHeapObjectsTracking(); |
| 652 void PushHeapObjectsStats(OutputStream* stream); | 652 SnapshotObjectId PushHeapObjectsStats(OutputStream* stream); |
| 653 | 653 |
| 654 static SnapshotObjectId GenerateId(v8::RetainedObjectInfo* info); | 654 static SnapshotObjectId GenerateId(v8::RetainedObjectInfo* info); |
| 655 static inline SnapshotObjectId GetNthGcSubrootId(int delta); | 655 static inline SnapshotObjectId GetNthGcSubrootId(int delta); |
| 656 | 656 |
| 657 static const int kObjectIdStep = 2; | 657 static const int kObjectIdStep = 2; |
| 658 static const SnapshotObjectId kInternalRootObjectId; | 658 static const SnapshotObjectId kInternalRootObjectId; |
| 659 static const SnapshotObjectId kGcRootsObjectId; | 659 static const SnapshotObjectId kGcRootsObjectId; |
| 660 static const SnapshotObjectId kNativesRootObjectId; | 660 static const SnapshotObjectId kNativesRootObjectId; |
| 661 static const SnapshotObjectId kGcRootsFirstSubrootId; | 661 static const SnapshotObjectId kGcRootsFirstSubrootId; |
| 662 static const SnapshotObjectId kFirstAvailableObjectId; | 662 static const SnapshotObjectId kFirstAvailableObjectId; |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 700 DISALLOW_COPY_AND_ASSIGN(HeapObjectsMap); | 700 DISALLOW_COPY_AND_ASSIGN(HeapObjectsMap); |
| 701 }; | 701 }; |
| 702 | 702 |
| 703 | 703 |
| 704 class HeapSnapshotsCollection { | 704 class HeapSnapshotsCollection { |
| 705 public: | 705 public: |
| 706 HeapSnapshotsCollection(); | 706 HeapSnapshotsCollection(); |
| 707 ~HeapSnapshotsCollection(); | 707 ~HeapSnapshotsCollection(); |
| 708 | 708 |
| 709 bool is_tracking_objects() { return is_tracking_objects_; } | 709 bool is_tracking_objects() { return is_tracking_objects_; } |
| 710 void PushHeapObjectsStats(OutputStream* stream) { | 710 SnapshotObjectId PushHeapObjectsStats(OutputStream* stream) { |
| 711 return ids_.PushHeapObjectsStats(stream); | 711 return ids_.PushHeapObjectsStats(stream); |
| 712 } | 712 } |
| 713 void StartHeapObjectsTracking() { is_tracking_objects_ = true; } | 713 void StartHeapObjectsTracking() { is_tracking_objects_ = true; } |
| 714 void StopHeapObjectsTracking() { ids_.StopHeapObjectsTracking(); } | 714 void StopHeapObjectsTracking() { ids_.StopHeapObjectsTracking(); } |
| 715 | 715 |
| 716 HeapSnapshot* NewSnapshot( | 716 HeapSnapshot* NewSnapshot( |
| 717 HeapSnapshot::Type type, const char* name, unsigned uid); | 717 HeapSnapshot::Type type, const char* name, unsigned uid); |
| 718 void SnapshotGenerationFinished(HeapSnapshot* snapshot); | 718 void SnapshotGenerationFinished(HeapSnapshot* snapshot); |
| 719 List<HeapSnapshot*>* snapshots() { return &snapshots_; } | 719 List<HeapSnapshot*>* snapshots() { return &snapshots_; } |
| 720 HeapSnapshot* GetSnapshot(unsigned uid); | 720 HeapSnapshot* GetSnapshot(unsigned uid); |
| (...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1092 | 1092 |
| 1093 friend class HeapSnapshotJSONSerializerEnumerator; | 1093 friend class HeapSnapshotJSONSerializerEnumerator; |
| 1094 friend class HeapSnapshotJSONSerializerIterator; | 1094 friend class HeapSnapshotJSONSerializerIterator; |
| 1095 | 1095 |
| 1096 DISALLOW_COPY_AND_ASSIGN(HeapSnapshotJSONSerializer); | 1096 DISALLOW_COPY_AND_ASSIGN(HeapSnapshotJSONSerializer); |
| 1097 }; | 1097 }; |
| 1098 | 1098 |
| 1099 } } // namespace v8::internal | 1099 } } // namespace v8::internal |
| 1100 | 1100 |
| 1101 #endif // V8_PROFILE_GENERATOR_H_ | 1101 #endif // V8_PROFILE_GENERATOR_H_ |
| OLD | NEW |