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

Issue 2374343002: Add MemoryCoordinatorImpl (Closed)

Created:
4 years, 2 months ago by bashi
Modified:
4 years, 2 months ago
CC:
chromium-reviews, jam, darin-cc_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Add MemoryCoordinatorImpl This CL adds actual implementation of memory coordinator. The idea is from chrisha@ and a basic strategy is: * There is only one global state. All processes share the same state. * The state level calculation is determined by the amount of free memory and the median of renderer size (platform-dependent). BUG=617492 Committed: https://crrev.com/529cb14c66359213f1d19b0450ff4d73b25c0e10 Cr-Commit-Position: refs/heads/master@{#425786}

Patch Set 1 #

Total comments: 3

Patch Set 2 : Implement #msg4 #

Total comments: 8

Patch Set 3 : Addressed comments (still lacks tests & comments) #

Total comments: 2

Patch Set 4 : Add comments and tests #

Total comments: 1

Patch Set 5 : Attempt to fix mac failure #

Total comments: 15

Patch Set 6 : Addressed comments #

Patch Set 7 : disable test on mac #

Patch Set 8 : Update comments and rebase #

Total comments: 14

Patch Set 9 : comment #

Total comments: 9

Patch Set 10 : comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+539 lines, -27 lines) Patch
M content/browser/BUILD.gn View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -0 lines 0 comments Download
M content/browser/browser_main_loop.cc View 1 2 3 4 5 6 7 8 9 3 chunks +5 lines, -0 lines 0 comments Download
M content/browser/memory/memory_coordinator.h View 1 2 3 4 5 6 7 8 9 5 chunks +19 lines, -10 lines 0 comments Download
M content/browser/memory/memory_coordinator.cc View 1 2 3 4 5 6 7 8 9 5 chunks +47 lines, -15 lines 0 comments Download
M content/browser/memory/memory_coordinator_browsertest.cc View 1 2 3 4 5 6 1 chunk +7 lines, -1 line 0 comments Download
A content/browser/memory/memory_coordinator_impl.h View 1 2 3 4 5 6 7 8 9 1 chunk +119 lines, -0 lines 0 comments Download
A content/browser/memory/memory_coordinator_impl.cc View 1 2 3 4 5 6 7 8 9 1 chunk +191 lines, -0 lines 0 comments Download
A content/browser/memory/memory_coordinator_impl_unittest.cc View 1 2 3 4 5 6 7 8 9 1 chunk +139 lines, -0 lines 0 comments Download
M content/browser/memory/memory_coordinator_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M content/browser/memory/memory_monitor.cc View 1 2 3 4 1 chunk +8 lines, -0 lines 0 comments Download
M content/test/BUILD.gn View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 45 (20 generated)
bashi
Hi Chris and Haraken-san, This lacks comments and tests but before moving forward I'd like ...
4 years, 2 months ago (2016-09-29 05:25:01 UTC) #2
haraken
https://codereview.chromium.org/2374343002/diff/1/content/browser/memory/memory_coordinator_impl.cc File content/browser/memory/memory_coordinator_impl.cc (right): https://codereview.chromium.org/2374343002/diff/1/content/browser/memory/memory_coordinator_impl.cc#newcode81 content/browser/memory/memory_coordinator_impl.cc:81: // of child processes. I'm curious what Chris has ...
4 years, 2 months ago (2016-09-30 02:29:42 UTC) #3
chrisha
My intended logic is as follows (for a cheap and dirty v0): - Pass in ...
4 years, 2 months ago (2016-09-30 02:55:49 UTC) #4
chrisha
https://codereview.chromium.org/2374343002/diff/1/content/browser/memory/memory_coordinator.h File content/browser/memory/memory_coordinator.h (right): https://codereview.chromium.org/2374343002/diff/1/content/browser/memory/memory_coordinator.h#newcode78 content/browser/memory/memory_coordinator.h:78: virtual void OnChildRemoved() {} Why are these needed? The ...
4 years, 2 months ago (2016-09-30 02:57:21 UTC) #5
haraken
On 2016/09/30 02:55:49, chrisha (slow) wrote: > My intended logic is as follows (for a ...
4 years, 2 months ago (2016-09-30 05:40:17 UTC) #6
chrisha
Yup, for simplicity I'm suggesting that initially everything works in lockstep: MC, CMC, and all ...
4 years, 2 months ago (2016-10-04 00:43:15 UTC) #7
bashi
Thanks for detailed explanations. I have better understanding of your idea now :) Patch set ...
4 years, 2 months ago (2016-10-04 08:23:11 UTC) #8
chrisha
Heading in the right direction... https://codereview.chromium.org/2374343002/diff/20001/content/browser/memory/memory_coordinator_impl.cc File content/browser/memory/memory_coordinator_impl.cc (right): https://codereview.chromium.org/2374343002/diff/20001/content/browser/memory/memory_coordinator_impl.cc#newcode77 content/browser/memory/memory_coordinator_impl.cc:77: timer_.Start(FROM_HERE, config_.monitoring_iterval, Don't use ...
4 years, 2 months ago (2016-10-04 20:00:54 UTC) #9
bashi
Thanks for review (and sorry for delay...)! I'll start adding tests and comments when overall ...
4 years, 2 months ago (2016-10-06 03:55:45 UTC) #10
haraken
Overall logic looks good to me.
4 years, 2 months ago (2016-10-06 08:45:06 UTC) #11
chrisha
https://codereview.chromium.org/2374343002/diff/40001/content/browser/memory/memory_coordinator_impl.h File content/browser/memory/memory_coordinator_impl.h (right): https://codereview.chromium.org/2374343002/diff/40001/content/browser/memory/memory_coordinator_impl.h#newcode58 content/browser/memory/memory_coordinator_impl.h:58: base::TimeDelta monitoring_iterval_; Unless these are needed for unittesting, or ...
4 years, 2 months ago (2016-10-06 13:35:55 UTC) #12
bashi
Added tests and comments. https://codereview.chromium.org/2374343002/diff/40001/content/browser/memory/memory_coordinator_impl.h File content/browser/memory/memory_coordinator_impl.h (right): https://codereview.chromium.org/2374343002/diff/40001/content/browser/memory/memory_coordinator_impl.h#newcode58 content/browser/memory/memory_coordinator_impl.h:58: base::TimeDelta monitoring_iterval_; On 2016/10/06 13:35:54, ...
4 years, 2 months ago (2016-10-07 02:10:20 UTC) #16
chrisha
Looking good! https://codereview.chromium.org/2374343002/diff/80001/content/browser/memory/memory_coordinator_impl.cc File content/browser/memory/memory_coordinator_impl.cc (right): https://codereview.chromium.org/2374343002/diff/80001/content/browser/memory/memory_coordinator_impl.cc#newcode16 content/browser/memory/memory_coordinator_impl.cc:16: static const int kDefaultPredictedRendererSizeMB = 40; Can ...
4 years, 2 months ago (2016-10-10 23:53:02 UTC) #19
bashi
https://codereview.chromium.org/2374343002/diff/80001/content/browser/memory/memory_coordinator_impl.cc File content/browser/memory/memory_coordinator_impl.cc (right): https://codereview.chromium.org/2374343002/diff/80001/content/browser/memory/memory_coordinator_impl.cc#newcode16 content/browser/memory/memory_coordinator_impl.cc:16: static const int kDefaultPredictedRendererSizeMB = 40; On 2016/10/10 23:53:01, ...
4 years, 2 months ago (2016-10-11 02:07:33 UTC) #20
haraken
4 years, 2 months ago (2016-10-12 08:24:55 UTC) #22
bashi
The delegate is landed (https://codereview.chromium.org/2399293002/). PTAL?
4 years, 2 months ago (2016-10-14 00:24:07 UTC) #25
haraken
LGTM on my side. https://codereview.chromium.org/2374343002/diff/140001/content/browser/memory/memory_coordinator_impl.cc File content/browser/memory/memory_coordinator_impl.cc (right): https://codereview.chromium.org/2374343002/diff/140001/content/browser/memory/memory_coordinator_impl.cc#newcode22 content/browser/memory/memory_coordinator_impl.cc:22: const int kDefaultPredictedRendererSizeMB = 120; ...
4 years, 2 months ago (2016-10-14 01:27:59 UTC) #28
bashi
https://codereview.chromium.org/2374343002/diff/140001/content/browser/memory/memory_coordinator_impl.cc File content/browser/memory/memory_coordinator_impl.cc (right): https://codereview.chromium.org/2374343002/diff/140001/content/browser/memory/memory_coordinator_impl.cc#newcode22 content/browser/memory/memory_coordinator_impl.cc:22: const int kDefaultPredictedRendererSizeMB = 120; On 2016/10/14 01:27:59, haraken ...
4 years, 2 months ago (2016-10-14 03:03:00 UTC) #29
chrisha
lgtm with nits! https://codereview.chromium.org/2374343002/diff/80001/content/browser/memory/memory_coordinator_impl.cc File content/browser/memory/memory_coordinator_impl.cc (right): https://codereview.chromium.org/2374343002/diff/80001/content/browser/memory/memory_coordinator_impl.cc#newcode88 content/browser/memory/memory_coordinator_impl.cc:88: SetMemoryState(render_process_id, ToMojomMemoryState(current_state_)); On 2016/10/11 02:07:33, bashi1 ...
4 years, 2 months ago (2016-10-14 20:06:05 UTC) #30
bashi
jam@: could you review content/browser ? sky@: could you review content/test ? https://codereview.chromium.org/2374343002/diff/80001/content/browser/memory/memory_coordinator_impl.cc File content/browser/memory/memory_coordinator_impl.cc ...
4 years, 2 months ago (2016-10-16 23:51:22 UTC) #34
sky
LGTM
4 years, 2 months ago (2016-10-17 15:55:09 UTC) #37
jam
lgtm
4 years, 2 months ago (2016-10-17 16:47:21 UTC) #38
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/2374343002/180001
4 years, 2 months ago (2016-10-17 21:46:25 UTC) #41
commit-bot: I haz the power
Committed patchset #10 (id:180001)
4 years, 2 months ago (2016-10-17 21:54:25 UTC) #43
commit-bot: I haz the power
4 years, 2 months ago (2016-10-17 21:56:00 UTC) #45
Message was sent while issue was closed.
Patchset 10 (id:??) landed as
https://crrev.com/529cb14c66359213f1d19b0450ff4d73b25c0e10
Cr-Commit-Position: refs/heads/master@{#425786}

Powered by Google App Engine
This is Rietveld 408576698