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

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

Issue 10031032: I'd like to add addr field into EntryInfo struct. (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') | src/profile-generator.cc » ('J')
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 704 matching lines...) Expand 10 before | Expand all | Expand 10 after
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);
736 int UpdateEntryInfoAddress(Address addr, uint32_t hash, Address new_addr);
mnaganov (inactive) 2012/04/10 13:50:14 hash -> addr_hash. Otherwise, it's not clear where
735 void RemoveDeadEntries(); 737 void RemoveDeadEntries();
736 738
737 static bool AddressesMatch(void* key1, void* key2) { 739 static bool AddressesMatch(void* key1, void* key2) {
738 return key1 == key2; 740 return key1 == key2;
739 } 741 }
740 742
741 static uint32_t AddressHash(Address addr) { 743 static uint32_t AddressHash(Address addr) {
742 return ComputeIntegerHash( 744 return ComputeIntegerHash(
743 static_cast<uint32_t>(reinterpret_cast<uintptr_t>(addr)), 745 static_cast<uint32_t>(reinterpret_cast<uintptr_t>(addr)),
744 v8::internal::kZeroHashSeed); 746 v8::internal::kZeroHashSeed);
(...skipping 419 matching lines...) Expand 10 before | Expand all | Expand 10 after
1164 1166
1165 friend class HeapSnapshotJSONSerializerEnumerator; 1167 friend class HeapSnapshotJSONSerializerEnumerator;
1166 friend class HeapSnapshotJSONSerializerIterator; 1168 friend class HeapSnapshotJSONSerializerIterator;
1167 1169
1168 DISALLOW_COPY_AND_ASSIGN(HeapSnapshotJSONSerializer); 1170 DISALLOW_COPY_AND_ASSIGN(HeapSnapshotJSONSerializer);
1169 }; 1171 };
1170 1172
1171 } } // namespace v8::internal 1173 } } // namespace v8::internal
1172 1174
1173 #endif // V8_PROFILE_GENERATOR_H_ 1175 #endif // V8_PROFILE_GENERATOR_H_
OLDNEW
« no previous file with comments | « no previous file | src/profile-generator.cc » ('j') | src/profile-generator.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698