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> | 7 #include <stddef.h> |
8 | 8 |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
169 case content::PROCESS_TYPE_SANDBOX_HELPER: | 169 case content::PROCESS_TYPE_SANDBOX_HELPER: |
170 UMA_HISTOGRAM_MEMORY_KB("Memory.SandboxHelper", sample); | 170 UMA_HISTOGRAM_MEMORY_KB("Memory.SandboxHelper", sample); |
171 if (num_open_fds != -1) { | 171 if (num_open_fds != -1) { |
172 UMA_HISTOGRAM_COUNTS_10000("Memory.SandboxHelper.OpenFDs", | 172 UMA_HISTOGRAM_COUNTS_10000("Memory.SandboxHelper.OpenFDs", |
173 num_open_fds); | 173 num_open_fds); |
174 } | 174 } |
175 other_count++; | 175 other_count++; |
176 continue; | 176 continue; |
177 case content::PROCESS_TYPE_GPU: | 177 case content::PROCESS_TYPE_GPU: |
178 #if defined(OS_MACOSX) | 178 #if defined(OS_MACOSX) |
179 // Physical footprint was introduced in macOS 10.11. | 179 // Physical footprint was introduced in macOS 10.12. |
180 if (base::mac::IsAtLeastOS10_11()) { | 180 if (base::mac::IsAtLeastOS10_12()) { |
181 UMA_HISTOGRAM_MEMORY_LARGE_MB( | 181 UMA_HISTOGRAM_MEMORY_LARGE_MB( |
182 "Memory.Experimental.Gpu.PhysicalFootprint.MacOS", | 182 "Memory.Experimental.Gpu.PhysicalFootprint.MacOS", |
183 browser.processes[index].phys_footprint / 1024 / 1024); | 183 browser.processes[index].phys_footprint / 1024 / 1024); |
184 } | 184 } |
185 #endif | 185 #endif |
186 UMA_HISTOGRAM_MEMORY_KB("Memory.Gpu", sample); | 186 UMA_HISTOGRAM_MEMORY_KB("Memory.Gpu", sample); |
187 if (num_open_fds != -1 && open_fds_soft_limit != -1) { | 187 if (num_open_fds != -1 && open_fds_soft_limit != -1) { |
188 UMA_HISTOGRAM_COUNTS_10000("Memory.Gpu.OpenFDs", num_open_fds); | 188 UMA_HISTOGRAM_COUNTS_10000("Memory.Gpu.OpenFDs", num_open_fds); |
189 UMA_HISTOGRAM_COUNTS_10000("Memory.Gpu.OpenFDsSoftLimit", | 189 UMA_HISTOGRAM_COUNTS_10000("Memory.Gpu.OpenFDsSoftLimit", |
190 open_fds_soft_limit); | 190 open_fds_soft_limit); |
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
381 memory_growth_tracker_->UpdateSample(process_entry.pid, sample, | 381 memory_growth_tracker_->UpdateSample(process_entry.pid, sample, |
382 &diff) && | 382 &diff) && |
383 generate_histograms_) { | 383 generate_histograms_) { |
384 if (diff < 0) | 384 if (diff < 0) |
385 UMA_HISTOGRAM_MEMORY_KB("Memory.RendererShrinkIn30Min", -diff); | 385 UMA_HISTOGRAM_MEMORY_KB("Memory.RendererShrinkIn30Min", -diff); |
386 else | 386 else |
387 UMA_HISTOGRAM_MEMORY_KB("Memory.RendererGrowthIn30Min", diff); | 387 UMA_HISTOGRAM_MEMORY_KB("Memory.RendererGrowthIn30Min", diff); |
388 } | 388 } |
389 } | 389 } |
390 } | 390 } |
OLD | NEW |