Commit 834f4f74 authored by georgesak's avatar georgesak Committed by Commit bot

Fix memory values for the Win.* stats.

BUG=595320

Review URL: https://codereview.chromium.org/1810583002

Cr-Commit-Position: refs/heads/master@{#381722}
parent c1a792d7
...@@ -10,6 +10,9 @@ ...@@ -10,6 +10,9 @@
#include "base/process/process_metrics.h" #include "base/process/process_metrics.h"
namespace metrics { namespace metrics {
namespace {
enum { kMBytes = 1024 * 1024 };
}
void RecordMemoryStats(RecordMemoryStatsType type) { void RecordMemoryStats(RecordMemoryStatsType type) {
MEMORYSTATUSEX mem_status; MEMORYSTATUSEX mem_status;
...@@ -21,18 +24,18 @@ void RecordMemoryStats(RecordMemoryStatsType type) { ...@@ -21,18 +24,18 @@ void RecordMemoryStats(RecordMemoryStatsType type) {
case RECORD_MEMORY_STATS_TAB_DISCARDED: { case RECORD_MEMORY_STATS_TAB_DISCARDED: {
UMA_HISTOGRAM_CUSTOM_COUNTS("Memory.Stats.Win.MemoryLoad", UMA_HISTOGRAM_CUSTOM_COUNTS("Memory.Stats.Win.MemoryLoad",
mem_status.dwMemoryLoad, 0, 100, 101); mem_status.dwMemoryLoad, 0, 100, 101);
UMA_HISTOGRAM_LARGE_MEMORY_MB("Memory.Stats.Win.TotalPhys", UMA_HISTOGRAM_LARGE_MEMORY_MB("Memory.Stats.Win.TotalPhys2",
mem_status.ullTotalPhys); mem_status.ullTotalPhys / kMBytes);
UMA_HISTOGRAM_LARGE_MEMORY_MB("Memory.Stats.Win.AvailPhys", UMA_HISTOGRAM_LARGE_MEMORY_MB("Memory.Stats.Win.AvailPhys2",
mem_status.ullAvailPhys); mem_status.ullAvailPhys / kMBytes);
UMA_HISTOGRAM_LARGE_MEMORY_MB("Memory.Stats.Win.TotalPageFile", UMA_HISTOGRAM_LARGE_MEMORY_MB("Memory.Stats.Win.TotalPageFile2",
mem_status.ullTotalPageFile); mem_status.ullTotalPageFile / kMBytes);
UMA_HISTOGRAM_LARGE_MEMORY_MB("Memory.Stats.Win.AvailPageFile", UMA_HISTOGRAM_LARGE_MEMORY_MB("Memory.Stats.Win.AvailPageFile2",
mem_status.ullAvailPageFile); mem_status.ullAvailPageFile / kMBytes);
UMA_HISTOGRAM_LARGE_MEMORY_MB("Memory.Stats.Win.TotalVirtual", UMA_HISTOGRAM_LARGE_MEMORY_MB("Memory.Stats.Win.TotalVirtual2",
mem_status.ullTotalVirtual); mem_status.ullTotalVirtual / kMBytes);
UMA_HISTOGRAM_LARGE_MEMORY_MB("Memory.Stats.Win.AvailVirtual", UMA_HISTOGRAM_LARGE_MEMORY_MB("Memory.Stats.Win.AvailVirtual2",
mem_status.ullAvailVirtual); mem_status.ullAvailVirtual / kMBytes);
break; break;
} }
default: default:
......
...@@ -21485,6 +21485,18 @@ http://cs/file:chrome/histograms.xml - but prefer this file for new entries. ...@@ -21485,6 +21485,18 @@ http://cs/file:chrome/histograms.xml - but prefer this file for new entries.
</histogram> </histogram>
<histogram name="Memory.Stats.Win.AvailPageFile" units="MB"> <histogram name="Memory.Stats.Win.AvailPageFile" units="MB">
<obsolete>
Deprecated in 595320 and replaced with Memory.Stats.Win.AvailPageFile2.
</obsolete>
<owner>georgesak@chromium.org</owner>
<summary>
Windows-only metric that represents the maximum amount of memory the current
process can commit. This value is equal to or smaller than the system-wide
available commit value.
</summary>
</histogram>
<histogram name="Memory.Stats.Win.AvailPageFile2" units="MB">
<owner>georgesak@chromium.org</owner> <owner>georgesak@chromium.org</owner>
<summary> <summary>
Windows-only metric that represents the maximum amount of memory the current Windows-only metric that represents the maximum amount of memory the current
...@@ -21494,6 +21506,19 @@ http://cs/file:chrome/histograms.xml - but prefer this file for new entries. ...@@ -21494,6 +21506,19 @@ http://cs/file:chrome/histograms.xml - but prefer this file for new entries.
</histogram> </histogram>
<histogram name="Memory.Stats.Win.AvailPhys" units="MB"> <histogram name="Memory.Stats.Win.AvailPhys" units="MB">
<obsolete>
Deprecated in 595320 and replaced with Memory.Stats.Win.AvailPhys2.
</obsolete>
<owner>georgesak@chromium.org</owner>
<summary>
Windows-only metric that represents the amount of physical memory currently
available. This is the amount of physical memory that can be immediately
reused without having to write its contents to disk first. It is the sum of
the size of the standby, free, and zero lists.
</summary>
</histogram>
<histogram name="Memory.Stats.Win.AvailPhys2" units="MB">
<owner>georgesak@chromium.org</owner> <owner>georgesak@chromium.org</owner>
<summary> <summary>
Windows-only metric that represents the amount of physical memory currently Windows-only metric that represents the amount of physical memory currently
...@@ -21504,6 +21529,18 @@ http://cs/file:chrome/histograms.xml - but prefer this file for new entries. ...@@ -21504,6 +21529,18 @@ http://cs/file:chrome/histograms.xml - but prefer this file for new entries.
</histogram> </histogram>
<histogram name="Memory.Stats.Win.AvailVirtual" units="MB"> <histogram name="Memory.Stats.Win.AvailVirtual" units="MB">
<obsolete>
Deprecated in 595320 and replaced with Memory.Stats.Win.AvailVirtual2.
</obsolete>
<owner>georgesak@chromium.org</owner>
<summary>
Windows-only metric that represents the amount of unreserved and uncommitted
memory currently in the user-mode portion of the virtual address space of
the calling process.
</summary>
</histogram>
<histogram name="Memory.Stats.Win.AvailVirtual2" units="MB">
<owner>georgesak@chromium.org</owner> <owner>georgesak@chromium.org</owner>
<summary> <summary>
Windows-only metric that represents the amount of unreserved and uncommitted Windows-only metric that represents the amount of unreserved and uncommitted
...@@ -21522,6 +21559,17 @@ http://cs/file:chrome/histograms.xml - but prefer this file for new entries. ...@@ -21522,6 +21559,17 @@ http://cs/file:chrome/histograms.xml - but prefer this file for new entries.
</histogram> </histogram>
<histogram name="Memory.Stats.Win.TotalPageFile" units="MB"> <histogram name="Memory.Stats.Win.TotalPageFile" units="MB">
<obsolete>
Deprecated in 595320 and replaced with Memory.Stats.Win.TotalPageFile2.
</obsolete>
<owner>georgesak@chromium.org</owner>
<summary>
Windows-only metric that represents the current committed memory limit for
the system or the current process, whichever is smaller.
</summary>
</histogram>
<histogram name="Memory.Stats.Win.TotalPageFile2" units="MB">
<owner>georgesak@chromium.org</owner> <owner>georgesak@chromium.org</owner>
<summary> <summary>
Windows-only metric that represents the current committed memory limit for Windows-only metric that represents the current committed memory limit for
...@@ -21530,6 +21578,16 @@ http://cs/file:chrome/histograms.xml - but prefer this file for new entries. ...@@ -21530,6 +21578,16 @@ http://cs/file:chrome/histograms.xml - but prefer this file for new entries.
</histogram> </histogram>
<histogram name="Memory.Stats.Win.TotalPhys" units="MB"> <histogram name="Memory.Stats.Win.TotalPhys" units="MB">
<obsolete>
Deprecated in 595320 and replaced with Memory.Stats.Win.TotalPhys2.
</obsolete>
<owner>georgesak@chromium.org</owner>
<summary>
Windows-only metric that represents the amount of actual physical memory.
</summary>
</histogram>
<histogram name="Memory.Stats.Win.TotalPhys2" units="MB">
<owner>georgesak@chromium.org</owner> <owner>georgesak@chromium.org</owner>
<summary> <summary>
Windows-only metric that represents the amount of actual physical memory. Windows-only metric that represents the amount of actual physical memory.
...@@ -21537,6 +21595,22 @@ http://cs/file:chrome/histograms.xml - but prefer this file for new entries. ...@@ -21537,6 +21595,22 @@ http://cs/file:chrome/histograms.xml - but prefer this file for new entries.
</histogram> </histogram>
<histogram name="Memory.Stats.Win.TotalVirtual" units="MB"> <histogram name="Memory.Stats.Win.TotalVirtual" units="MB">
<obsolete>
Deprecated in 595320 and replaced with Memory.Stats.Win.TotalVirtual2.
</obsolete>
<owner>georgesak@chromium.org</owner>
<summary>
Windows-only metric that represents the size of the user-mode portion of the
virtual address space of the calling process. This value depends on the type
of process, the type of processor, and the configuration of the operating
system. For example, this value is approximately 2 GB for most 32-bit
processes on an x86 processor and approximately 3 GB for 32-bit processes
that are large address aware running on a system with 4-gigabyte tuning
enabled.
</summary>
</histogram>
<histogram name="Memory.Stats.Win.TotalVirtual2" units="MB">
<owner>georgesak@chromium.org</owner> <owner>georgesak@chromium.org</owner>
<summary> <summary>
Windows-only metric that represents the size of the user-mode portion of the Windows-only metric that represents the size of the user-mode portion of the
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment