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 770 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
781 HeapSnapshot* NewSnapshot( | 781 HeapSnapshot* NewSnapshot( |
782 HeapSnapshot::Type type, const char* name, unsigned uid); | 782 HeapSnapshot::Type type, const char* name, unsigned uid); |
783 void SnapshotGenerationFinished(HeapSnapshot* snapshot); | 783 void SnapshotGenerationFinished(HeapSnapshot* snapshot); |
784 List<HeapSnapshot*>* snapshots() { return &snapshots_; } | 784 List<HeapSnapshot*>* snapshots() { return &snapshots_; } |
785 HeapSnapshot* GetSnapshot(unsigned uid); | 785 HeapSnapshot* GetSnapshot(unsigned uid); |
786 void RemoveSnapshot(HeapSnapshot* snapshot); | 786 void RemoveSnapshot(HeapSnapshot* snapshot); |
787 | 787 |
788 StringsStorage* names() { return &names_; } | 788 StringsStorage* names() { return &names_; } |
789 TokenEnumerator* token_enumerator() { return token_enumerator_; } | 789 TokenEnumerator* token_enumerator() { return token_enumerator_; } |
790 | 790 |
| 791 SnapshotObjectId FindObjectId(Address object_addr) { |
| 792 return ids_.FindEntry(object_addr); |
| 793 } |
791 SnapshotObjectId GetObjectId(Address object_addr, int object_size) { | 794 SnapshotObjectId GetObjectId(Address object_addr, int object_size) { |
792 return ids_.FindOrAddEntry(object_addr, object_size); | 795 return ids_.FindOrAddEntry(object_addr, object_size); |
793 } | 796 } |
794 Handle<HeapObject> FindHeapObjectById(SnapshotObjectId id); | 797 Handle<HeapObject> FindHeapObjectById(SnapshotObjectId id); |
795 void ObjectMoveEvent(Address from, Address to) { ids_.MoveObject(from, to); } | 798 void ObjectMoveEvent(Address from, Address to) { ids_.MoveObject(from, to); } |
796 SnapshotObjectId last_assigned_id() const { | 799 SnapshotObjectId last_assigned_id() const { |
797 return ids_.last_assigned_id(); | 800 return ids_.last_assigned_id(); |
798 } | 801 } |
799 | 802 |
800 private: | 803 private: |
(...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1186 | 1189 |
1187 friend class HeapSnapshotJSONSerializerEnumerator; | 1190 friend class HeapSnapshotJSONSerializerEnumerator; |
1188 friend class HeapSnapshotJSONSerializerIterator; | 1191 friend class HeapSnapshotJSONSerializerIterator; |
1189 | 1192 |
1190 DISALLOW_COPY_AND_ASSIGN(HeapSnapshotJSONSerializer); | 1193 DISALLOW_COPY_AND_ASSIGN(HeapSnapshotJSONSerializer); |
1191 }; | 1194 }; |
1192 | 1195 |
1193 } } // namespace v8::internal | 1196 } } // namespace v8::internal |
1194 | 1197 |
1195 #endif // V8_PROFILE_GENERATOR_H_ | 1198 #endif // V8_PROFILE_GENERATOR_H_ |
OLD | NEW |