OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/file_version_info.h" | 8 #include "base/file_version_info.h" |
9 #include "base/metrics/histogram.h" | 9 #include "base/metrics/histogram.h" |
10 #include "base/process_util.h" | 10 #include "base/process_util.h" |
(...skipping 15 matching lines...) Expand all Loading... |
26 #include "content/public/common/bindings_policy.h" | 26 #include "content/public/common/bindings_policy.h" |
27 #include "grit/chromium_strings.h" | 27 #include "grit/chromium_strings.h" |
28 #include "grit/generated_resources.h" | 28 #include "grit/generated_resources.h" |
29 #include "ui/base/l10n/l10n_util.h" | 29 #include "ui/base/l10n/l10n_util.h" |
30 | 30 |
31 #if defined(OS_POSIX) && !defined(OS_MACOSX) | 31 #if defined(OS_POSIX) && !defined(OS_MACOSX) |
32 #include "content/browser/renderer_host/render_sandbox_host_linux.h" | 32 #include "content/browser/renderer_host/render_sandbox_host_linux.h" |
33 #include "content/browser/zygote_host_linux.h" | 33 #include "content/browser/zygote_host_linux.h" |
34 #endif | 34 #endif |
35 | 35 |
| 36 using content::BrowserThread; |
| 37 |
36 ProcessMemoryInformation::ProcessMemoryInformation() | 38 ProcessMemoryInformation::ProcessMemoryInformation() |
37 : pid(0), | 39 : pid(0), |
38 num_processes(0), | 40 num_processes(0), |
39 is_diagnostics(false), | 41 is_diagnostics(false), |
40 type(ChildProcessInfo::UNKNOWN_PROCESS), | 42 type(ChildProcessInfo::UNKNOWN_PROCESS), |
41 renderer_type(ChildProcessInfo::RENDERER_UNKNOWN) { | 43 renderer_type(ChildProcessInfo::RENDERER_UNKNOWN) { |
42 } | 44 } |
43 | 45 |
44 ProcessMemoryInformation::~ProcessMemoryInformation() {} | 46 ProcessMemoryInformation::~ProcessMemoryInformation() {} |
45 | 47 |
(...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
366 UMA_HISTOGRAM_COUNTS_100("Memory.PepperPluginProcessCount", | 368 UMA_HISTOGRAM_COUNTS_100("Memory.PepperPluginProcessCount", |
367 pepper_plugin_count); | 369 pepper_plugin_count); |
368 UMA_HISTOGRAM_COUNTS_100("Memory.RendererProcessCount", renderer_count); | 370 UMA_HISTOGRAM_COUNTS_100("Memory.RendererProcessCount", renderer_count); |
369 UMA_HISTOGRAM_COUNTS_100("Memory.WorkerProcessCount", worker_count); | 371 UMA_HISTOGRAM_COUNTS_100("Memory.WorkerProcessCount", worker_count); |
370 // TODO(viettrungluu): Do we want separate counts for the other | 372 // TODO(viettrungluu): Do we want separate counts for the other |
371 // (platform-specific) process types? | 373 // (platform-specific) process types? |
372 | 374 |
373 int total_sample = static_cast<int>(aggregate_memory / 1000); | 375 int total_sample = static_cast<int>(aggregate_memory / 1000); |
374 UMA_HISTOGRAM_MEMORY_MB("Memory.Total", total_sample); | 376 UMA_HISTOGRAM_MEMORY_MB("Memory.Total", total_sample); |
375 } | 377 } |
OLD | NEW |