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

Side by Side Diff: components/metrics/system_memory_stats_recorder_linux.cc

Issue 1366643002: Extract guts of ChromeStabilityMetricsProvider into helper class (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 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 unified diff | Download patch
OLDNEW
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/memory/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 9
10 namespace memory { 10 namespace metrics {
11 11
12 // Record a size in megabytes, a potential interval from 250MB up to 32 GB. 12 // Record a size in megabytes, a potential interval from 250MB up to 32 GB.
13 #define UMA_HISTOGRAM_ALLOCATED_MEGABYTES(name, sample) \ 13 #define UMA_HISTOGRAM_ALLOCATED_MEGABYTES(name, sample) \
14 UMA_HISTOGRAM_CUSTOM_COUNTS(name, sample, 250, 32768, 50) 14 UMA_HISTOGRAM_CUSTOM_COUNTS(name, sample, 250, 32768, 50)
15 15
16 // Records a statistics |sample| for UMA histogram |name| 16 // Records a statistics |sample| for UMA histogram |name|
17 // using a linear distribution of buckets. 17 // using a linear distribution of buckets.
18 #define UMA_HISTOGRAM_LINEAR(name, sample, max, buckets) \ 18 #define UMA_HISTOGRAM_LINEAR(name, sample, max, buckets) \
19 STATIC_HISTOGRAM_POINTER_BLOCK( \ 19 STATIC_HISTOGRAM_POINTER_BLOCK( \
20 name, Add(sample), \ 20 name, Add(sample), \
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 #endif 87 #endif
88 UMA_HISTOGRAM_ALLOCATED_MEGABYTES( 88 UMA_HISTOGRAM_ALLOCATED_MEGABYTES(
89 "Memory.OOMKill.Extensions.MemAllocatedMB", mem_allocated_mb); 89 "Memory.OOMKill.Extensions.MemAllocatedMB", mem_allocated_mb);
90 UMA_HISTOGRAM_LARGE_MEMORY_MB("Memory.OOMKill.Extensions.MemAvailableMB", 90 UMA_HISTOGRAM_LARGE_MEMORY_MB("Memory.OOMKill.Extensions.MemAvailableMB",
91 mem_available_mb); 91 mem_available_mb);
92 break; 92 break;
93 } 93 }
94 } 94 }
95 } 95 }
96 96
97 } // namespace memory 97 } // namespace metrics
OLDNEW
« no previous file with comments | « components/metrics/system_memory_stats_recorder.h ('k') | components/metrics/system_memory_stats_recorder_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698