Design doc: https://docs.google.com/document/d/1Mlx7q_8thkoQtg_C7-CNA_y0SxSK0yp_ja9Zs4HmcwU/edit?usp=sharing
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/051a90313eb6f6851bb463e415d73d8556d3366d commit 051a90313eb6f6851bb463e415d73d8556d3366d Author: bashi <bashi@chromium.org> Date: Tue Nov 08 04:13:55 2016 Add StateOn{Moderate,Critical}NotificationReceived metrics Record the global state of memory coordinator when memory pressure notification is received. The purpose of this metrics is to make sure the memory coordinator changes its global state to THROTTLED or SUSPENDED before receiving memory pressure notifications. BUG= 662772 Review-Url: https://codereview.chromium.org/2482783002 Cr-Commit-Position: refs/heads/master@{#430517} [modify] https://crrev.com/051a90313eb6f6851bb463e415d73d8556d3366d/base/memory/memory_coordinator_client.h [modify] https://crrev.com/051a90313eb6f6851bb463e415d73d8556d3366d/content/browser/browser_main_loop.cc [modify] https://crrev.com/051a90313eb6f6851bb463e415d73d8556d3366d/content/browser/memory/memory_coordinator.cc [modify] https://crrev.com/051a90313eb6f6851bb463e415d73d8556d3366d/content/browser/memory/memory_coordinator.h [modify] https://crrev.com/051a90313eb6f6851bb463e415d73d8556d3366d/tools/metrics/histograms/histograms.xml
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/d3bec15af939d0841149aa0f24e1816e586dd47a commit d3bec15af939d0841149aa0f24e1816e586dd47a Author: bashi <bashi@chromium.org> Date: Thu Nov 10 03:14:52 2016 Add Memory.Coordinator.FreeMemoryUntilCritical UMA Report free memory until the system enters critical state. Design doc: https://docs.google.com/document/d/1Mlx7q_8thkoQtg_C7-CNA_y0SxSK0yp_ja9Zs4HmcwU/edit#heading=h.92zih6k89h8i BUG= 662772 Review-Url: https://codereview.chromium.org/2482863003 Cr-Commit-Position: refs/heads/master@{#431160} [modify] https://crrev.com/d3bec15af939d0841149aa0f24e1816e586dd47a/content/browser/memory/memory_coordinator_impl.cc [modify] https://crrev.com/d3bec15af939d0841149aa0f24e1816e586dd47a/tools/metrics/histograms/histograms.xml
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/d351969bdb53d2ecf8f61db2987280a826cca738 commit d351969bdb53d2ecf8f61db2987280a826cca738 Author: bashi <bashi@chromium.org> Date: Thu Nov 10 05:17:58 2016 memory coordinator: Add metrics for Android's onTrimMemory() Record levels of onTrimMemory()[1]. Define separate histograms for each memory state so that we can examine the behavior of the memory coordinator. For example, the number of onTrimMemory() calls should be smaller in NORMAL state than THROTTLED/SUSPENDED states. [1] https://developer.android.com/reference/android/content/ComponentCallbacks2.html#onTrimMemory(int) Design doc: https://docs.google.com/document/d/1Mlx7q_8thkoQtg_C7-CNA_y0SxSK0yp_ja9Zs4HmcwU/edit#heading=h.7g1az9n5ec1m BUG= 662772 Review-Url: https://codereview.chromium.org/2486573003 Cr-Commit-Position: refs/heads/master@{#431188} [modify] https://crrev.com/d351969bdb53d2ecf8f61db2987280a826cca738/content/browser/memory/memory_monitor_android.cc [modify] https://crrev.com/d351969bdb53d2ecf8f61db2987280a826cca738/content/public/android/java/src/org/chromium/content/browser/MemoryMonitorAndroid.java [modify] https://crrev.com/d351969bdb53d2ecf8f61db2987280a826cca738/tools/metrics/histograms/histograms.xml
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/3e7b2c2e9ad184a7e541f3eb1a30b9db34408f7a commit 3e7b2c2e9ad184a7e541f3eb1a30b9db34408f7a Author: bashi <bashi@chromium.org> Date: Sat Nov 12 00:34:25 2016 Add metrics for memory coordinator global state change Record some metrics when the memory coordinator changes its global state. Added metrics are: - Total private working set memory of the browser/renderers - Elapsed time between state changes Design doc: https://docs.google.com/document/d/1Mlx7q_8thkoQtg_C7-CNA_y0SxSK0yp_ja9Zs4HmcwU/edit?usp=sharing BUG= 662772 Review-Url: https://codereview.chromium.org/2476223002 Cr-Commit-Position: refs/heads/master@{#431709} [modify] https://crrev.com/3e7b2c2e9ad184a7e541f3eb1a30b9db34408f7a/content/browser/memory/memory_coordinator_impl.cc [modify] https://crrev.com/3e7b2c2e9ad184a7e541f3eb1a30b9db34408f7a/content/browser/memory/memory_coordinator_impl.h [modify] https://crrev.com/3e7b2c2e9ad184a7e541f3eb1a30b9db34408f7a/tools/metrics/histograms/histograms.xml
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/5e2c875dca161e2b897d4cf454633c424b52f55b commit 5e2c875dca161e2b897d4cf454633c424b52f55b Author: bashi <bashi@chromium.org> Date: Fri Dec 02 07:05:40 2016 Add MemoryCoordinator::GetGlobalMemoryState() MemoryCoordinator::GetCurrentMemoryState() is not always the same as the global memory state because the browser process won't be suspended (at least for now). On the other hand, we want to have a way to record the global memory state to tweak memory coordinator's parameters. Add GetGlobalMemoryState() method which returns the raw value of the global state. Keep GetCurrentMemoryState() for clients in the browser process. BUG= 662772 Review-Url: https://codereview.chromium.org/2550623002 Cr-Commit-Position: refs/heads/master@{#435873} [modify] https://crrev.com/5e2c875dca161e2b897d4cf454633c424b52f55b/content/browser/memory/memory_coordinator.cc [modify] https://crrev.com/5e2c875dca161e2b897d4cf454633c424b52f55b/content/browser/memory/memory_coordinator.h [modify] https://crrev.com/5e2c875dca161e2b897d4cf454633c424b52f55b/content/browser/memory/memory_coordinator_impl.cc [modify] https://crrev.com/5e2c875dca161e2b897d4cf454633c424b52f55b/content/browser/memory/memory_coordinator_impl.h [modify] https://crrev.com/5e2c875dca161e2b897d4cf454633c424b52f55b/content/browser/memory/memory_monitor_android.cc
Many metrics I added weren't very helpful. I'm going to deprecate most of them.
Comment 1 by bashi@chromium.org
, Nov 7 2016