| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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/memory_details.h" | 5 #include "chrome/browser/memory_details.h" |
| 6 | 6 |
| 7 #include "app/l10n_util.h" | 7 #include "app/l10n_util.h" |
| 8 #include "base/file_version_info.h" | 8 #include "base/file_version_info.h" |
| 9 #include "base/process_util.h" | 9 #include "base/process_util.h" |
| 10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
| (...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 208 break; | 208 break; |
| 209 case ChildProcessInfo::ZYGOTE_PROCESS: | 209 case ChildProcessInfo::ZYGOTE_PROCESS: |
| 210 UMA_HISTOGRAM_MEMORY_KB("Memory.Zygote", sample); | 210 UMA_HISTOGRAM_MEMORY_KB("Memory.Zygote", sample); |
| 211 break; | 211 break; |
| 212 case ChildProcessInfo::SANDBOX_HELPER_PROCESS: | 212 case ChildProcessInfo::SANDBOX_HELPER_PROCESS: |
| 213 UMA_HISTOGRAM_MEMORY_KB("Memory.SandboxHelper", sample); | 213 UMA_HISTOGRAM_MEMORY_KB("Memory.SandboxHelper", sample); |
| 214 break; | 214 break; |
| 215 case ChildProcessInfo::NACL_LOADER_PROCESS: | 215 case ChildProcessInfo::NACL_LOADER_PROCESS: |
| 216 UMA_HISTOGRAM_MEMORY_KB("Memory.NativeClient", sample); | 216 UMA_HISTOGRAM_MEMORY_KB("Memory.NativeClient", sample); |
| 217 break; | 217 break; |
| 218 case ChildProcessInfo::NACL_BROKER_PROCESS: |
| 219 UMA_HISTOGRAM_MEMORY_KB("Memory.NativeClientBroker", sample); |
| 220 break; |
| 218 default: | 221 default: |
| 219 NOTREACHED(); | 222 NOTREACHED(); |
| 220 } | 223 } |
| 221 } | 224 } |
| 222 UMA_HISTOGRAM_MEMORY_KB("Memory.BackingStore", | 225 UMA_HISTOGRAM_MEMORY_KB("Memory.BackingStore", |
| 223 BackingStoreManager::MemorySize() / 1024); | 226 BackingStoreManager::MemorySize() / 1024); |
| 224 | 227 |
| 225 UMA_HISTOGRAM_COUNTS_100("Memory.ProcessCount", | 228 UMA_HISTOGRAM_COUNTS_100("Memory.ProcessCount", |
| 226 static_cast<int>(browser.processes.size())); | 229 static_cast<int>(browser.processes.size())); |
| 227 UMA_HISTOGRAM_COUNTS_100("Memory.PluginProcessCount", plugin_count); | 230 UMA_HISTOGRAM_COUNTS_100("Memory.PluginProcessCount", plugin_count); |
| 228 UMA_HISTOGRAM_COUNTS_100("Memory.WorkerProcessCount", worker_count); | 231 UMA_HISTOGRAM_COUNTS_100("Memory.WorkerProcessCount", worker_count); |
| 229 // TODO(viettrungluu): Do we want separate counts for the other | 232 // TODO(viettrungluu): Do we want separate counts for the other |
| 230 // (platform-specific) process types? | 233 // (platform-specific) process types? |
| 231 | 234 |
| 232 int total_sample = static_cast<int>(aggregate_memory / 1000); | 235 int total_sample = static_cast<int>(aggregate_memory / 1000); |
| 233 UMA_HISTOGRAM_MEMORY_MB("Memory.Total", total_sample); | 236 UMA_HISTOGRAM_MEMORY_MB("Memory.Total", total_sample); |
| 234 } | 237 } |
| OLD | NEW |