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

Unified Diff: src/profile-generator.h

Issue 3417019: Provide more functions to CPU profiler (fix issue 858). (Closed)
Patch Set: Hooked on MC/MS also Created 10 years, 3 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
« src/log.cc ('K') | « src/objects-inl.h ('k') | src/profile-generator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/profile-generator.h
diff --git a/src/profile-generator.h b/src/profile-generator.h
index a2ac82019b0b72e20e9e426a84c7bf5859735792..1e949a2cfb1106bff670df9a66331f47de390fe4 100644
--- a/src/profile-generator.h
+++ b/src/profile-generator.h
@@ -745,7 +745,8 @@ class HeapObjectsMap {
}
static uint32_t AddressHash(Address addr) {
- return static_cast<int32_t>(reinterpret_cast<intptr_t>(addr));
+ return ComputeIntegerHash(
+ static_cast<uint32_t>(reinterpret_cast<uintptr_t>(addr)));
}
bool initial_fill_mode_;
@@ -888,7 +889,8 @@ class HeapEntriesMap {
};
uint32_t Hash(HeapObject* object) {
- return static_cast<uint32_t>(reinterpret_cast<intptr_t>(object));
+ return ComputeIntegerHash(
+ static_cast<uint32_t>(reinterpret_cast<uintptr_t>(object)));
}
static bool HeapObjectsMatch(void* key1, void* key2) { return key1 == key2; }
@@ -995,7 +997,8 @@ class HeapSnapshotJSONSerializer {
}
INLINE(static uint32_t ObjectHash(const void* key)) {
- return static_cast<int32_t>(reinterpret_cast<intptr_t>(key));
+ return ComputeIntegerHash(
+ static_cast<uint32_t>(reinterpret_cast<uintptr_t>(key)));
}
void EnumerateNodes();
« src/log.cc ('K') | « src/objects-inl.h ('k') | src/profile-generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698