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

Issue 363383002: Forward input tasks to the Blink scheduler (Closed)

Created:
6 years, 5 months ago by Sami
Modified:
6 years, 3 months ago
CC:
chromium-reviews, jam, cc-bugs_chromium.org, jdduke+watch_chromium.org, darin-cc_chromium.org, mithro-old
Project:
chromium
Visibility:
Public.

Description

Forward input tasks to the Blink scheduler Instead of posting input tasks directly to the main thread message loop, forward them to the Blink scheduler so they can be prioritized over other tasks. BUG=391005 Committed: https://crrev.com/457b0a1c94129337a08d0efcc3fd016205a981b4 Cr-Commit-Position: refs/heads/master@{#293914}

Patch Set 1 #

Patch Set 2 : More refined plumbing. #

Patch Set 3 : Cleanup. DefaultMainThreadTaskRunner now dispatches properly. #

Total comments: 2

Patch Set 4 : Snapshot. #

Patch Set 5 : Simplification. #

Patch Set 6 : Compile fix. #

Patch Set 7 : Rebased. Added support for FROM_HERE. #

Patch Set 8 : Fix tests. #

Total comments: 3

Patch Set 9 : Thread safe shutdown. #

Patch Set 10 : Fixed test crash. #

Patch Set 11 : Unbreak single threaded mode. #

Total comments: 2

Patch Set 12 : Removed fallback. #

Total comments: 6

Patch Set 13 : Add test. #

Patch Set 14 : Debug task annotations. #

Patch Set 15 : Remove RenderThreadImpl DCHECK. #

Patch Set 16 : Rebased. #

Patch Set 17 : Sequence numbers for tasks. #

Total comments: 10

Patch Set 18 : James's comments. #

Patch Set 19 : Rebased. #

Patch Set 20 : Rebased. #

Patch Set 21 : Rebased. #

Patch Set 22 : Only forward input tasks for now. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+224 lines, -23 lines) Patch
M content/content_renderer.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 1 chunk +1 line, -0 lines 0 comments Download
M content/content_tests.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 1 chunk +1 line, -0 lines 0 comments Download
M content/renderer/gpu/render_widget_compositor.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 2 chunks +11 lines, -7 lines 0 comments Download
M content/renderer/input/input_event_filter.h View 1 2 3 4 3 chunks +6 lines, -3 lines 0 comments Download
M content/renderer/input/input_event_filter.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 5 chunks +8 lines, -8 lines 0 comments Download
M content/renderer/input/input_event_filter_unittest.cc View 1 2 3 4 5 6 7 8 1 chunk +3 lines, -3 lines 0 comments Download
M content/renderer/render_thread_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 3 chunks +10 lines, -0 lines 0 comments Download
M content/renderer/render_thread_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 6 chunks +12 lines, -2 lines 0 comments Download
A content/renderer/scheduler_proxy_task_runner.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +87 lines, -0 lines 0 comments Download
A content/renderer/scheduler_proxy_task_runner_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +85 lines, -0 lines 0 comments Download

Messages

Total messages: 73 (6 generated)
mithro-old
Hi Sami, I think I understand better now, thanks for that. Still have a question ...
6 years, 5 months ago (2014-07-08 11:18:51 UTC) #1
Sami
https://codereview.chromium.org/363383002/diff/40001/cc/trees/thread_proxy.cc File cc/trees/thread_proxy.cc (right): https://codereview.chromium.org/363383002/diff/40001/cc/trees/thread_proxy.cc#newcode719 cc/trees/thread_proxy.cc:719: 0, 0, 0); On 2014/07/08 11:18:51, mithro wrote: > ...
6 years, 5 months ago (2014-07-08 11:23:15 UTC) #2
Sami
James, PTAL. I tried writing tests for this, but turns out RenderThreadImpl has a ton ...
6 years, 5 months ago (2014-07-18 15:35:16 UTC) #3
jamesr
Have you measured the overhead this indirection adds? https://codereview.chromium.org/363383002/diff/140001/content/renderer/render_thread_impl.cc File content/renderer/render_thread_impl.cc (right): https://codereview.chromium.org/363383002/diff/140001/content/renderer/render_thread_impl.cc#newcode314 content/renderer/render_thread_impl.cc:314: (scheduler_proxy_.*ProxyFunction)(location, ...
6 years, 5 months ago (2014-07-22 01:07:23 UTC) #4
Sami
I'll report back with some perf numbers, but meanwhile I've got a question below. https://codereview.chromium.org/363383002/diff/140001/content/renderer/render_thread_impl.cc ...
6 years, 5 months ago (2014-07-22 16:24:33 UTC) #5
jamesr
What is the lifecycle of the scheduler? Specifically, what is the shutdown order? On 2014/07/22 ...
6 years, 5 months ago (2014-07-22 18:11:26 UTC) #6
Sami
On 2014/07/22 18:11:26, jamesr wrote: > What is the lifecycle of the scheduler? Specifically, what ...
6 years, 5 months ago (2014-07-22 18:34:52 UTC) #7
picksi1
On 2014/07/22 01:07:23, jamesr wrote: > Have you measured the overhead this indirection adds? > ...
6 years, 4 months ago (2014-07-29 14:53:30 UTC) #8
Sami
Now that Simon has checked that the allocations don't seem to be measurable and I've ...
6 years, 4 months ago (2014-08-05 18:04:34 UTC) #9
jamesr
https://codereview.chromium.org/363383002/diff/200001/content/renderer/render_thread_impl.cc File content/renderer/render_thread_impl.cc (right): https://codereview.chromium.org/363383002/diff/200001/content/renderer/render_thread_impl.cc#newcode350 content/renderer/render_thread_impl.cc:350: return fallback_task_runner_->PostDelayedTask(from_here, task, delay); why do you have a ...
6 years, 4 months ago (2014-08-07 17:59:24 UTC) #10
Sami
Thanks James, another look? https://codereview.chromium.org/363383002/diff/200001/content/renderer/render_thread_impl.cc File content/renderer/render_thread_impl.cc (right): https://codereview.chromium.org/363383002/diff/200001/content/renderer/render_thread_impl.cc#newcode350 content/renderer/render_thread_impl.cc:350: return fallback_task_runner_->PostDelayedTask(from_here, task, delay); On ...
6 years, 4 months ago (2014-08-08 11:39:17 UTC) #11
jamesr
https://codereview.chromium.org/363383002/diff/220001/content/renderer/render_thread_impl.cc File content/renderer/render_thread_impl.cc (right): https://codereview.chromium.org/363383002/diff/220001/content/renderer/render_thread_impl.cc#newcode309 content/renderer/render_thread_impl.cc:309: // Helper for forwarding posted tasks into different WebSchedulerProxy ...
6 years, 4 months ago (2014-08-08 17:06:49 UTC) #12
jamesr
https://codereview.chromium.org/363383002/diff/220001/content/renderer/render_thread_impl.cc File content/renderer/render_thread_impl.cc (right): https://codereview.chromium.org/363383002/diff/220001/content/renderer/render_thread_impl.cc#newcode330 content/renderer/render_thread_impl.cc:330: from_here.file_name()); this isn't a full fidelity copy of a ...
6 years, 4 months ago (2014-08-08 17:09:01 UTC) #13
jamesr
https://codereview.chromium.org/363383002/diff/220001/content/renderer/render_thread_impl.cc File content/renderer/render_thread_impl.cc (right): https://codereview.chromium.org/363383002/diff/220001/content/renderer/render_thread_impl.cc#newcode331 content/renderer/render_thread_impl.cc:331: (scheduler_proxy_.*ProxyFunction)(location, new TaskAdapter(task)); what if you put the original ...
6 years, 4 months ago (2014-08-08 17:52:49 UTC) #14
eseidel
All tasks want to have a Location. If we're forwarding a task, we should forward ...
6 years, 4 months ago (2014-08-08 17:55:31 UTC) #15
jamesr
Having tracking information in blink is great. Discarding parts of the tracking information that already ...
6 years, 4 months ago (2014-08-08 18:02:33 UTC) #16
eseidel
Sorry, I wasn't suggesting we should lose data. We can either fix the conversion to ...
6 years, 4 months ago (2014-08-08 18:09:56 UTC) #17
Sami
I like the idea of tracing the task on the Chromium side without any loss ...
6 years, 4 months ago (2014-08-08 18:40:27 UTC) #18
jamesr
On 2014/08/08 18:40:27, Sami wrote: > I like the idea of tracing the task on ...
6 years, 4 months ago (2014-08-08 19:00:16 UTC) #19
Sami
> > By the way, MessageLoop::RunTask only traces the function name, file name and > ...
6 years, 4 months ago (2014-08-11 12:30:07 UTC) #20
Sami
FYI, I also had to remove the DCHECK for RenderThreadImpl::current() since turns out it's backed ...
6 years, 4 months ago (2014-08-11 13:43:22 UTC) #21
Sami
How's this looking now? (The try job crashes were due to https://codereview.chromium.org/475033002/).
6 years, 4 months ago (2014-08-14 16:26:06 UTC) #22
jamesr
number of style issues to address before landing but otherwise lgtm. the task annotator is ...
6 years, 4 months ago (2014-08-14 17:26:00 UTC) #23
Sami
Thanks, all comments addressed. https://codereview.chromium.org/363383002/diff/320001/content/renderer/scheduler_proxy_task_runner.h File content/renderer/scheduler_proxy_task_runner.h (right): https://codereview.chromium.org/363383002/diff/320001/content/renderer/scheduler_proxy_task_runner.h#newcode18 content/renderer/scheduler_proxy_task_runner.h:18: const blink::WebTraceLocation&, On 2014/08/14 17:25:59, ...
6 years, 4 months ago (2014-08-15 10:16:16 UTC) #24
Sami
The CQ bit was checked by skyostil@chromium.org
6 years, 4 months ago (2014-08-15 10:16:23 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/skyostil@chromium.org/363383002/340001
6 years, 4 months ago (2014-08-15 10:17:35 UTC) #26
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: android_dbg_triggered_tests on tryserver.chromium.linux ...
6 years, 4 months ago (2014-08-15 13:51:26 UTC) #27
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 4 months ago (2014-08-15 14:29:04 UTC) #28
commit-bot: I haz the power
Try jobs failed on following builders: mac_chromium_rel_swarming on tryserver.chromium.mac (http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_swarming/builds/3605)
6 years, 4 months ago (2014-08-15 14:29:05 UTC) #29
Sami
The CQ bit was checked by skyostil@chromium.org
6 years, 4 months ago (2014-08-15 15:38:33 UTC) #30
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/skyostil@chromium.org/363383002/340001
6 years, 4 months ago (2014-08-15 15:42:34 UTC) #31
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: android_dbg_triggered_tests on tryserver.chromium.linux ...
6 years, 4 months ago (2014-08-15 17:11:34 UTC) #32
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 4 months ago (2014-08-15 17:51:44 UTC) #33
commit-bot: I haz the power
Try jobs failed on following builders: mac_chromium_rel_swarming on tryserver.chromium.mac (http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_swarming/builds/3691)
6 years, 4 months ago (2014-08-15 17:51:45 UTC) #34
Sami
The CQ bit was checked by skyostil@chromium.org
6 years, 4 months ago (2014-08-15 22:19:01 UTC) #35
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/skyostil@chromium.org/363383002/340001
6 years, 4 months ago (2014-08-15 22:20:35 UTC) #36
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: win_chromium_rel_swarming on tryserver.chromium.win ...
6 years, 4 months ago (2014-08-16 00:23:55 UTC) #37
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 4 months ago (2014-08-16 01:25:27 UTC) #38
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_rel_swarming on tryserver.chromium.win (http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_swarming/builds/2517)
6 years, 4 months ago (2014-08-16 01:25:28 UTC) #39
Sami
The CQ bit was checked by skyostil@chromium.org
6 years, 4 months ago (2014-08-18 09:41:44 UTC) #40
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/skyostil@chromium.org/363383002/340001
6 years, 4 months ago (2014-08-18 09:42:39 UTC) #41
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: win_chromium_rel_swarming on tryserver.chromium.win ...
6 years, 4 months ago (2014-08-18 13:16:58 UTC) #42
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 4 months ago (2014-08-18 14:17:10 UTC) #43
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_rel_swarming on tryserver.chromium.win (http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_swarming/builds/2786)
6 years, 4 months ago (2014-08-18 14:17:11 UTC) #44
Sami
The CQ bit was checked by skyostil@chromium.org
6 years, 4 months ago (2014-08-19 22:59:48 UTC) #45
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/skyostil@chromium.org/363383002/360001
6 years, 4 months ago (2014-08-19 23:00:55 UTC) #46
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: linux_gpu on tryserver.chromium.gpu ...
6 years, 4 months ago (2014-08-19 23:11:08 UTC) #47
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 4 months ago (2014-08-19 23:13:18 UTC) #48
commit-bot: I haz the power
Try jobs failed on following builders: mac_gpu on tryserver.chromium.gpu (http://build.chromium.org/p/tryserver.chromium.gpu/builders/mac_gpu/builds/43884) ios_dbg_simulator on tryserver.chromium.mac (http://build.chromium.org/p/tryserver.chromium.mac/builders/ios_dbg_simulator/builds/7142) ios_rel_device ...
6 years, 4 months ago (2014-08-19 23:13:19 UTC) #49
Sami
The CQ bit was checked by skyostil@chromium.org
6 years, 4 months ago (2014-08-20 10:44:29 UTC) #50
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/skyostil@chromium.org/363383002/380001
6 years, 4 months ago (2014-08-20 10:45:29 UTC) #51
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: android_dbg_tests_recipe on tryserver.chromium.linux ...
6 years, 4 months ago (2014-08-20 12:03:44 UTC) #52
commit-bot: I haz the power
Committed patchset #20 (380001) as 290845
6 years, 4 months ago (2014-08-20 16:33:10 UTC) #53
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/skyostil@chromium.org/363383002/400001
6 years, 3 months ago (2014-09-05 08:21:17 UTC) #55
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_rel_swarming on tryserver.chromium.win (http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_swarming/builds/9248)
6 years, 3 months ago (2014-09-05 11:58:11 UTC) #57
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/skyostil@chromium.org/363383002/400001
6 years, 3 months ago (2014-09-05 12:08:19 UTC) #59
commit-bot: I haz the power
Committed patchset #21 (id:400001) as 68bab3290b45a8610ad875d3c92530477c16a948
6 years, 3 months ago (2014-09-05 13:32:37 UTC) #60
jam
A revert of this CL (patchset #21 id:400001) has been created in https://codereview.chromium.org/548253002/ by jam@chromium.org. ...
6 years, 3 months ago (2014-09-08 07:00:04 UTC) #61
Sami
A revert of this CL (patchset #21 id:400001) has been created in https://codereview.chromium.org/553483005/ by skyostil@chromium.org. ...
6 years, 3 months ago (2014-09-08 15:02:49 UTC) #62
eseidel
Flakes would be concerning. But PLT regressions are not necessarily surprising or bad. When we ...
6 years, 3 months ago (2014-09-08 16:10:03 UTC) #63
Sami
To reduce the moving parts a little I've made this patch just forward input tasks ...
6 years, 3 months ago (2014-09-08 16:50:48 UTC) #64
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/skyostil@chromium.org/363383002/420001
6 years, 3 months ago (2014-09-08 16:53:47 UTC) #66
commit-bot: I haz the power
Exceeded time limit waiting for builds to trigger.
6 years, 3 months ago (2014-09-08 18:55:09 UTC) #68
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/skyostil@chromium.org/363383002/420001
6 years, 3 months ago (2014-09-09 09:35:40 UTC) #70
commit-bot: I haz the power
Committed patchset #22 (id:420001) as 46e1901b668dbd357ca236b43cf2907c0dd9bb19
6 years, 3 months ago (2014-09-09 10:12:56 UTC) #71
commit-bot: I haz the power
Patchset 22 (id:??) landed as https://crrev.com/796a67f0004f091f6e71a02b982d6727213da685 Cr-Commit-Position: refs/heads/master@{#293513}
6 years, 3 months ago (2014-09-10 03:39:18 UTC) #72
commit-bot: I haz the power
6 years, 3 months ago (2014-09-10 03:52:37 UTC) #73
Message was sent while issue was closed.
Patchset 22 (id:??) landed as
https://crrev.com/457b0a1c94129337a08d0efcc3fd016205a981b4
Cr-Commit-Position: refs/heads/master@{#293914}

Powered by Google App Engine
This is Rietveld 408576698