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

Unified Diff: chrome/browser/task_profiler/task_profiler_data_serializer.cc

Issue 2881493004: Marshal 64 bit byte counts as double to the profiler. (Closed)
Patch Set: Fix the serialization unit test. Created 3 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
Index: chrome/browser/task_profiler/task_profiler_data_serializer.cc
diff --git a/chrome/browser/task_profiler/task_profiler_data_serializer.cc b/chrome/browser/task_profiler/task_profiler_data_serializer.cc
index ffc07fc96fdf73f35ee9c7a17893636c2304a74b..e9444bfd1d8d6b27165f3f3ed35da87997a88a1a 100644
--- a/chrome/browser/task_profiler/task_profiler_data_serializer.cc
+++ b/chrome/browser/task_profiler/task_profiler_data_serializer.cc
@@ -68,10 +68,12 @@ void DeathDataSnapshotToValue(const DeathDataSnapshot& death_data,
dictionary->SetInteger("alloc_ops", death_data.alloc_ops);
dictionary->SetInteger("free_ops", death_data.free_ops);
- dictionary->SetInteger("allocated_bytes", death_data.allocated_bytes);
- dictionary->SetInteger("freed_bytes", death_data.freed_bytes);
- dictionary->SetInteger("alloc_overhead_bytes",
- death_data.alloc_overhead_bytes);
+ // The byte counts are 64 bit integers, pass them through as doubles, as
+ // integer values truncate to 32 bits.
+ dictionary->SetDouble("allocated_bytes", death_data.allocated_bytes);
+ dictionary->SetDouble("freed_bytes", death_data.freed_bytes);
+ dictionary->SetDouble("alloc_overhead_bytes",
+ death_data.alloc_overhead_bytes);
dictionary->SetInteger("max_allocated_bytes", death_data.max_allocated_bytes);
}

Powered by Google App Engine
This is Rietveld 408576698