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

Side by Side Diff: src/heap-snapshot-generator.h

Issue 22715004: Version 3.20.15 (Closed) Base URL: https://v8.googlecode.com/svn/trunk
Patch Set: Add TypedArray API and correctness patches r16033 and r16084 Created 7 years, 4 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 | « src/heap.cc ('k') | src/heap-snapshot-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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 struct TimeInterval { 259 struct TimeInterval {
260 explicit TimeInterval(SnapshotObjectId id) : id(id), size(0), count(0) { } 260 explicit TimeInterval(SnapshotObjectId id) : id(id), size(0), count(0) { }
261 SnapshotObjectId id; 261 SnapshotObjectId id;
262 uint32_t size; 262 uint32_t size;
263 uint32_t count; 263 uint32_t count;
264 }; 264 };
265 265
266 void UpdateHeapObjectsMap(); 266 void UpdateHeapObjectsMap();
267 void RemoveDeadEntries(); 267 void RemoveDeadEntries();
268 268
269 static bool AddressesMatch(void* key1, void* key2) {
270 return key1 == key2;
271 }
272
273 static uint32_t AddressHash(Address addr) {
274 return ComputeIntegerHash(
275 static_cast<uint32_t>(reinterpret_cast<uintptr_t>(addr)),
276 v8::internal::kZeroHashSeed);
277 }
278
269 SnapshotObjectId next_id_; 279 SnapshotObjectId next_id_;
270 HashMap entries_map_; 280 HashMap entries_map_;
271 List<EntryInfo> entries_; 281 List<EntryInfo> entries_;
272 List<TimeInterval> time_intervals_; 282 List<TimeInterval> time_intervals_;
273 Heap* heap_; 283 Heap* heap_;
274 284
275 DISALLOW_COPY_AND_ASSIGN(HeapObjectsMap); 285 DISALLOW_COPY_AND_ASSIGN(HeapObjectsMap);
276 }; 286 };
277 287
278 288
(...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after
668 friend class HeapSnapshotJSONSerializerIterator; 678 friend class HeapSnapshotJSONSerializerIterator;
669 679
670 DISALLOW_COPY_AND_ASSIGN(HeapSnapshotJSONSerializer); 680 DISALLOW_COPY_AND_ASSIGN(HeapSnapshotJSONSerializer);
671 }; 681 };
672 682
673 683
674 } } // namespace v8::internal 684 } } // namespace v8::internal
675 685
676 #endif // V8_HEAP_SNAPSHOT_GENERATOR_H_ 686 #endif // V8_HEAP_SNAPSHOT_GENERATOR_H_
677 687
OLDNEW
« no previous file with comments | « src/heap.cc ('k') | src/heap-snapshot-generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698