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

Issue 2718963002: Drop the global memory state from memory coordinator (Closed)

Created:
3 years, 9 months ago by bashi
Modified:
3 years, 9 months ago
Reviewers:
haraken, kinuko, chrisha
CC:
chromium-reviews, jam, darin-cc_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Drop the global memory state from memory coordinator Instaed of the global memory state, introduce a new internal state for memory coordinator called MemoryCondition. See [1] for the motivation. [1] https://docs.google.com/document/d/1XZFywVyc60mJOP76BO--AXlhrgi73noIiD5dhS6LXzA/edit# BUG=696844 Review-Url: https://codereview.chromium.org/2718963002 Cr-Commit-Position: refs/heads/master@{#454512} Committed: https://chromium.googlesource.com/chromium/src/+/810232f5fc6a9c5f26ded564bc4546ce04362a78

Patch Set 1 #

Patch Set 2 : tweak #

Total comments: 4

Patch Set 3 : tests and tweaks #

Patch Set 4 : format #

Total comments: 21

Patch Set 5 : comments #

Patch Set 6 : Observe #

Patch Set 7 : Fix build #

Patch Set 8 : Fix another build error #

Total comments: 14

Patch Set 9 : comments #

Patch Set 10 : tweak #

Patch Set 11 : Fix tests #

Total comments: 3

Patch Set 12 : comment #

Total comments: 4

Patch Set 13 : comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+416 lines, -542 lines) Patch
M content/browser/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +2 lines, -2 lines 0 comments Download
A content/browser/memory/memory_condition_observer.h View 1 2 3 4 5 6 7 8 1 chunk +87 lines, -0 lines 0 comments Download
A + content/browser/memory/memory_condition_observer.cc View 1 2 3 4 5 6 6 chunks +54 lines, -68 lines 0 comments Download
M content/browser/memory/memory_coordinator_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 5 chunks +50 lines, -31 lines 0 comments Download
M content/browser/memory/memory_coordinator_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 12 chunks +120 lines, -53 lines 0 comments Download
M content/browser/memory/memory_coordinator_impl_unittest.cc View 1 2 3 4 5 6 7 8 9 10 5 chunks +99 lines, -105 lines 0 comments Download
M content/browser/memory/memory_monitor_android.cc View 1 2 3 4 1 chunk +4 lines, -4 lines 0 comments Download
M content/browser/memory/memory_state_updater.h View 1 2 1 chunk +0 lines, -97 lines 0 comments Download
D content/browser/memory/memory_state_updater.cc View 1 2 1 chunk +0 lines, -182 lines 0 comments Download

Messages

Total messages: 48 (34 generated)
bashi
https://codereview.chromium.org/2718963002/diff/20001/content/browser/memory/memory_coordinator_impl.cc File content/browser/memory/memory_coordinator_impl.cc (left): https://codereview.chromium.org/2718963002/diff/20001/content/browser/memory/memory_coordinator_impl.cc#oldcode336 content/browser/memory/memory_coordinator_impl.cc:336: RecordStateChange(prev_state, next_state, Most of UMAs recorded here weren't helpful. ...
3 years, 9 months ago (2017-02-27 06:54:00 UTC) #2
bashi
haraken@, chrisha@: Updated tests and renamed bunch of things. Could you take a look? Sorry ...
3 years, 9 months ago (2017-02-28 08:52:21 UTC) #5
haraken
Mostly looks good. https://codereview.chromium.org/2718963002/diff/60001/content/browser/memory/memory_coordinator_impl.cc File content/browser/memory/memory_coordinator_impl.cc (left): https://codereview.chromium.org/2718963002/diff/60001/content/browser/memory/memory_coordinator_impl.cc#oldcode130 content/browser/memory/memory_coordinator_impl.cc:130: last_state_change_ = base::TimeTicks::Now(); Why can we ...
3 years, 9 months ago (2017-02-28 11:33:45 UTC) #6
bashi
https://codereview.chromium.org/2718963002/diff/60001/content/browser/memory/memory_coordinator_impl.cc File content/browser/memory/memory_coordinator_impl.cc (left): https://codereview.chromium.org/2718963002/diff/60001/content/browser/memory/memory_coordinator_impl.cc#oldcode130 content/browser/memory/memory_coordinator_impl.cc:130: last_state_change_ = base::TimeTicks::Now(); On 2017/02/28 11:33:45, haraken wrote: > ...
3 years, 9 months ago (2017-03-02 04:01:45 UTC) #17
haraken
Mostly looks good. https://codereview.chromium.org/2718963002/diff/140001/content/browser/memory/memory_condition_observer.h File content/browser/memory/memory_condition_observer.h (right): https://codereview.chromium.org/2718963002/diff/140001/content/browser/memory/memory_condition_observer.h#newcode20 content/browser/memory/memory_condition_observer.h:20: // be in a critical state". ...
3 years, 9 months ago (2017-03-02 04:36:23 UTC) #18
bashi
https://codereview.chromium.org/2718963002/diff/140001/content/browser/memory/memory_condition_observer.h File content/browser/memory/memory_condition_observer.h (right): https://codereview.chromium.org/2718963002/diff/140001/content/browser/memory/memory_condition_observer.h#newcode20 content/browser/memory/memory_condition_observer.h:20: // be in a critical state". Call this N. ...
3 years, 9 months ago (2017-03-02 05:18:56 UTC) #23
bashi
https://codereview.chromium.org/2718963002/diff/190001/content/browser/memory/memory_coordinator_impl.cc File content/browser/memory/memory_coordinator_impl.cc (right): https://codereview.chromium.org/2718963002/diff/190001/content/browser/memory/memory_coordinator_impl.cc#newcode397 content/browser/memory/memory_coordinator_impl.cc:397: if (memory_state == browser_memory_state_) unittests catched the bug. I ...
3 years, 9 months ago (2017-03-02 08:59:32 UTC) #28
bashi
haraken@: friendly ping :)
3 years, 9 months ago (2017-03-03 00:01:36 UTC) #31
haraken
LGTM https://codereview.chromium.org/2718963002/diff/190001/content/browser/memory/memory_coordinator_impl.cc File content/browser/memory/memory_coordinator_impl.cc (right): https://codereview.chromium.org/2718963002/diff/190001/content/browser/memory/memory_coordinator_impl.cc#newcode359 content/browser/memory/memory_coordinator_impl.cc:359: // foregrounded. You don't need to fix this ...
3 years, 9 months ago (2017-03-03 02:08:00 UTC) #32
bashi
kinuko@: could you rs-review for content/? https://codereview.chromium.org/2718963002/diff/190001/content/browser/memory/memory_coordinator_impl.cc File content/browser/memory/memory_coordinator_impl.cc (right): https://codereview.chromium.org/2718963002/diff/190001/content/browser/memory/memory_coordinator_impl.cc#newcode359 content/browser/memory/memory_coordinator_impl.cc:359: // foregrounded. On ...
3 years, 9 months ago (2017-03-03 02:41:33 UTC) #36
kinuko
lgtm (% nits that caught my eyes) https://codereview.chromium.org/2718963002/diff/210001/content/browser/memory/memory_coordinator_impl.cc File content/browser/memory/memory_coordinator_impl.cc (right): https://codereview.chromium.org/2718963002/diff/210001/content/browser/memory/memory_coordinator_impl.cc#newcode217 content/browser/memory/memory_coordinator_impl.cc:217: base::MemoryState memory_state) ...
3 years, 9 months ago (2017-03-03 03:06:27 UTC) #37
bashi
Thank you for review! https://codereview.chromium.org/2718963002/diff/210001/content/browser/memory/memory_coordinator_impl.cc File content/browser/memory/memory_coordinator_impl.cc (right): https://codereview.chromium.org/2718963002/diff/210001/content/browser/memory/memory_coordinator_impl.cc#newcode217 content/browser/memory/memory_coordinator_impl.cc:217: base::MemoryState memory_state) { On 2017/03/03 ...
3 years, 9 months ago (2017-03-03 04:32:58 UTC) #42
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/2718963002/230001
3 years, 9 months ago (2017-03-03 04:33:17 UTC) #45
commit-bot: I haz the power
3 years, 9 months ago (2017-03-03 04:39:16 UTC) #48
Message was sent while issue was closed.
Committed patchset #13 (id:230001) as
https://chromium.googlesource.com/chromium/src/+/810232f5fc6a9c5f26ded564bc45...

Powered by Google App Engine
This is Rietveld 408576698