Design doc (Googlers only): https://docs.google.com/a/google.com/document/d/1tnlpu88Eigik__6Skno-TR_RjnBAFaSn9sZduzLLMXY/edit?usp=sharing UI side: crbug.com/775850
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/0f336d00356e42b0ac215c012ae89f6575473217 commit 0f336d00356e42b0ac215c012ae89f6575473217 Author: Kenichi Ishibashi <bashi@chromium.org> Date: Thu Oct 26 02:39:11 2017 Add NearOomMonitor This class monitors swap usage and tries to detect near-OOM situation by using a threshold-based heuristic. Bug: 776665 Change-Id: I04f2443a9b7edb549ea915db2bf6affad7952adb Reviewed-on: https://chromium-review.googlesource.com/730036 Commit-Queue: Kenichi Ishibashi <bashi@chromium.org> Reviewed-by: Bernhard Bauer <bauerb@chromium.org> Reviewed-by: Maria Khomenko <mariakhomenko@chromium.org> Cr-Commit-Position: refs/heads/master@{#511709} [modify] https://crrev.com/0f336d00356e42b0ac215c012ae89f6575473217/chrome/browser/BUILD.gn [add] https://crrev.com/0f336d00356e42b0ac215c012ae89f6575473217/chrome/browser/android/oom_intervention/near_oom_monitor.cc [add] https://crrev.com/0f336d00356e42b0ac215c012ae89f6575473217/chrome/browser/android/oom_intervention/near_oom_monitor.h [add] https://crrev.com/0f336d00356e42b0ac215c012ae89f6575473217/chrome/browser/android/oom_intervention/near_oom_monitor_unittest.cc [modify] https://crrev.com/0f336d00356e42b0ac215c012ae89f6575473217/chrome/test/BUILD.gn
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/310952325b2c8cdd7e364b3ceab457e46a93b8b2 commit 310952325b2c8cdd7e364b3ceab457e46a93b8b2 Author: Kenichi Ishibashi <bashi@chromium.org> Date: Fri Oct 27 00:57:45 2017 Add OomIntervention mojo interface and its implementation This CL adds a mojo interface and its implementation for OOM-intervention. BlinkInitializer adds the interface to the main frame's InterfaceRegistry. The impl class pauses pages when it receives OnNearOomDetected() message and resumes pages when it receives OnInterventionDeclined() message. Clients of the interface doesn't exist yet except for tests. Follow-up CLs will add a client in the browser process. Bug: 776665 Change-Id: Ic7be386b9637ddb90a6c25bb5605a584f08e9e8b Reviewed-on: https://chromium-review.googlesource.com/732803 Commit-Queue: Kenichi Ishibashi <bashi@chromium.org> Reviewed-by: Avi Drissman <avi@chromium.org> Reviewed-by: Daniel Cheng <dcheng@chromium.org> Reviewed-by: Kentaro Hara <haraken@chromium.org> Cr-Commit-Position: refs/heads/master@{#512045} [modify] https://crrev.com/310952325b2c8cdd7e364b3ceab457e46a93b8b2/content/browser/DEPS [add] https://crrev.com/310952325b2c8cdd7e364b3ceab457e46a93b8b2/content/browser/memory/near_oom_intervention_browsertest.cc [modify] https://crrev.com/310952325b2c8cdd7e364b3ceab457e46a93b8b2/content/public/app/mojo/content_renderer_manifest.json [modify] https://crrev.com/310952325b2c8cdd7e364b3ceab457e46a93b8b2/content/test/BUILD.gn [modify] https://crrev.com/310952325b2c8cdd7e364b3ceab457e46a93b8b2/third_party/WebKit/Source/controller/BUILD.gn [modify] https://crrev.com/310952325b2c8cdd7e364b3ceab457e46a93b8b2/third_party/WebKit/Source/controller/BlinkInitializer.cpp [modify] https://crrev.com/310952325b2c8cdd7e364b3ceab457e46a93b8b2/third_party/WebKit/Source/controller/DEPS [add] https://crrev.com/310952325b2c8cdd7e364b3ceab457e46a93b8b2/third_party/WebKit/Source/controller/OomInterventionImpl.cpp [add] https://crrev.com/310952325b2c8cdd7e364b3ceab457e46a93b8b2/third_party/WebKit/Source/controller/OomInterventionImpl.h [add] https://crrev.com/310952325b2c8cdd7e364b3ceab457e46a93b8b2/third_party/WebKit/Source/controller/OomInterventionImplTest.cpp [modify] https://crrev.com/310952325b2c8cdd7e364b3ceab457e46a93b8b2/third_party/WebKit/public/BUILD.gn [add] https://crrev.com/310952325b2c8cdd7e364b3ceab457e46a93b8b2/third_party/WebKit/public/platform/oom_intervention.mojom
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/60fc349f94e31249b4c718f3f2e99d4d6a37d081 commit 60fc349f94e31249b4c718f3f2e99d4d6a37d081 Author: Kenichi Ishibashi <bashi@chromium.org> Date: Tue Oct 31 23:41:19 2017 Add OomInterventionTabHelper This CL adds OomInterventionTabHelper which is attached to a WebContent when the "OomIntervention" feature flag is enabled. When the WebContent is a foreground tab, the helper tries to detect near-OOM situation by using NearOomMonitor. Currently the helper doesn't initiate any intervention (e.g. pause JavaScript execution) but records some metrics. Metrics include: 1) Elapsed time between near-OOM detection and a crash/process termination/page navigation. 2) The number of crashes of OOM protected renderers without near-OOM detection. 3) The number of renderer termination without near-OOM detection. 4) The number of navigations without near-OOM detection. 1 will be used to examine true/false positives (near-OOM is detected, is it a success estimation or not?) 2, 3, 4 will be used to examine true/false negatives (near-OOM is not detected, isn't it overlooked?) TBR=isherman@chromium.org Bug: 776665 Change-Id: I439ef7abeb90ba09df41e7fbb7a61e1599d2edc7 Reviewed-on: https://chromium-review.googlesource.com/743039 Commit-Queue: Kenichi Ishibashi <bashi@chromium.org> Reviewed-by: Maria Khomenko <mariakhomenko@chromium.org> Reviewed-by: Kentaro Hara <haraken@chromium.org> Reviewed-by: Bernhard Bauer <bauerb@chromium.org> Reviewed-by: Avi Drissman <avi@chromium.org> Cr-Commit-Position: refs/heads/master@{#513004} [modify] https://crrev.com/60fc349f94e31249b4c718f3f2e99d4d6a37d081/chrome/browser/BUILD.gn [modify] https://crrev.com/60fc349f94e31249b4c718f3f2e99d4d6a37d081/chrome/browser/android/oom_intervention/near_oom_monitor.cc [modify] https://crrev.com/60fc349f94e31249b4c718f3f2e99d4d6a37d081/chrome/browser/android/oom_intervention/near_oom_monitor.h [add] https://crrev.com/60fc349f94e31249b4c718f3f2e99d4d6a37d081/chrome/browser/android/oom_intervention/oom_intervention_tab_helper.cc [add] https://crrev.com/60fc349f94e31249b4c718f3f2e99d4d6a37d081/chrome/browser/android/oom_intervention/oom_intervention_tab_helper.h [modify] https://crrev.com/60fc349f94e31249b4c718f3f2e99d4d6a37d081/chrome/browser/chrome_browser_main_android.cc [modify] https://crrev.com/60fc349f94e31249b4c718f3f2e99d4d6a37d081/chrome/browser/ui/tab_helpers.cc [modify] https://crrev.com/60fc349f94e31249b4c718f3f2e99d4d6a37d081/chrome/common/chrome_features.cc [modify] https://crrev.com/60fc349f94e31249b4c718f3f2e99d4d6a37d081/chrome/common/chrome_features.h [modify] https://crrev.com/60fc349f94e31249b4c718f3f2e99d4d6a37d081/tools/metrics/histograms/enums.xml [modify] https://crrev.com/60fc349f94e31249b4c718f3f2e99d4d6a37d081/tools/metrics/histograms/histograms.xml
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/778bef56d60c466e240d6ff5a59911ecb575f54a commit 778bef56d60c466e240d6ff5a59911ecb575f54a Author: Kenichi Ishibashi <bashi@chromium.org> Date: Mon Nov 06 23:50:49 2017 Tweak OomInterventionTabHelper Start near-OOM monitoring on DocumentAvailableInMainFrame() instead of DidStartNavigation(). Triggering the intervention (pausing pages) before showing page contents doesn't improve user experience. Bug: 776665 Change-Id: Idb70e742ebb90a4bae539f392352a1191fdc7c46 Reviewed-on: https://chromium-review.googlesource.com/753272 Reviewed-by: Maria Khomenko <mariakhomenko@chromium.org> Reviewed-by: Kentaro Hara <haraken@chromium.org> Reviewed-by: Bernhard Bauer <bauerb@chromium.org> Commit-Queue: Kenichi Ishibashi <bashi@chromium.org> Cr-Commit-Position: refs/heads/master@{#514301} [modify] https://crrev.com/778bef56d60c466e240d6ff5a59911ecb575f54a/chrome/browser/android/oom_intervention/oom_intervention_tab_helper.cc [modify] https://crrev.com/778bef56d60c466e240d6ff5a59911ecb575f54a/chrome/browser/android/oom_intervention/oom_intervention_tab_helper.h
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/7ffe9a068f8dc718ce3d653198c999a0fb595eb5 commit 7ffe9a068f8dc718ce3d653198c999a0fb595eb5 Author: Kenichi Ishibashi <bashi@chromium.org> Date: Tue Nov 07 02:47:34 2017 Improve near-OOM detection scheduling - Pause monitoring if there is no callback. It would be wasteful to schedule tasks to check memory usage if the monitor doesn't have to notify. Also remove Start() method as it is no longer needed. - Add cool down interval for the next monitoring when a near-OOM is detected. This prevent us from triggering the intervention aggressively. For example, without cool down interval, we may trigger the intervention just after a page navigation if we triggered the intervention on the previous page. Bug: 776665 Change-Id: Ia01f40d4a85165f4dbe679abb2ddc2323d49e869 Reviewed-on: https://chromium-review.googlesource.com/753564 Commit-Queue: Kenichi Ishibashi <bashi@chromium.org> Reviewed-by: Maria Khomenko <mariakhomenko@chromium.org> Reviewed-by: Kentaro Hara <haraken@chromium.org> Cr-Commit-Position: refs/heads/master@{#514363} [modify] https://crrev.com/7ffe9a068f8dc718ce3d653198c999a0fb595eb5/chrome/browser/android/oom_intervention/near_oom_monitor.cc [modify] https://crrev.com/7ffe9a068f8dc718ce3d653198c999a0fb595eb5/chrome/browser/android/oom_intervention/near_oom_monitor.h [modify] https://crrev.com/7ffe9a068f8dc718ce3d653198c999a0fb595eb5/chrome/browser/android/oom_intervention/near_oom_monitor_unittest.cc [modify] https://crrev.com/7ffe9a068f8dc718ce3d653198c999a0fb595eb5/chrome/browser/android/oom_intervention/oom_intervention_tab_helper.cc [modify] https://crrev.com/7ffe9a068f8dc718ce3d653198c999a0fb595eb5/chrome/browser/chrome_browser_main_android.cc
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/16309bb9584d1b3ee3ab13c7df369d76d27bafc9 commit 16309bb9584d1b3ee3ab13c7df369d76d27bafc9 Author: Kenichi Ishibashi <bashi@chromium.org> Date: Tue Nov 07 06:21:46 2017 Pause foreground renderer when a near-OOM is detected - Add "pause_renderer" field parameter. OomInterventionTabHelper sends a mojo message to foreground renderer to pause pages when the parameter is true. - Show NearOomInfoBar after renderer is paused. - Record accepted/declined counts. Bug: 776665 Change-Id: I2a5c160b626ef295a8b44d1f3aaeb3e1a0658d45 Reviewed-on: https://chromium-review.googlesource.com/750562 Commit-Queue: Kenichi Ishibashi <bashi@chromium.org> Reviewed-by: Daniel Cheng <dcheng@chromium.org> Reviewed-by: Scott Violet <sky@chromium.org> Reviewed-by: Maria Khomenko <mariakhomenko@chromium.org> Reviewed-by: Steven Holte <holte@chromium.org> Reviewed-by: John Abd-El-Malek <jam@chromium.org> Reviewed-by: Matthew Jones <mdjones@chromium.org> Reviewed-by: Kentaro Hara <haraken@chromium.org> Cr-Commit-Position: refs/heads/master@{#514410} [modify] https://crrev.com/16309bb9584d1b3ee3ab13c7df369d76d27bafc9/chrome/browser/DEPS [modify] https://crrev.com/16309bb9584d1b3ee3ab13c7df369d76d27bafc9/chrome/browser/android/oom_intervention/oom_intervention_tab_helper.cc [modify] https://crrev.com/16309bb9584d1b3ee3ab13c7df369d76d27bafc9/chrome/browser/android/oom_intervention/oom_intervention_tab_helper.h [modify] https://crrev.com/16309bb9584d1b3ee3ab13c7df369d76d27bafc9/chrome/browser/ui/android/infobars/near_oom_infobar.cc [modify] https://crrev.com/16309bb9584d1b3ee3ab13c7df369d76d27bafc9/chrome/browser/ui/android/infobars/near_oom_infobar.h [delete] https://crrev.com/e6e23343bfabf28eee0251ca11b94591a3a9bdde/content/browser/memory/near_oom_intervention_browsertest.cc [modify] https://crrev.com/16309bb9584d1b3ee3ab13c7df369d76d27bafc9/content/public/app/mojo/content_renderer_manifest.json [modify] https://crrev.com/16309bb9584d1b3ee3ab13c7df369d76d27bafc9/content/test/BUILD.gn [modify] https://crrev.com/16309bb9584d1b3ee3ab13c7df369d76d27bafc9/third_party/WebKit/Source/controller/BlinkInitializer.cpp [modify] https://crrev.com/16309bb9584d1b3ee3ab13c7df369d76d27bafc9/third_party/WebKit/Source/controller/BlinkInitializer.h [modify] https://crrev.com/16309bb9584d1b3ee3ab13c7df369d76d27bafc9/third_party/WebKit/Source/controller/OomInterventionImpl.cpp [modify] https://crrev.com/16309bb9584d1b3ee3ab13c7df369d76d27bafc9/third_party/WebKit/Source/controller/OomInterventionImpl.h [modify] https://crrev.com/16309bb9584d1b3ee3ab13c7df369d76d27bafc9/third_party/WebKit/Source/controller/OomInterventionImplTest.cpp [modify] https://crrev.com/16309bb9584d1b3ee3ab13c7df369d76d27bafc9/third_party/WebKit/public/platform/oom_intervention.mojom [modify] https://crrev.com/16309bb9584d1b3ee3ab13c7df369d76d27bafc9/tools/metrics/histograms/enums.xml [modify] https://crrev.com/16309bb9584d1b3ee3ab13c7df369d76d27bafc9/tools/metrics/histograms/histograms.xml
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/77be5757fcd6eb7e53ca28eb0937d35d4dfe96a7 commit 77be5757fcd6eb7e53ca28eb0937d35d4dfe96a7 Author: Kenichi Ishibashi <bashi@chromium.org> Date: Wed Nov 08 00:10:11 2017 Record state of near-OOM intervention on foreground renderer crash This CL adds a histogram to record state of near-OOM intervention (accepted or declined) when the foreground renderer is crashed after the intervention is triggered. We will use this metric to evaluate whether the intervention reduces OOM crashes. Bug: 776665 Change-Id: Ia18694484a9f68cb83360d47a20f62b8ba4f5232 Reviewed-on: https://chromium-review.googlesource.com/756538 Reviewed-by: Steven Holte <holte@chromium.org> Reviewed-by: Kentaro Hara <haraken@chromium.org> Reviewed-by: Bernhard Bauer <bauerb@chromium.org> Reviewed-by: Maria Khomenko <mariakhomenko@chromium.org> Commit-Queue: Kenichi Ishibashi <bashi@chromium.org> Cr-Commit-Position: refs/heads/master@{#514665} [modify] https://crrev.com/77be5757fcd6eb7e53ca28eb0937d35d4dfe96a7/chrome/browser/android/oom_intervention/oom_intervention_tab_helper.cc [modify] https://crrev.com/77be5757fcd6eb7e53ca28eb0937d35d4dfe96a7/chrome/browser/android/oom_intervention/oom_intervention_tab_helper.h [modify] https://crrev.com/77be5757fcd6eb7e53ca28eb0937d35d4dfe96a7/tools/metrics/histograms/histograms.xml
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/4c5aa97fda69da0a134d689cc3b35011c755542f commit 4c5aa97fda69da0a134d689cc3b35011c755542f Author: Kenichi Ishibashi <bashi@chromium.org> Date: Fri Nov 10 00:52:22 2017 Use OutOfMemoryReporter in OomInterventionTabHelper Before this CL, OomInterventionTabHelper assumed that all crashes with TERMINATION_STATUS_OOM_PROTECTED are actual OOM crashes, which isn't always true. Instead of making such assumption, it's better to use newly added OutOfMemoryReporter, which allows the tab helper to register to be notified of foreground OOM. Bug: 776665 Change-Id: I15c911b8e80e2029a41b404f5d8392a66040e0fe Reviewed-on: https://chromium-review.googlesource.com/760059 Commit-Queue: Kenichi Ishibashi <bashi@chromium.org> Reviewed-by: Charlie Harrison <csharrison@chromium.org> Reviewed-by: Kentaro Hara <haraken@chromium.org> Reviewed-by: Bernhard Bauer <bauerb@chromium.org> Reviewed-by: Maria Khomenko <mariakhomenko@chromium.org> Cr-Commit-Position: refs/heads/master@{#515385} [modify] https://crrev.com/4c5aa97fda69da0a134d689cc3b35011c755542f/chrome/browser/android/oom_intervention/oom_intervention_tab_helper.cc [modify] https://crrev.com/4c5aa97fda69da0a134d689cc3b35011c755542f/chrome/browser/android/oom_intervention/oom_intervention_tab_helper.h
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/97be6886ef853bdad2a82f1e34f1592071867296 commit 97be6886ef853bdad2a82f1e34f1592071867296 Author: Kenichi Ishibashi <bashi@chromium.org> Date: Tue Nov 14 08:21:32 2017 Use onLowMemory() to trigger OOM intervention This CL adds "use_component_callbacks" field trial parameter (true by default). When it is true, NearOomMonitor uses Android's onLowMemory() to detect near-OOM situation instead of userland heuristics. Bug: 776665 Change-Id: I905e254acfb280d40d90218124ebe0bc605d9679 Reviewed-on: https://chromium-review.googlesource.com/762690 Commit-Queue: Kenichi Ishibashi <bashi@chromium.org> Reviewed-by: Maria Khomenko <mariakhomenko@chromium.org> Reviewed-by: Kentaro Hara <haraken@chromium.org> Cr-Commit-Position: refs/heads/master@{#516228} [add] https://crrev.com/97be6886ef853bdad2a82f1e34f1592071867296/chrome/android/java/src/org/chromium/chrome/browser/NearOomMonitor.java [modify] https://crrev.com/97be6886ef853bdad2a82f1e34f1592071867296/chrome/android/java_sources.gni [modify] https://crrev.com/97be6886ef853bdad2a82f1e34f1592071867296/chrome/browser/BUILD.gn [modify] https://crrev.com/97be6886ef853bdad2a82f1e34f1592071867296/chrome/browser/android/oom_intervention/near_oom_monitor.cc [modify] https://crrev.com/97be6886ef853bdad2a82f1e34f1592071867296/chrome/browser/android/oom_intervention/near_oom_monitor.h [modify] https://crrev.com/97be6886ef853bdad2a82f1e34f1592071867296/chrome/browser/android/oom_intervention/near_oom_monitor_unittest.cc
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/d582f60bc3344df3540a5263c7082cf62a0986d2 commit d582f60bc3344df3540a5263c7082cf62a0986d2 Author: Kenichi Ishibashi <bashi@chromium.org> Date: Mon Nov 27 00:49:26 2017 Stop OOM intervention on navigation Otherwise, a navigation wouldn't finish because the intervention pauses JavaScript execution but most web pages use JavaScript to show contents. Bug: 776665 Change-Id: I344f3830c19282ed79c03c057edb2d8a53ff8386 Reviewed-on: https://chromium-review.googlesource.com/788486 Reviewed-by: Kentaro Hara <haraken@chromium.org> Reviewed-by: Bernhard Bauer <bauerb@chromium.org> Commit-Queue: Kenichi Ishibashi <bashi@chromium.org> Cr-Commit-Position: refs/heads/master@{#519201} [modify] https://crrev.com/d582f60bc3344df3540a5263c7082cf62a0986d2/chrome/browser/android/oom_intervention/oom_intervention_tab_helper.cc
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/a25188badb90fc3d54b2543865e27dd842125448 commit a25188badb90fc3d54b2543865e27dd842125448 Author: Kenichi Ishibashi <bashi@chromium.org> Date: Sun Dec 03 23:49:45 2017 OOM intervention: Fix histogram names Fix two typos in OomInterventionTabHelper. Bug: 776665 Change-Id: I4066d742bbfed519b771f2035155ead865f9d4f2 Reviewed-on: https://chromium-review.googlesource.com/802600 Reviewed-by: Kentaro Hara <haraken@chromium.org> Reviewed-by: Maria Khomenko <mariakhomenko@chromium.org> Commit-Queue: Kenichi Ishibashi <bashi@chromium.org> Cr-Commit-Position: refs/heads/master@{#521235} [modify] https://crrev.com/a25188badb90fc3d54b2543865e27dd842125448/chrome/browser/android/oom_intervention/oom_intervention_tab_helper.cc
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/7e661ef709881bf4fc81d255ec0f0c83c266223e commit 7e661ef709881bf4fc81d255ec0f0c83c266223e Author: Kenichi Ishibashi <bashi@chromium.org> Date: Mon Dec 04 00:06:06 2017 OOM intervention: Add OWNERS file Bug: 776665 Change-Id: I41ea9c3315d53a26fdf450ce34e670896bffb962 Reviewed-on: https://chromium-review.googlesource.com/802848 Reviewed-by: Maria Khomenko <mariakhomenko@chromium.org> Commit-Queue: Kenichi Ishibashi <bashi@chromium.org> Cr-Commit-Position: refs/heads/master@{#521236} [add] https://crrev.com/7e661ef709881bf4fc81d255ec0f0c83c266223e/chrome/browser/android/oom_intervention/OWNERS
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/35ac713aa0c53f646c6d8e4d94c9012cf174e879 commit 35ac713aa0c53f646c6d8e4d94c9012cf174e879 Author: Kenichi Ishibashi <bashi@chromium.org> Date: Fri Dec 08 03:44:30 2017 oom_intervention: Add opt-out logic Opt-out logic: - If user declined intervention, don't trigger it until OOM is observed on the same site. - If user declined intervention again even after OOM is observed on the site, never trigger intervention on the site. - If len(blacklist) > kMaxBlacklistSize, the user is permanently opted out. We use PerfService as datastore. Bug: 776665 Change-Id: Ie94ae5360a08f68320a955881017270d2f4f096c Reviewed-on: https://chromium-review.googlesource.com/807969 Reviewed-by: Martin Šrámek <msramek@chromium.org> Reviewed-by: Dominic Battré <battre@chromium.org> Reviewed-by: Kentaro Hara <haraken@chromium.org> Commit-Queue: Kenichi Ishibashi <bashi@chromium.org> Cr-Commit-Position: refs/heads/master@{#522703} [modify] https://crrev.com/35ac713aa0c53f646c6d8e4d94c9012cf174e879/chrome/browser/BUILD.gn [add] https://crrev.com/35ac713aa0c53f646c6d8e4d94c9012cf174e879/chrome/browser/android/oom_intervention/oom_intervention_decider.cc [add] https://crrev.com/35ac713aa0c53f646c6d8e4d94c9012cf174e879/chrome/browser/android/oom_intervention/oom_intervention_decider.h [add] https://crrev.com/35ac713aa0c53f646c6d8e4d94c9012cf174e879/chrome/browser/android/oom_intervention/oom_intervention_decider_unittest.cc [modify] https://crrev.com/35ac713aa0c53f646c6d8e4d94c9012cf174e879/chrome/browser/android/oom_intervention/oom_intervention_tab_helper.cc [modify] https://crrev.com/35ac713aa0c53f646c6d8e4d94c9012cf174e879/chrome/browser/android/oom_intervention/oom_intervention_tab_helper.h [modify] https://crrev.com/35ac713aa0c53f646c6d8e4d94c9012cf174e879/chrome/browser/browsing_data/chrome_browsing_data_remover_delegate.cc [modify] https://crrev.com/35ac713aa0c53f646c6d8e4d94c9012cf174e879/chrome/browser/prefs/browser_prefs.cc [modify] https://crrev.com/35ac713aa0c53f646c6d8e4d94c9012cf174e879/chrome/test/BUILD.gn
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/262f8ad1e86b5bad3783fa5084b6cdd0a2426196 commit 262f8ad1e86b5bad3783fa5084b6cdd0a2426196 Author: Kenichi Ishibashi <bashi@chromium.org> Date: Fri Dec 08 09:29:31 2017 oom_intervention: Handle browser crash in triggering/opt-out logic Sometimes the browser process is killed before a foreground renderer process under high memory pressure. In such case we can't record the exact site which caused OOM crash. To work around this case, we use following heuristic: When the last shutdown wasn't clean and the "intervention declined list" isn't empty, assume that the last site in the declined list caused the crash and the crash was due to OOM. Add the site to the "OOM detected list." Bug: 776665 Change-Id: I53886198311ededf26b30de14a9345c757bf1c41 Reviewed-on: https://chromium-review.googlesource.com/816480 Reviewed-by: Kentaro Hara <haraken@chromium.org> Commit-Queue: Kenichi Ishibashi <bashi@chromium.org> Cr-Commit-Position: refs/heads/master@{#522747} [modify] https://crrev.com/262f8ad1e86b5bad3783fa5084b6cdd0a2426196/chrome/browser/android/oom_intervention/oom_intervention_decider.cc [modify] https://crrev.com/262f8ad1e86b5bad3783fa5084b6cdd0a2426196/chrome/browser/android/oom_intervention/oom_intervention_decider.h [modify] https://crrev.com/262f8ad1e86b5bad3783fa5084b6cdd0a2426196/chrome/browser/android/oom_intervention/oom_intervention_decider_unittest.cc
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/d5f4c8889695bad4c821ff934428288fa551face commit d5f4c8889695bad4c821ff934428288fa551face Author: Kenichi Ishibashi <bashi@chromium.org> Date: Thu Dec 28 06:48:56 2017 oom_intervention: Check renderer memory usage to detect near-OOM Before this CL we use ComponentCallback2.onLowMemory to detect near-OOM situations. However, according to early results of field trials it seems that success estimation rate is lower than we expected. This CL adds heuristics to improve success estimation rate. When the browser gets a signal from the OS via onLowMemory(), we will start monitoring memory usage in renderer side. If memory workload in renderer process exceeds a threshold, the renderer reports that a near-OOM is detected. Bug: 776665 Change-Id: I411e5a0b2a0eac0468133a6b843b1c613998de32 Reviewed-on: https://chromium-review.googlesource.com/838584 Commit-Queue: Kenichi Ishibashi <bashi@chromium.org> Reviewed-by: Daniel Cheng <dcheng@chromium.org> Reviewed-by: Kentaro Hara <haraken@chromium.org> Cr-Commit-Position: refs/heads/master@{#526278} [modify] https://crrev.com/d5f4c8889695bad4c821ff934428288fa551face/chrome/browser/android/oom_intervention/oom_intervention_tab_helper.cc [modify] https://crrev.com/d5f4c8889695bad4c821ff934428288fa551face/chrome/browser/android/oom_intervention/oom_intervention_tab_helper.h [modify] https://crrev.com/d5f4c8889695bad4c821ff934428288fa551face/third_party/WebKit/Source/controller/OomInterventionImpl.cpp [modify] https://crrev.com/d5f4c8889695bad4c821ff934428288fa551face/third_party/WebKit/Source/controller/OomInterventionImpl.h [modify] https://crrev.com/d5f4c8889695bad4c821ff934428288fa551face/third_party/WebKit/Source/controller/OomInterventionImplTest.cpp [modify] https://crrev.com/d5f4c8889695bad4c821ff934428288fa551face/third_party/WebKit/public/platform/oom_intervention.mojom
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/6b4f5a7428f0ae9ef518319d04c1bcd130f3efbd commit 6b4f5a7428f0ae9ef518319d04c1bcd130f3efbd Author: Kenichi Ishibashi <bashi@chromium.org> Date: Mon Jan 15 04:13:48 2018 oom_intervention: Add renderer side only near-OOM detection mode This CL adds a new configuration for detecting near-OOM situation. With this configuration we start monitoring memory usage in renderer side without waiting for onLowMemory() callback in browser side. Configuration for detecting near-OOM situation can be controlled by a field trial parameter. We will examine which configuration (previous one and new one) works well in field trial. Bug: 776665 Change-Id: Icc4d31764866b09f380df17e60455be873441724 Reviewed-on: https://chromium-review.googlesource.com/863405 Reviewed-by: Kentaro Hara <haraken@chromium.org> Commit-Queue: Kenichi Ishibashi <bashi@chromium.org> Cr-Commit-Position: refs/heads/master@{#529198} [modify] https://crrev.com/6b4f5a7428f0ae9ef518319d04c1bcd130f3efbd/chrome/browser/android/oom_intervention/oom_intervention_tab_helper.cc [modify] https://crrev.com/6b4f5a7428f0ae9ef518319d04c1bcd130f3efbd/chrome/browser/android/oom_intervention/oom_intervention_tab_helper.h
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/79ca910048175c9118606b96a840516ace45f6c7 commit 79ca910048175c9118606b96a840516ace45f6c7 Author: Kenichi Ishibashi <bashi@chromium.org> Date: Tue Apr 24 02:22:59 2018 OomIntervention: Make memory workload threshold configurable The current threshold came from my local experiments and it wouldn't be necessarily an appropriate value. Make the threshold configurable so that we can run experiments in the real world. Bug: 776665 Change-Id: I6ae896439eb50985221258b9109f6f06e3aea178 Reviewed-on: https://chromium-review.googlesource.com/1022410 Commit-Queue: Kenichi Ishibashi <bashi@chromium.org> Reviewed-by: Kinuko Yasuda <kinuko@chromium.org> Reviewed-by: Kentaro Hara <haraken@chromium.org> Cr-Commit-Position: refs/heads/master@{#552963} [modify] https://crrev.com/79ca910048175c9118606b96a840516ace45f6c7/chrome/browser/android/oom_intervention/oom_intervention_tab_helper.cc [modify] https://crrev.com/79ca910048175c9118606b96a840516ace45f6c7/chrome/browser/android/oom_intervention/oom_intervention_tab_helper.h [modify] https://crrev.com/79ca910048175c9118606b96a840516ace45f6c7/third_party/blink/public/platform/oom_intervention.mojom [modify] https://crrev.com/79ca910048175c9118606b96a840516ace45f6c7/third_party/blink/renderer/controller/oom_intervention_impl.cc [modify] https://crrev.com/79ca910048175c9118606b96a840516ace45f6c7/third_party/blink/renderer/controller/oom_intervention_impl.h [modify] https://crrev.com/79ca910048175c9118606b96a840516ace45f6c7/third_party/blink/renderer/controller/oom_intervention_impl_test.cc
yuzus@ is taking over this.
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/f7a1d67127a8bc1586f6ef7c8d0dcee32ed2faf4 commit f7a1d67127a8bc1586f6ef7c8d0dcee32ed2faf4 Author: Yuzu Saijo <yuzus@chromium.org> Date: Tue Aug 21 09:18:34 2018 Implement v1 OOM intervention This CL implements v1 OOM intervention for Android Go, which drops ads to reduce memory usage. Change-Id: I64da6a3cc91adaf869fae8fadd8b032c5e8e205f Bug: 776665 Reviewed-on: https://chromium-review.googlesource.com/1055408 Reviewed-by: Kinuko Yasuda <kinuko@chromium.org> Reviewed-by: Kentaro Hara <haraken@chromium.org> Commit-Queue: Yuzu Saijo <yuzus@chromium.org> Cr-Commit-Position: refs/heads/master@{#584697} [modify] https://crrev.com/f7a1d67127a8bc1586f6ef7c8d0dcee32ed2faf4/chrome/browser/android/oom_intervention/oom_intervention_config.cc [modify] https://crrev.com/f7a1d67127a8bc1586f6ef7c8d0dcee32ed2faf4/chrome/browser/android/oom_intervention/oom_intervention_config.h [modify] https://crrev.com/f7a1d67127a8bc1586f6ef7c8d0dcee32ed2faf4/chrome/browser/android/oom_intervention/oom_intervention_tab_helper.cc [modify] https://crrev.com/f7a1d67127a8bc1586f6ef7c8d0dcee32ed2faf4/chrome/browser/android/oom_intervention/oom_intervention_tab_helper.h [modify] https://crrev.com/f7a1d67127a8bc1586f6ef7c8d0dcee32ed2faf4/third_party/blink/public/platform/oom_intervention.mojom [modify] https://crrev.com/f7a1d67127a8bc1586f6ef7c8d0dcee32ed2faf4/third_party/blink/renderer/controller/oom_intervention_impl.cc [modify] https://crrev.com/f7a1d67127a8bc1586f6ef7c8d0dcee32ed2faf4/third_party/blink/renderer/controller/oom_intervention_impl.h [modify] https://crrev.com/f7a1d67127a8bc1586f6ef7c8d0dcee32ed2faf4/third_party/blink/renderer/controller/oom_intervention_impl_test.cc [modify] https://crrev.com/f7a1d67127a8bc1586f6ef7c8d0dcee32ed2faf4/third_party/blink/renderer/core/dom/document.cc [modify] https://crrev.com/f7a1d67127a8bc1586f6ef7c8d0dcee32ed2faf4/third_party/blink/renderer/core/dom/document.h
Comment 1 by bashi@chromium.org
, Oct 20 2017