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

Issue 2668663002: Purge memory before suspending timer queues when backgrounded. (Closed)

Created:
3 years, 10 months ago by tasak
Modified:
3 years, 10 months ago
CC:
chromium-reviews, mlamouri+watch-content_chromium.org, jam, darin-cc_chromium.org, blink-reviews, kinuko+watch, scheduler-bugs_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Purge memory before suspending timer queues when backgrounded. Timer queue suspension when backgrounded is implemented in render_scheduler_impl.cc, and is enabled in android platform. Before suspending timer queue when backgrounded, it is worth purging the backgrounded renderer's memory. Because the renderer is suspended. So this cl does: - invoke purge (via MemoryCoordinator) before timer queue suspension, - use SuspendRenderer() method instead of the original timer queue suspension, and - move timer queue suspension code from renderer_scheduler_impl.cc to render_thread_impl.cc (because it seems not good to use MemoryCoordinator in blink platform). BUG= Review-Url: https://codereview.chromium.org/2668663002 Cr-Commit-Position: refs/heads/master@{#450596} Committed: https://chromium.googlesource.com/chromium/src/+/99717061d509c250beba480db52a142ebf8b6ec8

Patch Set 1 #

Patch Set 2 : Removed unittest because SuspendRenderer test covers. #

Patch Set 3 : Removed RenderTheradImpl::timer_queue_suspended_when_backgrounded_ #

Patch Set 4 : Remove mainThreadOnly's timer_queue_suspended_when_backgrounded #

Total comments: 8

Patch Set 5 : Fixed. #

Total comments: 4

Patch Set 6 : Moved closure.Reset #

Patch Set 7 : Add requestPurgeMemory to Platform #

Total comments: 4

Patch Set 8 : Fixed. #

Patch Set 9 : Patch for landing #

Unified diffs Side-by-side diffs Delta from patch set Stats (+28 lines, -6 lines) Patch
M content/public/test/render_view_test.cc View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M content/renderer/render_thread_impl.cc View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -2 lines 0 comments Download
M content/renderer/renderer_blink_platform_impl.h View 1 2 3 4 5 6 7 8 4 chunks +7 lines, -1 line 0 comments Download
M content/renderer/renderer_blink_platform_impl.cc View 1 2 3 4 5 6 7 8 3 chunks +10 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/platform/scheduler/renderer/renderer_scheduler_impl.cc View 1 2 3 4 5 6 7 8 2 chunks +2 lines, -0 lines 0 comments Download
M third_party/WebKit/public/platform/Platform.h View 1 2 3 4 5 6 7 8 1 chunk +6 lines, -0 lines 0 comments Download

Messages

Total messages: 74 (51 generated)
tasak
Would you review this CL?
3 years, 10 months ago (2017-02-02 05:30:48 UTC) #25
haraken
Mostly looks good but please add more explanation to the CL description. https://codereview.chromium.org/2668663002/diff/120001/content/renderer/render_thread_impl.cc File content/renderer/render_thread_impl.cc ...
3 years, 10 months ago (2017-02-02 08:53:13 UTC) #28
tasak
Thank you for review. https://codereview.chromium.org/2668663002/diff/120001/content/renderer/render_thread_impl.cc File content/renderer/render_thread_impl.cc (right): https://codereview.chromium.org/2668663002/diff/120001/content/renderer/render_thread_impl.cc#newcode1685 content/renderer/render_thread_impl.cc:1685: void RenderThreadImpl::PurgeBeforeSuspendTimerQueue() { On 2017/02/02 ...
3 years, 10 months ago (2017-02-03 03:13:14 UTC) #30
haraken
Please explain what this CL is doing in the CL description. LGTM with it. https://codereview.chromium.org/2668663002/diff/140001/content/renderer/render_thread_impl.cc ...
3 years, 10 months ago (2017-02-03 04:30:49 UTC) #32
tasak
https://codereview.chromium.org/2668663002/diff/140001/content/renderer/render_thread_impl.cc File content/renderer/render_thread_impl.cc (right): https://codereview.chromium.org/2668663002/diff/140001/content/renderer/render_thread_impl.cc#newcode906 content/renderer/render_thread_impl.cc:906: base::Unretained(this))); On 2017/02/03 04:30:49, haraken wrote: > > Can ...
3 years, 10 months ago (2017-02-03 05:55:27 UTC) #37
haraken
LGTM
3 years, 10 months ago (2017-02-03 07:41:56 UTC) #41
tasak
Would you review this CL?
3 years, 10 months ago (2017-02-03 10:30:45 UTC) #43
Sami
Could you explain the "move timer queue suspension code from renderer_scheduler_impl.cc" part of this change ...
3 years, 10 months ago (2017-02-03 20:34:56 UTC) #45
tasak
On 2017/02/03 20:34:56, Sami (slow -- travelling) wrote: > Could you explain the "move timer ...
3 years, 10 months ago (2017-02-06 05:18:01 UTC) #46
Sami
On 2017/02/06 05:18:01, tasak wrote: > As far as I understand: > - MemoryCoordinator is ...
3 years, 10 months ago (2017-02-06 12:03:17 UTC) #47
haraken
On 2017/02/03 20:34:56, Sami (slow -- travelling) wrote: > Could you explain the "move timer ...
3 years, 10 months ago (2017-02-07 06:56:28 UTC) #48
Sami
On 2017/02/07 06:56:28, haraken wrote: > The reason is (just) that we didn't want to ...
3 years, 10 months ago (2017-02-07 12:54:14 UTC) #49
tasak
On 2017/02/07 12:54:14, Sami wrote: > On 2017/02/07 06:56:28, haraken wrote: > > The reason ...
3 years, 10 months ago (2017-02-08 10:13:56 UTC) #52
tasak
3 years, 10 months ago (2017-02-08 10:14:10 UTC) #54
Sami
Thank you! lgtm.
3 years, 10 months ago (2017-02-08 16:57:19 UTC) #57
bashi
lgtm https://codereview.chromium.org/2668663002/diff/180001/content/renderer/renderer_blink_platform_impl.cc File content/renderer/renderer_blink_platform_impl.cc (right): https://codereview.chromium.org/2668663002/diff/180001/content/renderer/renderer_blink_platform_impl.cc#newcode1300 content/renderer/renderer_blink_platform_impl.cc:1300: void RendererBlinkPlatformImpl::requestPurgeMemory() { nit: DCHECK(memory_coordinator_) ? https://codereview.chromium.org/2668663002/diff/180001/third_party/WebKit/public/platform/Platform.h File ...
3 years, 10 months ago (2017-02-09 07:34:58 UTC) #58
tasak
Thank you for review. https://codereview.chromium.org/2668663002/diff/180001/content/renderer/renderer_blink_platform_impl.cc File content/renderer/renderer_blink_platform_impl.cc (right): https://codereview.chromium.org/2668663002/diff/180001/content/renderer/renderer_blink_platform_impl.cc#newcode1300 content/renderer/renderer_blink_platform_impl.cc:1300: void RendererBlinkPlatformImpl::requestPurgeMemory() { On 2017/02/09 ...
3 years, 10 months ago (2017-02-14 07:28:10 UTC) #63
haraken
LGTM
3 years, 10 months ago (2017-02-14 07:34:09 UTC) #64
tasak
avi@, would you review this CL? I need content/ owner's lgtm.
3 years, 10 months ago (2017-02-14 07:45:53 UTC) #66
Avi (use Gerrit)
lgtm stampity stamp
3 years, 10 months ago (2017-02-14 15:52:16 UTC) #67
tasak
On 2017/02/14 15:52:16, Avi wrote: > lgtm > > stampity stamp Thank you.
3 years, 10 months ago (2017-02-15 04:30:59 UTC) #68
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/2668663002/220001
3 years, 10 months ago (2017-02-15 05:00:06 UTC) #71
commit-bot: I haz the power
3 years, 10 months ago (2017-02-15 06:35:02 UTC) #74
Message was sent while issue was closed.
Committed patchset #9 (id:220001) as
https://chromium.googlesource.com/chromium/src/+/99717061d509c250beba480db52a...

Powered by Google App Engine
This is Rietveld 408576698