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

Issue 2527973003: Consolidate code monitoring low memory kills and OOM kills to MemoryKillsMonitor on ChromeOS. (Closed)

Created:
4 years ago by cylee1
Modified:
4 years ago
CC:
chromium-reviews, elijahtaylor+arcwatch_chromium.org, hidehiko+watch_chromium.org, lhchavez+watch_chromium.org, yusukes+watch_chromium.org, oshima+watch_chromium.org, Luigi Semenzato
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Consolidate code monitoring low memory kills and OOM kills to MemoryKillsMonitor on ChromeOS Rename OomKillsMonitor to MemoryKillsMonitor and move it from arc namespace to memory namespace. Now it is responsible for 1. Log OOM kill events by listening to kernel messages (in a dedicated thread). 2. Log low memory kill events when TabManager kills processes (called from UI thread). It logs those events to 1. Chrome UMA 2. A local file if --memory-kills-log is given It starts a new monitoring session when a new BrowserProcess is created. BUG=none TEST=manual Committed: https://crrev.com/43f78af4b909bca7f815b862b9ab3f17c5cacddf Cr-Commit-Position: refs/heads/master@{#435743}

Patch Set 1 #

Patch Set 2 : Add spaces between "PRId64" #

Patch Set 3 : Fix compile error on Android #

Patch Set 4 : restrict it to ChromeoS #

Total comments: 18

Patch Set 5 : review comments #

Total comments: 16

Patch Set 6 : review comments 2. fix move constructor #

Patch Set 7 : review comments 2. fix move constructor #

Total comments: 2

Patch Set 8 : Add unittest #

Patch Set 9 : move unittest to chromeos only build rule #

Unified diffs Side-by-side diffs Delta from patch set Stats (+445 lines, -340 lines) Patch
M chrome/browser/BUILD.gn View 1 2 3 4 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/browser/chromeos/BUILD.gn View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/chromeos/chrome_browser_main_chromeos.h View 1 2 3 4 2 chunks +3 lines, -0 lines 0 comments Download
M chrome/browser/chromeos/chrome_browser_main_chromeos.cc View 1 2 3 4 5 1 chunk +4 lines, -0 lines 0 comments Download
A chrome/browser/memory/memory_kills_histogram.h View 1 2 3 4 1 chunk +25 lines, -0 lines 0 comments Download
A chrome/browser/memory/memory_kills_monitor.h View 1 2 3 4 5 6 7 1 chunk +89 lines, -0 lines 0 comments Download
A chrome/browser/memory/memory_kills_monitor.cc View 1 2 3 4 5 6 7 1 chunk +218 lines, -0 lines 0 comments Download
A chrome/browser/memory/memory_kills_monitor_unittest.cc View 1 2 3 4 5 6 7 1 chunk +99 lines, -0 lines 0 comments Download
M chrome/browser/memory/tab_manager_delegate_chromeos.h View 2 chunks +0 lines, -4 lines 0 comments Download
M chrome/browser/memory/tab_manager_delegate_chromeos.cc View 1 2 3 4 6 chunks +3 lines, -34 lines 0 comments Download
M components/arc/BUILD.gn View 1 chunk +0 lines, -3 lines 0 comments Download
M components/arc/metrics/arc_metrics_service.h View 2 chunks +0 lines, -3 lines 0 comments Download
M components/arc/metrics/arc_metrics_service.cc View 1 chunk +0 lines, -1 line 0 comments Download
D components/arc/metrics/oom_kills_histogram.h View 1 chunk +0 lines, -23 lines 0 comments Download
D components/arc/metrics/oom_kills_monitor.h View 1 chunk +0 lines, -66 lines 0 comments Download
D components/arc/metrics/oom_kills_monitor.cc View 1 chunk +0 lines, -206 lines 0 comments Download

Messages

Total messages: 42 (26 generated)
cylee1
Add reviewer sky for files chrome/browser/browser_process_impl.* oshima for chromeos/chromeos_switches.* georgesak for files under chrome/browser/memory/ hidehiko ...
4 years ago (2016-11-24 18:04:12 UTC) #4
hidehiko
https://codereview.chromium.org/2527973003/diff/60001/chrome/browser/memory/memory_kills_histogram.h File chrome/browser/memory/memory_kills_histogram.h (right): https://codereview.chromium.org/2527973003/diff/60001/chrome/browser/memory/memory_kills_histogram.h#newcode8 chrome/browser/memory/memory_kills_histogram.h:8: #include "base/metrics/histogram.h" #include "base/time/time.h", too? https://codereview.chromium.org/2527973003/diff/60001/chrome/browser/memory/memory_kills_histogram.h#newcode12 chrome/browser/memory/memory_kills_histogram.h:12: const int ...
4 years ago (2016-11-25 10:13:22 UTC) #16
sky
https://codereview.chromium.org/2527973003/diff/60001/chrome/browser/browser_process_impl.cc File chrome/browser/browser_process_impl.cc (right): https://codereview.chromium.org/2527973003/diff/60001/chrome/browser/browser_process_impl.cc#newcode218 chrome/browser/browser_process_impl.cc:218: #endif // !defined(OS_ANDROID) ANDROID->CHROMEOS https://codereview.chromium.org/2527973003/diff/60001/chrome/browser/browser_process_impl.h File chrome/browser/browser_process_impl.h (right): https://codereview.chromium.org/2527973003/diff/60001/chrome/browser/browser_process_impl.h#newcode350 ...
4 years ago (2016-11-26 16:49:40 UTC) #17
cylee1
https://codereview.chromium.org/2527973003/diff/60001/chrome/browser/browser_process_impl.cc File chrome/browser/browser_process_impl.cc (right): https://codereview.chromium.org/2527973003/diff/60001/chrome/browser/browser_process_impl.cc#newcode218 chrome/browser/browser_process_impl.cc:218: #endif // !defined(OS_ANDROID) On 2016/11/26 16:49:40, sky wrote: > ...
4 years ago (2016-11-29 20:28:41 UTC) #20
sky
hrome/browser/chromeos/chrome_browser_main_chromeos.* LGTM https://codereview.chromium.org/2527973003/diff/80001/chrome/browser/chromeos/chrome_browser_main_chromeos.cc File chrome/browser/chromeos/chrome_browser_main_chromeos.cc (right): https://codereview.chromium.org/2527973003/diff/80001/chrome/browser/chromeos/chrome_browser_main_chromeos.cc#newcode358 chrome/browser/chromeos/chrome_browser_main_chromeos.cc:358: memory_kills_monitor_.reset(new memory::MemoryKillsMonitor::Handle( Use MakeUnique if you can ...
4 years ago (2016-11-29 20:55:02 UTC) #21
hidehiko
Looks good except Handle move ctor. Others are minor comments. https://codereview.chromium.org/2527973003/diff/80001/chrome/browser/memory/memory_kills_monitor.cc File chrome/browser/memory/memory_kills_monitor.cc (right): https://codereview.chromium.org/2527973003/diff/80001/chrome/browser/memory/memory_kills_monitor.cc#newcode55 ...
4 years ago (2016-11-30 09:05:49 UTC) #24
cylee1
Ping Georges https://codereview.chromium.org/2527973003/diff/80001/chrome/browser/chromeos/chrome_browser_main_chromeos.cc File chrome/browser/chromeos/chrome_browser_main_chromeos.cc (right): https://codereview.chromium.org/2527973003/diff/80001/chrome/browser/chromeos/chrome_browser_main_chromeos.cc#newcode358 chrome/browser/chromeos/chrome_browser_main_chromeos.cc:358: memory_kills_monitor_.reset(new memory::MemoryKillsMonitor::Handle( On 2016/11/29 20:55:02, sky wrote: ...
4 years ago (2016-11-30 17:18:58 UTC) #25
Georges Khalil
chrome/browser/memory LGTM % nit But shouldn't we have tests for the functions in memory_kills_monitor.cc? https://codereview.chromium.org/2527973003/diff/120001/chrome/browser/memory/memory_kills_monitor.h ...
4 years ago (2016-11-30 20:53:35 UTC) #26
hidehiko
components/arc LGTM.
4 years ago (2016-12-01 12:40:08 UTC) #27
cylee1
Hi Georges, Unit test added. https://codereview.chromium.org/2527973003/diff/120001/chrome/browser/memory/memory_kills_monitor.h File chrome/browser/memory/memory_kills_monitor.h (right): https://codereview.chromium.org/2527973003/diff/120001/chrome/browser/memory/memory_kills_monitor.h#newcode22 chrome/browser/memory/memory_kills_monitor.h:22: // TabManagr). On 2016/11/30 ...
4 years ago (2016-12-01 20:02:45 UTC) #28
Georges Khalil
Still LGTM. Thanks for the tests!
4 years ago (2016-12-01 20:45:46 UTC) #29
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2527973003/140001
4 years ago (2016-12-01 20:54:18 UTC) #32
commit-bot: I haz the power
Try jobs failed on following builders: mac_chromium_rel_ng on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_ng/builds/346235)
4 years ago (2016-12-01 21:14:59 UTC) #34
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2527973003/160001
4 years ago (2016-12-01 21:38:53 UTC) #37
commit-bot: I haz the power
Committed patchset #9 (id:160001)
4 years ago (2016-12-01 22:44:23 UTC) #40
commit-bot: I haz the power
4 years ago (2016-12-01 22:46:11 UTC) #42
Message was sent while issue was closed.
Patchset 9 (id:??) landed as
https://crrev.com/43f78af4b909bca7f815b862b9ab3f17c5cacddf
Cr-Commit-Position: refs/heads/master@{#435743}

Powered by Google App Engine
This is Rietveld 408576698