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

Unified Diff: src/profiler/heap-snapshot-generator.cc

Issue 2001073002: [build] Fix a clang warning (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase Created 4 years, 7 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/profiler/allocation-tracker.cc ('k') | src/profiler/profile-generator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/profiler/heap-snapshot-generator.cc
diff --git a/src/profiler/heap-snapshot-generator.cc b/src/profiler/heap-snapshot-generator.cc
index e67acef268f1fdc340425ac07f59182287f3232c..1e056e25390e9cb96cf6832c13e47046d3c4398d 100644
--- a/src/profiler/heap-snapshot-generator.cc
+++ b/src/profiler/heap-snapshot-generator.cc
@@ -412,10 +412,8 @@ bool HeapObjectsMap::MoveObject(Address from, Address to, int object_size) {
// object is migrated.
if (FLAG_heap_profiler_trace_objects) {
PrintF("Move object from %p to %p old size %6d new size %6d\n",
- from,
- to,
- entries_.at(from_entry_info_index).size,
- object_size);
+ static_cast<void*>(from), static_cast<void*>(to),
+ entries_.at(from_entry_info_index).size, object_size);
}
entries_.at(from_entry_info_index).size = object_size;
to_entry->value = from_value;
@@ -452,9 +450,7 @@ SnapshotObjectId HeapObjectsMap::FindOrAddEntry(Address addr,
entry_info.accessed = accessed;
if (FLAG_heap_profiler_trace_objects) {
PrintF("Update object size : %p with old size %d and new size %d\n",
- addr,
- entry_info.size,
- size);
+ static_cast<void*>(addr), entry_info.size, size);
}
entry_info.size = size;
return entry_info.id;
@@ -487,9 +483,8 @@ void HeapObjectsMap::UpdateHeapObjectsMap() {
FindOrAddEntry(obj->address(), obj->Size());
if (FLAG_heap_profiler_trace_objects) {
PrintF("Update object : %p %6d. Next address is %p\n",
- obj->address(),
- obj->Size(),
- obj->address() + obj->Size());
+ static_cast<void*>(obj->address()), obj->Size(),
+ static_cast<void*>(obj->address() + obj->Size()));
}
}
RemoveDeadEntries();
@@ -517,20 +512,16 @@ struct HeapObjectInfo {
void Print() const {
if (expected_size == 0) {
PrintF("Untracked object : %p %6d. Next address is %p\n",
- obj->address(),
- obj->Size(),
- obj->address() + obj->Size());
+ static_cast<void*>(obj->address()), obj->Size(),
+ static_cast<void*>(obj->address() + obj->Size()));
} else if (obj->Size() != expected_size) {
- PrintF("Wrong size %6d: %p %6d. Next address is %p\n",
- expected_size,
- obj->address(),
- obj->Size(),
- obj->address() + obj->Size());
+ PrintF("Wrong size %6d: %p %6d. Next address is %p\n", expected_size,
+ static_cast<void*>(obj->address()), obj->Size(),
+ static_cast<void*>(obj->address() + obj->Size()));
} else {
PrintF("Good object : %p %6d. Next address is %p\n",
- obj->address(),
- expected_size,
- obj->address() + obj->Size());
+ static_cast<void*>(obj->address()), expected_size,
+ static_cast<void*>(obj->address() + obj->Size()));
}
}
};
« no previous file with comments | « src/profiler/allocation-tracker.cc ('k') | src/profiler/profile-generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698