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

Side by Side Diff: chrome/browser/metrics/metrics_memory_details.cc

Issue 2694363007: Add memory and CPU histogram for OOPIF
Patch Set: Created 3 years, 10 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/metrics/metrics_memory_details.h" 5 #include "chrome/browser/metrics/metrics_memory_details.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <vector> 9 #include <vector>
10 10
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 switch (browser.processes[index].process_type) { 95 switch (browser.processes[index].process_type) {
96 case content::PROCESS_TYPE_BROWSER: 96 case content::PROCESS_TYPE_BROWSER:
97 UMA_HISTOGRAM_MEMORY_LARGE_MB("Memory.Browser.Large2", sample / 1024); 97 UMA_HISTOGRAM_MEMORY_LARGE_MB("Memory.Browser.Large2", sample / 1024);
98 UMA_HISTOGRAM_MEMORY_LARGE_MB("Memory.Browser.Committed", 98 UMA_HISTOGRAM_MEMORY_LARGE_MB("Memory.Browser.Committed",
99 committed / 1024); 99 committed / 1024);
100 continue; 100 continue;
101 case content::PROCESS_TYPE_RENDERER: { 101 case content::PROCESS_TYPE_RENDERER: {
102 UMA_HISTOGRAM_MEMORY_LARGE_MB("Memory.RendererAll", sample / 1024); 102 UMA_HISTOGRAM_MEMORY_LARGE_MB("Memory.RendererAll", sample / 1024);
103 UMA_HISTOGRAM_MEMORY_LARGE_MB("Memory.RendererAll.Committed", 103 UMA_HISTOGRAM_MEMORY_LARGE_MB("Memory.RendererAll.Committed",
104 committed / 1024); 104 committed / 1024);
105 if (browser.processes[index].contains_oopif)
106 UMA_HISTOGRAM_MEMORY_KB("SiteIsolation.Oopif.Memory", sample);
105 ProcessMemoryInformation::RendererProcessType renderer_type = 107 ProcessMemoryInformation::RendererProcessType renderer_type =
106 browser.processes[index].renderer_type; 108 browser.processes[index].renderer_type;
107 switch (renderer_type) { 109 switch (renderer_type) {
108 case ProcessMemoryInformation::RENDERER_EXTENSION: 110 case ProcessMemoryInformation::RENDERER_EXTENSION:
109 UMA_HISTOGRAM_MEMORY_KB("Memory.Extension", sample); 111 UMA_HISTOGRAM_MEMORY_KB("Memory.Extension", sample);
110 extension_count++; 112 extension_count++;
111 continue; 113 continue;
112 case ProcessMemoryInformation::RENDERER_CHROME: 114 case ProcessMemoryInformation::RENDERER_CHROME:
113 UMA_HISTOGRAM_MEMORY_KB("Memory.Chrome", sample); 115 UMA_HISTOGRAM_MEMORY_KB("Memory.Chrome", sample);
114 chrome_count++; 116 chrome_count++;
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
317 memory_growth_tracker_->UpdateSample(process_entry.pid, sample, 319 memory_growth_tracker_->UpdateSample(process_entry.pid, sample,
318 &diff) && 320 &diff) &&
319 generate_histograms_) { 321 generate_histograms_) {
320 if (diff < 0) 322 if (diff < 0)
321 UMA_HISTOGRAM_MEMORY_KB("Memory.RendererShrinkIn30Min", -diff); 323 UMA_HISTOGRAM_MEMORY_KB("Memory.RendererShrinkIn30Min", -diff);
322 else 324 else
323 UMA_HISTOGRAM_MEMORY_KB("Memory.RendererGrowthIn30Min", diff); 325 UMA_HISTOGRAM_MEMORY_KB("Memory.RendererGrowthIn30Min", diff);
324 } 326 }
325 } 327 }
326 } 328 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698