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

Unified Diff: src/profile-generator.cc

Issue 9695046: Store entry id as 32-bit int. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/profile-generator.h ('k') | src/profile-generator-inl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/profile-generator.cc
diff --git a/src/profile-generator.cc b/src/profile-generator.cc
index ca975652afe525f1c0f0d6a88819bd44281ed6e8..2d0984ecbf36d4d09d9d687b11420320ce13ce25 100644
--- a/src/profile-generator.cc
+++ b/src/profile-generator.cc
@@ -978,12 +978,7 @@ void HeapEntry::Init(HeapSnapshot* snapshot,
children_count_ = children_count;
retainers_count_ = retainers_count;
dominator_ = NULL;
-
- union {
- SnapshotObjectId set_id;
- Id stored_id;
- } id_adaptor = {id};
- id_ = id_adaptor.stored_id;
+ id_ = id;
}
@@ -1113,7 +1108,7 @@ template <size_t ptr_size> struct SnapshotSizeConstants;
template <> struct SnapshotSizeConstants<4> {
static const int kExpectedHeapGraphEdgeSize = 12;
- static const int kExpectedHeapEntrySize = 36;
+ static const int kExpectedHeapEntrySize = 32;
static const size_t kMaxSerializableSnapshotRawSize = 256 * MB;
};
@@ -1139,10 +1134,10 @@ HeapSnapshot::HeapSnapshot(HeapSnapshotsCollection* collection,
natives_root_entry_(NULL),
raw_entries_(NULL),
entries_sorted_(false) {
- STATIC_ASSERT(
+ STATIC_CHECK(
sizeof(HeapGraphEdge) ==
SnapshotSizeConstants<kPointerSize>::kExpectedHeapGraphEdgeSize);
- STATIC_ASSERT(
+ STATIC_CHECK(
sizeof(HeapEntry) ==
SnapshotSizeConstants<kPointerSize>::kExpectedHeapEntrySize);
for (int i = 0; i < VisitorSynchronization::kNumberOfSyncTags; ++i) {
« no previous file with comments | « src/profile-generator.h ('k') | src/profile-generator-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698