• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2015 The Chromium Authors
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #ifndef COMPONENTS_METRICS_SYSTEM_MEMORY_STATS_RECORDER_H_
6 #define COMPONENTS_METRICS_SYSTEM_MEMORY_STATS_RECORDER_H_
7 
8 namespace metrics {
9 
10 // Record a memory size in megabytes, over a potential interval up to 32 GB.
11 #define UMA_HISTOGRAM_LARGE_MEMORY_MB(name, sample) \
12   UMA_HISTOGRAM_CUSTOM_COUNTS(name, sample, 1, 32768, 50)
13 
14 // The type of memory UMA stats to be recorded in RecordMemoryStats.
15 enum RecordMemoryStatsType {
16   // Right after the renderer for contents was killed.
17   RECORD_MEMORY_STATS_CONTENTS_OOM_KILLED,
18 
19   // Right after the renderer for extensions was killed.
20   RECORD_MEMORY_STATS_EXTENSIONS_OOM_KILLED,
21 };
22 
23 void RecordMemoryStats(RecordMemoryStatsType type);
24 
25 }  // namespace metrics
26 
27 #endif  // COMPONENTS_METRICS_SYSTEM_MEMORY_STATS_RECORDER_H_
28