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 "components/metrics/system_memory_stats_recorder.h" | 5 #include "components/metrics/system_memory_stats_recorder.h" |
6 | 6 |
7 #include "base/metrics/histogram_macros.h" | 7 #include "base/metrics/histogram_macros.h" |
8 #include "base/process/process_metrics.h" | 8 #include "base/process/process_metrics.h" |
| 9 #include "build/build_config.h" |
9 | 10 |
10 namespace metrics { | 11 namespace metrics { |
11 | 12 |
12 // Record a size in megabytes, a potential interval from 250MB up to 32 GB. | 13 // Record a size in megabytes, a potential interval from 250MB up to 32 GB. |
13 #define UMA_HISTOGRAM_ALLOCATED_MEGABYTES(name, sample) \ | 14 #define UMA_HISTOGRAM_ALLOCATED_MEGABYTES(name, sample) \ |
14 UMA_HISTOGRAM_CUSTOM_COUNTS(name, sample, 250, 32768, 50) | 15 UMA_HISTOGRAM_CUSTOM_COUNTS(name, sample, 250, 32768, 50) |
15 | 16 |
16 // Records a statistics |sample| for UMA histogram |name| | 17 // Records a statistics |sample| for UMA histogram |name| |
17 // using a linear distribution of buckets. | 18 // using a linear distribution of buckets. |
18 #define UMA_HISTOGRAM_LINEAR(name, sample, max, buckets) \ | 19 #define UMA_HISTOGRAM_LINEAR(name, sample, max, buckets) \ |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 UMA_HISTOGRAM_ALLOCATED_MEGABYTES( | 89 UMA_HISTOGRAM_ALLOCATED_MEGABYTES( |
89 "Memory.OOMKill.Extensions.MemAllocatedMB", mem_allocated_mb); | 90 "Memory.OOMKill.Extensions.MemAllocatedMB", mem_allocated_mb); |
90 UMA_HISTOGRAM_LARGE_MEMORY_MB("Memory.OOMKill.Extensions.MemAvailableMB", | 91 UMA_HISTOGRAM_LARGE_MEMORY_MB("Memory.OOMKill.Extensions.MemAvailableMB", |
91 mem_available_mb); | 92 mem_available_mb); |
92 break; | 93 break; |
93 } | 94 } |
94 } | 95 } |
95 } | 96 } |
96 | 97 |
97 } // namespace metrics | 98 } // namespace metrics |
OLD | NEW |