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

Unified Diff: components/metrics/system_memory_stats_recorder_win.cc

Issue 1810583002: Fix memory values for the Win.* stats. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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 | « no previous file | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/metrics/system_memory_stats_recorder_win.cc
diff --git a/components/metrics/system_memory_stats_recorder_win.cc b/components/metrics/system_memory_stats_recorder_win.cc
index 34ff7bc1ced49e02e6e23c71f3a6f47486f2bf0c..cdd314989f36f60429eaf7b73ad565731dcffa6c 100644
--- a/components/metrics/system_memory_stats_recorder_win.cc
+++ b/components/metrics/system_memory_stats_recorder_win.cc
@@ -10,6 +10,9 @@
#include "base/process/process_metrics.h"
namespace metrics {
+namespace {
+enum { kMBytes = 1024 * 1024 };
+}
void RecordMemoryStats(RecordMemoryStatsType type) {
MEMORYSTATUSEX mem_status;
@@ -21,18 +24,18 @@ void RecordMemoryStats(RecordMemoryStatsType type) {
case RECORD_MEMORY_STATS_TAB_DISCARDED: {
UMA_HISTOGRAM_CUSTOM_COUNTS("Memory.Stats.Win.MemoryLoad",
mem_status.dwMemoryLoad, 0, 100, 101);
- UMA_HISTOGRAM_LARGE_MEMORY_MB("Memory.Stats.Win.TotalPhys",
- mem_status.ullTotalPhys);
- UMA_HISTOGRAM_LARGE_MEMORY_MB("Memory.Stats.Win.AvailPhys",
- mem_status.ullAvailPhys);
- UMA_HISTOGRAM_LARGE_MEMORY_MB("Memory.Stats.Win.TotalPageFile",
- mem_status.ullTotalPageFile);
- UMA_HISTOGRAM_LARGE_MEMORY_MB("Memory.Stats.Win.AvailPageFile",
- mem_status.ullAvailPageFile);
- UMA_HISTOGRAM_LARGE_MEMORY_MB("Memory.Stats.Win.TotalVirtual",
- mem_status.ullTotalVirtual);
- UMA_HISTOGRAM_LARGE_MEMORY_MB("Memory.Stats.Win.AvailVirtual",
- mem_status.ullAvailVirtual);
+ UMA_HISTOGRAM_LARGE_MEMORY_MB("Memory.Stats.Win.TotalPhys2",
+ mem_status.ullTotalPhys / kMBytes);
+ UMA_HISTOGRAM_LARGE_MEMORY_MB("Memory.Stats.Win.AvailPhys2",
+ mem_status.ullAvailPhys / kMBytes);
+ UMA_HISTOGRAM_LARGE_MEMORY_MB("Memory.Stats.Win.TotalPageFile2",
+ mem_status.ullTotalPageFile / kMBytes);
+ UMA_HISTOGRAM_LARGE_MEMORY_MB("Memory.Stats.Win.AvailPageFile2",
+ mem_status.ullAvailPageFile / kMBytes);
+ UMA_HISTOGRAM_LARGE_MEMORY_MB("Memory.Stats.Win.TotalVirtual2",
+ mem_status.ullTotalVirtual / kMBytes);
+ UMA_HISTOGRAM_LARGE_MEMORY_MB("Memory.Stats.Win.AvailVirtual2",
+ mem_status.ullAvailVirtual / kMBytes);
break;
}
default:
« no previous file with comments | « no previous file | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698