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

Unified Diff: chrome/browser/metrics/metrics_memory_details.cc

Issue 2832933003: Add the UMA metric Memory.Gpu.PhysicalFootprint.MacOS (Closed)
Patch Set: Comments from mark. Created 3 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/memory_details_mac.cc ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/metrics/metrics_memory_details.cc
diff --git a/chrome/browser/metrics/metrics_memory_details.cc b/chrome/browser/metrics/metrics_memory_details.cc
index cea3e2700b7b566503709a22beb4285b3e2306a0..d0e5ceb25631957bf497dfbba34aa96ef78993b2 100644
--- a/chrome/browser/metrics/metrics_memory_details.cc
+++ b/chrome/browser/metrics/metrics_memory_details.cc
@@ -20,6 +20,10 @@
#include "content/public/common/process_type.h"
#include "ppapi/features/features.h"
+#if defined(OS_MACOSX)
+#include "base/mac/mac_util.h"
+#endif
+
MemoryGrowthTracker::MemoryGrowthTracker() {
}
@@ -171,6 +175,14 @@ void MetricsMemoryDetails::UpdateHistograms() {
other_count++;
continue;
case content::PROCESS_TYPE_GPU:
+#if defined(OS_MACOSX)
+ // Physical footprint was introduced in macOS 10.11.
+ if (base::mac::IsAtLeastOS10_11()) {
+ UMA_HISTOGRAM_MEMORY_LARGE_MB(
+ "Memory.Gpu.PhysicalFootprint.MacOS",
+ browser.processes[index].phys_footprint / 1024 / 1024);
+ }
+#endif
UMA_HISTOGRAM_MEMORY_KB("Memory.Gpu", sample);
if (num_open_fds != -1 && open_fds_soft_limit != -1) {
UMA_HISTOGRAM_COUNTS_10000("Memory.Gpu.OpenFDs", num_open_fds);
« no previous file with comments | « chrome/browser/memory_details_mac.cc ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698