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

Unified Diff: chrome/browser/metrics/leak_detector_controller.cc

Issue 1868193003: Store alloc history data in memory leak report protobuf (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@leak-history
Patch Set: Created 4 years, 8 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/metrics/leak_detector_controller.cc
diff --git a/chrome/browser/metrics/leak_detector_controller.cc b/chrome/browser/metrics/leak_detector_controller.cc
index 06762ea035777b276d120c7f8b9b130795750397..19548ce15507a2b8a246876ec9a885b36d4e1c6c 100644
--- a/chrome/browser/metrics/leak_detector_controller.cc
+++ b/chrome/browser/metrics/leak_detector_controller.cc
@@ -119,6 +119,13 @@ void LeakDetectorController::OnLeakFound(
proto->mutable_call_stack()->Reserve(report.call_stack.size());
for (uintptr_t call_stack_entry : report.call_stack)
proto->mutable_call_stack()->Add(call_stack_entry);
+
+ for (const auto& entry : report.alloc_breakdown_history) {
+ auto* breakdown_proto = proto->add_alloc_breakdown_history();
+ for (const uint32_t count : entry.counts_by_size)
+ breakdown_proto->add_counts_by_size(count);
+ breakdown_proto->set_count_for_call_stack(entry.count_for_call_stack);
+ }
}
void LeakDetectorController::GetLeakReports(

Powered by Google App Engine
This is Rietveld 408576698