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

Unified Diff: chrome/browser/memory_details.cc

Issue 173261: (Mac) Implement about:memory. (Closed)
Patch Set: Fixed per jrg's (re)review. Created 11 years, 2 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 | « chrome/browser/memory_details.h ('k') | chrome/browser/memory_details_mac.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/memory_details.cc
diff --git a/chrome/browser/memory_details.cc b/chrome/browser/memory_details.cc
index d96afdc8cebca4a7d508ea0a8fc65222072ba6dd..7a5f220a3b8645a5bd119c4fa28ceb72a9ab48b7 100644
--- a/chrome/browser/memory_details.cc
+++ b/chrome/browser/memory_details.cc
@@ -186,31 +186,34 @@ void MemoryDetails::UpdateHistograms() {
int sample = static_cast<int>(browser.processes[index].working_set.priv);
aggregate_memory += sample;
switch (browser.processes[index].type) {
- case ChildProcessInfo::BROWSER_PROCESS:
- UMA_HISTOGRAM_MEMORY_KB("Memory.Browser", sample);
- break;
- case ChildProcessInfo::RENDER_PROCESS:
- UMA_HISTOGRAM_MEMORY_KB("Memory.Renderer", sample);
- break;
- case ChildProcessInfo::PLUGIN_PROCESS:
- UMA_HISTOGRAM_MEMORY_KB("Memory.Plugin", sample);
- plugin_count++;
- break;
- case ChildProcessInfo::WORKER_PROCESS:
- UMA_HISTOGRAM_MEMORY_KB("Memory.Worker", sample);
- worker_count++;
- break;
- case ChildProcessInfo::ZYGOTE_PROCESS:
- UMA_HISTOGRAM_MEMORY_KB("Memory.Zygote", sample);
- break;
- case ChildProcessInfo::SANDBOX_HELPER_PROCESS:
- UMA_HISTOGRAM_MEMORY_KB("Memory.SandboxHelper", sample);
- break;
- case ChildProcessInfo::NACL_PROCESS:
- UMA_HISTOGRAM_MEMORY_KB("Memory.NativeClient", sample);
- break;
- default:
- NOTREACHED();
+ case ChildProcessInfo::BROWSER_PROCESS:
+ UMA_HISTOGRAM_MEMORY_KB("Memory.Browser", sample);
+ break;
+ case ChildProcessInfo::RENDER_PROCESS:
+ UMA_HISTOGRAM_MEMORY_KB("Memory.Renderer", sample);
+ break;
+ case ChildProcessInfo::PLUGIN_PROCESS:
+ UMA_HISTOGRAM_MEMORY_KB("Memory.Plugin", sample);
+ plugin_count++;
+ break;
+ case ChildProcessInfo::WORKER_PROCESS:
+ UMA_HISTOGRAM_MEMORY_KB("Memory.Worker", sample);
+ worker_count++;
+ break;
+ case ChildProcessInfo::UTILITY_PROCESS:
+ UMA_HISTOGRAM_MEMORY_KB("Memory.Utility", sample);
+ break;
+ case ChildProcessInfo::ZYGOTE_PROCESS:
+ UMA_HISTOGRAM_MEMORY_KB("Memory.Zygote", sample);
+ break;
+ case ChildProcessInfo::SANDBOX_HELPER_PROCESS:
+ UMA_HISTOGRAM_MEMORY_KB("Memory.SandboxHelper", sample);
+ break;
+ case ChildProcessInfo::NACL_PROCESS:
+ UMA_HISTOGRAM_MEMORY_KB("Memory.NativeClient", sample);
+ break;
+ default:
+ NOTREACHED();
}
}
UMA_HISTOGRAM_MEMORY_KB("Memory.BackingStore",
@@ -220,6 +223,8 @@ void MemoryDetails::UpdateHistograms() {
static_cast<int>(browser.processes.size()));
UMA_HISTOGRAM_COUNTS_100("Memory.PluginProcessCount", plugin_count);
UMA_HISTOGRAM_COUNTS_100("Memory.WorkerProcessCount", worker_count);
+ // TODO(viettrungluu): Do we want separate counts for the other
+ // (platform-specific) process types?
int total_sample = static_cast<int>(aggregate_memory / 1000);
UMA_HISTOGRAM_MEMORY_MB("Memory.Total", total_sample);
« no previous file with comments | « chrome/browser/memory_details.h ('k') | chrome/browser/memory_details_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698