diff options
author | jamescook@chromium.org <jamescook@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-04-18 17:47:32 +0000 |
---|---|---|
committer | jamescook@chromium.org <jamescook@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-04-18 17:47:32 +0000 |
commit | d6d4daeb79e56a071818436148d5fbd62c4f2d8f (patch) | |
tree | c2848b58cc3b6182bf862ba99e2eec3a743ad4e4 /base/process_util.h | |
parent | 0e6ee141ecd519c6b849ffd60f5e58ee7ad05f12 (diff) | |
download | chromium_src-d6d4daeb79e56a071818436148d5fbd62c4f2d8f.zip chromium_src-d6d4daeb79e56a071818436148d5fbd62c4f2d8f.tar.gz chromium_src-d6d4daeb79e56a071818436148d5fbd62c4f2d8f.tar.bz2 |
cros: Record UMA stats for tab discards in low memory conditions
* Per discussion with jar@, bin users into categories by number of tabs they have open as a proxy for how "heavily" they use Chrome.
* Separately track time-to-first-discard, as that should be longer as users take a little while to open up all their tabs.
* Also report snapshot of system-wide memory consumption at the time of the discard, to investigate tuning the kernel low-memory signal threshold.
BUG=123179
TEST=use chrome://discards to discard a few tabs, then check chrome://histograms and search for "TabDiscard" to verify the discards were counted
Review URL: https://chromiumcodereview.appspot.com/9969189
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@132811 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/process_util.h')
-rw-r--r-- | base/process_util.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/base/process_util.h b/base/process_util.h index c7b7618..1aab778 100644 --- a/base/process_util.h +++ b/base/process_util.h @@ -781,15 +781,17 @@ class BASE_EXPORT ProcessMetrics { #if defined(OS_LINUX) || defined(OS_ANDROID) // Data from /proc/meminfo about system-wide memory consumption. // Values are in KB. -struct SystemMemoryInfoKB { - SystemMemoryInfoKB() : total(0), free(0), buffers(0), cached(0), - active_anon(0), inactive_anon(0), shmem(0) {} +struct BASE_EXPORT SystemMemoryInfoKB { + SystemMemoryInfoKB(); + int total; int free; int buffers; int cached; int active_anon; int inactive_anon; + int active_file; + int inactive_file; int shmem; }; // Retrieves data from /proc/meminfo about system-wide memory consumption. |