Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(132)

Side by Side Diff: src/profile-generator.h

Issue 9969197: Embed entries_ list into HeapObjectsMap by value. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | src/profile-generator.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 687 matching lines...) Expand 10 before | Expand all | Expand 10 after
698 698
699 friend class HeapSnapshotTester; 699 friend class HeapSnapshotTester;
700 700
701 DISALLOW_COPY_AND_ASSIGN(HeapSnapshot); 701 DISALLOW_COPY_AND_ASSIGN(HeapSnapshot);
702 }; 702 };
703 703
704 704
705 class HeapObjectsMap { 705 class HeapObjectsMap {
706 public: 706 public:
707 HeapObjectsMap(); 707 HeapObjectsMap();
708 ~HeapObjectsMap();
709 708
710 void SnapshotGenerationFinished(); 709 void SnapshotGenerationFinished();
711 SnapshotObjectId FindEntry(Address addr); 710 SnapshotObjectId FindEntry(Address addr);
712 SnapshotObjectId FindOrAddEntry(Address addr, unsigned int size); 711 SnapshotObjectId FindOrAddEntry(Address addr, unsigned int size);
713 void MoveObject(Address from, Address to); 712 void MoveObject(Address from, Address to);
714 SnapshotObjectId last_assigned_id() const { 713 SnapshotObjectId last_assigned_id() const {
715 return next_id_ - kObjectIdStep; 714 return next_id_ - kObjectIdStep;
716 } 715 }
717 716
718 void StopHeapObjectsTracking(); 717 void StopHeapObjectsTracking();
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
754 } 753 }
755 754
756 static uint32_t AddressHash(Address addr) { 755 static uint32_t AddressHash(Address addr) {
757 return ComputeIntegerHash( 756 return ComputeIntegerHash(
758 static_cast<uint32_t>(reinterpret_cast<uintptr_t>(addr)), 757 static_cast<uint32_t>(reinterpret_cast<uintptr_t>(addr)),
759 v8::internal::kZeroHashSeed); 758 v8::internal::kZeroHashSeed);
760 } 759 }
761 760
762 SnapshotObjectId next_id_; 761 SnapshotObjectId next_id_;
763 HashMap entries_map_; 762 HashMap entries_map_;
764 List<EntryInfo>* entries_; 763 List<EntryInfo> entries_;
765 List<TimeInterval> time_intervals_; 764 List<TimeInterval> time_intervals_;
766 765
767 DISALLOW_COPY_AND_ASSIGN(HeapObjectsMap); 766 DISALLOW_COPY_AND_ASSIGN(HeapObjectsMap);
768 }; 767 };
769 768
770 769
771 class HeapSnapshotsCollection { 770 class HeapSnapshotsCollection {
772 public: 771 public:
773 HeapSnapshotsCollection(); 772 HeapSnapshotsCollection();
774 ~HeapSnapshotsCollection(); 773 ~HeapSnapshotsCollection();
(...skipping 418 matching lines...) Expand 10 before | Expand all | Expand 10 after
1193 1192
1194 friend class HeapSnapshotJSONSerializerEnumerator; 1193 friend class HeapSnapshotJSONSerializerEnumerator;
1195 friend class HeapSnapshotJSONSerializerIterator; 1194 friend class HeapSnapshotJSONSerializerIterator;
1196 1195
1197 DISALLOW_COPY_AND_ASSIGN(HeapSnapshotJSONSerializer); 1196 DISALLOW_COPY_AND_ASSIGN(HeapSnapshotJSONSerializer);
1198 }; 1197 };
1199 1198
1200 } } // namespace v8::internal 1199 } } // namespace v8::internal
1201 1200
1202 #endif // V8_PROFILE_GENERATOR_H_ 1201 #endif // V8_PROFILE_GENERATOR_H_
OLDNEW
« no previous file with comments | « no previous file | src/profile-generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698