OLD | NEW |
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> |
| 8 |
7 #include <vector> | 9 #include <vector> |
8 | 10 |
9 #include "base/location.h" | 11 #include "base/location.h" |
10 #include "base/metrics/histogram_macros.h" | 12 #include "base/metrics/histogram_macros.h" |
11 #include "base/single_thread_task_runner.h" | 13 #include "base/single_thread_task_runner.h" |
12 #include "base/strings/utf_string_conversions.h" | 14 #include "base/strings/utf_string_conversions.h" |
13 #include "base/thread_task_runner_handle.h" | 15 #include "base/thread_task_runner_handle.h" |
| 16 #include "build/build_config.h" |
14 #include "components/nacl/common/nacl_process_type.h" | 17 #include "components/nacl/common/nacl_process_type.h" |
15 #include "content/public/browser/render_process_host.h" | 18 #include "content/public/browser/render_process_host.h" |
16 #include "content/public/common/content_constants.h" | 19 #include "content/public/common/content_constants.h" |
17 #include "content/public/common/process_type.h" | 20 #include "content/public/common/process_type.h" |
18 | 21 |
19 MemoryGrowthTracker::MemoryGrowthTracker() { | 22 MemoryGrowthTracker::MemoryGrowthTracker() { |
20 } | 23 } |
21 | 24 |
22 MemoryGrowthTracker::~MemoryGrowthTracker() { | 25 MemoryGrowthTracker::~MemoryGrowthTracker() { |
23 } | 26 } |
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
303 UMA_HISTOGRAM_CUSTOM_COUNTS("Memory.Swap.NumWrites", swap_info().num_writes, | 306 UMA_HISTOGRAM_CUSTOM_COUNTS("Memory.Swap.NumWrites", swap_info().num_writes, |
304 1, 100000000, 100); | 307 1, 100000000, 100); |
305 | 308 |
306 if (swap_info().orig_data_size > 0 && swap_info().compr_data_size > 0) { | 309 if (swap_info().orig_data_size > 0 && swap_info().compr_data_size > 0) { |
307 UMA_HISTOGRAM_CUSTOM_COUNTS( | 310 UMA_HISTOGRAM_CUSTOM_COUNTS( |
308 "Memory.Swap.CompressionRatio", | 311 "Memory.Swap.CompressionRatio", |
309 swap_info().orig_data_size / swap_info().compr_data_size, 1, 20, 20); | 312 swap_info().orig_data_size / swap_info().compr_data_size, 1, 20, 20); |
310 } | 313 } |
311 } | 314 } |
312 #endif // defined(OS_CHROMEOS) | 315 #endif // defined(OS_CHROMEOS) |
OLD | NEW |