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 704 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
715 | 715 |
716 static const int kObjectIdStep = 2; | 716 static const int kObjectIdStep = 2; |
717 static const SnapshotObjectId kInternalRootObjectId; | 717 static const SnapshotObjectId kInternalRootObjectId; |
718 static const SnapshotObjectId kGcRootsObjectId; | 718 static const SnapshotObjectId kGcRootsObjectId; |
719 static const SnapshotObjectId kNativesRootObjectId; | 719 static const SnapshotObjectId kNativesRootObjectId; |
720 static const SnapshotObjectId kGcRootsFirstSubrootId; | 720 static const SnapshotObjectId kGcRootsFirstSubrootId; |
721 static const SnapshotObjectId kFirstAvailableObjectId; | 721 static const SnapshotObjectId kFirstAvailableObjectId; |
722 | 722 |
723 private: | 723 private: |
724 struct EntryInfo { | 724 struct EntryInfo { |
725 explicit EntryInfo(SnapshotObjectId id) : id(id), accessed(true) { } | 725 EntryInfo(SnapshotObjectId id, Address addr) |
726 EntryInfo(SnapshotObjectId id, bool accessed) | 726 : id(id), addr(addr), accessed(true) { } |
727 : id(id), | 727 EntryInfo(SnapshotObjectId id, Address addr, bool accessed) |
728 accessed(accessed) { } | 728 : id(id), addr(addr), accessed(accessed) { } |
729 SnapshotObjectId id; | 729 SnapshotObjectId id; |
| 730 Address addr; |
730 bool accessed; | 731 bool accessed; |
731 }; | 732 }; |
732 | 733 |
733 void AddEntry(Address addr, SnapshotObjectId id); | 734 void AddEntry(Address addr, SnapshotObjectId id); |
734 SnapshotObjectId FindEntry(Address addr); | 735 SnapshotObjectId FindEntry(Address addr); |
735 void RemoveDeadEntries(); | 736 void RemoveDeadEntries(); |
736 | 737 |
737 static bool AddressesMatch(void* key1, void* key2) { | 738 static bool AddressesMatch(void* key1, void* key2) { |
738 return key1 == key2; | 739 return key1 == key2; |
739 } | 740 } |
(...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1164 | 1165 |
1165 friend class HeapSnapshotJSONSerializerEnumerator; | 1166 friend class HeapSnapshotJSONSerializerEnumerator; |
1166 friend class HeapSnapshotJSONSerializerIterator; | 1167 friend class HeapSnapshotJSONSerializerIterator; |
1167 | 1168 |
1168 DISALLOW_COPY_AND_ASSIGN(HeapSnapshotJSONSerializer); | 1169 DISALLOW_COPY_AND_ASSIGN(HeapSnapshotJSONSerializer); |
1169 }; | 1170 }; |
1170 | 1171 |
1171 } } // namespace v8::internal | 1172 } } // namespace v8::internal |
1172 | 1173 |
1173 #endif // V8_PROFILE_GENERATOR_H_ | 1174 #endif // V8_PROFILE_GENERATOR_H_ |
OLD | NEW |