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

Unified Diff: content/browser/renderer_host/render_process_host_impl.cc

Issue 2604433002: Adjust memory sizes of persistent histogram allocations. (Closed)
Patch Set: Created 4 years 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 | « content/browser/browser_child_process_host_impl.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/render_process_host_impl.cc
diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc
index 5948e63c9a409613478ea7abe13bd13270ac8123..4def1f6f8f0fd74a11a9c39ae3a3cc304c204924 100644
--- a/content/browser/renderer_host/render_process_host_impl.cc
+++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -2603,7 +2603,10 @@ void RenderProcessHostImpl::CreateSharedRendererHistogramAllocator() {
// method will get called a second time meaning that a metrics-allocator
// already exists. Don't recreate it.
if (!metrics_allocator_) {
- // TODO(bcwhite): Update this with the correct memory size.
+ // Create persistent/shared memory and allow histograms to be stored in
+ // it. Memory that is not actualy used won't be physically mapped by the
+ // system. RendererMetrics usage, as reported in UMA, peaked around 0.7MiB
+ // as of 2016-12-20.
std::unique_ptr<base::SharedMemory> shm(new base::SharedMemory());
if (!shm->CreateAndMapAnonymous(2 << 20)) // 2 MiB
return;
« no previous file with comments | « content/browser/browser_child_process_host_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698