The goal of this swap-thrashing monitor is to detect when the system enters into a high swap-thrashing state and will initially be used to determine the impact that this can have on the core speed metrics. The systems interested in observing these signals should query this monitor directly, there's no observer mechanism in place.
The initial implementation will focus only on Windows and will later be extended to other platforms.
See the high level comment at the top of chrome/browser/memory/swap_thrashing_monitor_win.h" for a more detailed explanation of the different states that the system expose and what can cause a transition from one given state to the other.
Bug: 771478 Change-Id: I99dd478cd3942ea1e8d2818cc7a9ca8ec89db213 Reviewed-on: https://chromium-review.googlesource.com/727642 Commit-Queue: Sébastien Marchand
38f2e32 Implement a swap thrashing monitor on Windows
chrome/browser/BUILD.gn | 2 +
.../browser/memory/swap_thrashing_monitor_win.cc | 342 +++++++++++++++++++
chrome/browser/memory/swap_thrashing_monitor_win.h | 160 +++++++++
.../memory/swap_thrashing_monitor_win_unittest.cc | 364 +++++++++++++++++++++
chrome/test/BUILD.gn | 1 +
5 files changed, 869 insertions(+)