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

Issue 1417053005: cc: Split ThreadProxy into ProxyMain and ProxyImpl (Closed)

Created:
5 years, 1 month ago by Khushal
Modified:
5 years ago
CC:
Wez, cc-bugs_chromium.org, chromium-reviews, scheduler-bugs_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

cc: Split ThreadProxy into ProxyMain and ProxyImpl This is the final patch that splits ThreadProxy into ProxyMain and ProxyImpl routing all inter-proxy communication using ChannelMain and ChannelImpl. ThreadProxy currently implements the logic for glueing together the Scheduler, LayerTreeHostImpl and the LayerTreeHost and separating these components across the main and impl thread boundary. This patch isolates the logic for this glue code in ThreadProxy exclusive to each thread to ProxyMain and ProxyImpl. This will allow us to abstract the medium the 2 sides use to communicate with each other so these components can be run across a thread/process/network boundary. ThreadedChannel implements the in-process threaded case. BUG=527200 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Committed: https://crrev.com/0a226af5cb4c5ca5b3bac3e3d857601cc356dc33 Cr-Commit-Position: refs/heads/master@{#364034}

Patch Set 1 #

Patch Set 2 : Rebase. #

Patch Set 3 : #

Total comments: 47

Patch Set 4 : Rebase. #

Patch Set 5 : Address comments. #

Patch Set 6 : Minor comment fix. #

Total comments: 2

Patch Set 7 : Rebase and minor comment updates. #

Patch Set 8 : Addressing comments. #

Total comments: 4

Patch Set 9 : Update name in telemetry. #

Patch Set 10 : Rebase. #

Patch Set 11 : Update initialization and shutdown implementation. #

Total comments: 2

Patch Set 12 : Move weak ptr factories to ThreadedChannel #

Total comments: 6

Patch Set 13 : Remove IsInitialized from channel interface. #

Patch Set 14 : Change ThreadedChannel::GetProxyImpl to GetProxyImplForTesting #

Total comments: 33

Patch Set 15 : Addressed Wez's comments. #

Total comments: 54

Patch Set 16 : Rebase. #

Patch Set 17 : Addressing comments. #

Patch Set 18 : Update ProxyImpl and ProxyMain class structure. #

Total comments: 4

Patch Set 19 : Address comments from #18. #

Total comments: 44

Patch Set 20 : Addressing comments. #

Patch Set 21 : Rebase. #

Patch Set 22 : Addressed vmpstr@'s comments. #

Total comments: 10

Patch Set 23 : Rebase. #

Patch Set 24 : Addressing brianderson@'s comments, remove benchmark name change. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+2441 lines, -2479 lines) Patch
M cc/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 5 chunks +10 lines, -2 lines 0 comments Download
M cc/cc.gyp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 2 chunks +2 lines, -2 lines 0 comments Download
M cc/cc_tests.gyp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 3 chunks +8 lines, -0 lines 0 comments Download
M cc/debug/benchmark_instrumentation.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 1 chunk +2 lines, -0 lines 0 comments Download
M cc/scheduler/scheduler_state_machine_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 2 chunks +2 lines, -2 lines 0 comments Download
M cc/test/layer_tree_test.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 4 chunks +11 lines, -125 lines 0 comments Download
M cc/test/layer_tree_test.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 6 chunks +36 lines, -262 lines 0 comments Download
A cc/test/proxy_impl_for_test.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 1 chunk +73 lines, -0 lines 0 comments Download
A cc/test/proxy_impl_for_test.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 1 chunk +163 lines, -0 lines 0 comments Download
A cc/test/proxy_main_for_test.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 1 chunk +56 lines, -0 lines 0 comments Download
A cc/test/proxy_main_for_test.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 1 chunk +104 lines, -0 lines 0 comments Download
A + cc/test/test_hooks.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 3 chunks +5 lines, -246 lines 0 comments Download
A cc/test/test_hooks.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 1 chunk +28 lines, -0 lines 0 comments Download
A cc/test/threaded_channel_for_test.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 1 chunk +38 lines, -0 lines 0 comments Download
A cc/test/threaded_channel_for_test.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 1 chunk +36 lines, -0 lines 0 comments Download
M cc/trees/channel_main.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 4 chunks +12 lines, -6 lines 0 comments Download
M cc/trees/layer_tree_host.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 2 chunks +5 lines, -3 lines 0 comments Download
M cc/trees/layer_tree_host_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +0 lines, -1 line 0 comments Download
M cc/trees/layer_tree_host_unittest_proxy.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 9 chunks +101 lines, -114 lines 0 comments Download
M cc/trees/proxy_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 1 chunk +151 lines, -39 lines 0 comments Download
A cc/trees/proxy_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 1 chunk +684 lines, -0 lines 0 comments Download
M cc/trees/proxy_main.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 1 chunk +133 lines, -34 lines 0 comments Download
A cc/trees/proxy_main.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 1 chunk +465 lines, -0 lines 0 comments Download
D cc/trees/thread_proxy.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +0 lines, -333 lines 0 comments Download
D cc/trees/thread_proxy.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +0 lines, -1190 lines 0 comments Download
M cc/trees/threaded_channel.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 7 chunks +89 lines, -21 lines 0 comments Download
M cc/trees/threaded_channel.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 2 chunks +220 lines, -85 lines 0 comments Download
M cc/trees/threaded_channel_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 9 chunks +7 lines, -14 lines 0 comments Download

Messages

Total messages: 60 (16 generated)
Khushal
This depends on a couple of patches in review right now.
5 years, 1 month ago (2015-11-04 00:52:12 UTC) #3
Wez
https://codereview.chromium.org/1417053005/diff/40001/cc/test/layer_tree_test.cc File cc/test/layer_tree_test.cc (right): https://codereview.chromium.org/1417053005/diff/40001/cc/test/layer_tree_test.cc#newcode117 cc/test/layer_tree_test.cc:117: // Adapts ProxyImpl for test. Injects test hooks for ...
5 years, 1 month ago (2015-11-10 01:41:51 UTC) #5
Khushal
https://codereview.chromium.org/1417053005/diff/40001/cc/test/layer_tree_test.cc File cc/test/layer_tree_test.cc (right): https://codereview.chromium.org/1417053005/diff/40001/cc/test/layer_tree_test.cc#newcode117 cc/test/layer_tree_test.cc:117: // Adapts ProxyImpl for test. Injects test hooks for ...
5 years, 1 month ago (2015-11-11 04:17:48 UTC) #6
Wez
https://codereview.chromium.org/1417053005/diff/40001/cc/test/layer_tree_test.h File cc/test/layer_tree_test.h (right): https://codereview.chromium.org/1417053005/diff/40001/cc/test/layer_tree_test.h#newcode278 cc/test/layer_tree_test.h:278: // Used these only for ProxyMain tests in threaded ...
5 years, 1 month ago (2015-11-12 22:30:18 UTC) #8
Khushal
https://codereview.chromium.org/1417053005/diff/40001/cc/trees/proxy_main.h File cc/trees/proxy_main.h (right): https://codereview.chromium.org/1417053005/diff/40001/cc/trees/proxy_main.h#newcode154 cc/trees/proxy_main.h:154: base::WeakPtr<ProxyMain> main_thread_weak_ptr_; On 2015/11/12 22:30:18, Wez wrote: > On ...
5 years, 1 month ago (2015-11-13 04:02:17 UTC) #9
vmpstr
This looks pretty good! I think the split is awesome. +brianderson as well. https://codereview.chromium.org/1417053005/diff/140001/cc/debug/benchmark_instrumentation.h File ...
5 years, 1 month ago (2015-11-13 19:24:19 UTC) #11
Khushal
https://codereview.chromium.org/1417053005/diff/140001/cc/debug/benchmark_instrumentation.h File cc/debug/benchmark_instrumentation.h (right): https://codereview.chromium.org/1417053005/diff/140001/cc/debug/benchmark_instrumentation.h#newcode23 cc/debug/benchmark_instrumentation.h:23: const char kSendBeginFrame[] = "ProxyImpl::ScheduledActionSendBeginMainFrame"; On 2015/11/13 19:24:19, vmpstr ...
5 years, 1 month ago (2015-11-13 22:10:30 UTC) #12
vmpstr
On 2015/11/13 22:10:30, Khushal wrote: > https://codereview.chromium.org/1417053005/diff/140001/cc/debug/benchmark_instrumentation.h > File cc/debug/benchmark_instrumentation.h (right): > > https://codereview.chromium.org/1417053005/diff/140001/cc/debug/benchmark_instrumentation.h#newcode23 > ...
5 years, 1 month ago (2015-11-16 21:37:40 UTC) #13
vmpstr
On 2015/11/16 21:37:40, vmpstr wrote: > On 2015/11/13 22:10:30, Khushal wrote: > > > https://codereview.chromium.org/1417053005/diff/140001/cc/debug/benchmark_instrumentation.h ...
5 years, 1 month ago (2015-11-16 21:45:53 UTC) #14
Khushal
https://codereview.chromium.org/1417053005/diff/200001/cc/trees/threaded_channel.cc File cc/trees/threaded_channel.cc (right): https://codereview.chromium.org/1417053005/diff/200001/cc/trees/threaded_channel.cc#newcode131 cc/trees/threaded_channel.cc:131: main().initialized = true; Its better to have the channel ...
5 years, 1 month ago (2015-11-17 19:03:51 UTC) #15
Wez
https://codereview.chromium.org/1417053005/diff/40001/cc/trees/threaded_channel.h File cc/trees/threaded_channel.h (right): https://codereview.chromium.org/1417053005/diff/40001/cc/trees/threaded_channel.h#newcode151 cc/trees/threaded_channel.h:151: scoped_ptr<ProxyImpl> proxy_impl_; On 2015/11/13 at 04:02:17, Khushal wrote: > ...
5 years, 1 month ago (2015-11-18 01:50:35 UTC) #16
danakj
On Tue, Nov 17, 2015 at 5:50 PM, <wez@chromium.org> wrote: > > > https://codereview.chromium.org/1417053005/diff/40001/cc/trees/threaded_channel.h > ...
5 years, 1 month ago (2015-11-18 19:26:28 UTC) #17
Wez
Yes, you can InvalidateWeakPtrs in the destructor, if you remember to, to address the dtor-time ...
5 years, 1 month ago (2015-11-18 19:36:29 UTC) #18
Khushal
On 2015/11/18 01:50:35, Wez wrote: > https://codereview.chromium.org/1417053005/diff/40001/cc/trees/threaded_channel.h > File cc/trees/threaded_channel.h (right): > > https://codereview.chromium.org/1417053005/diff/40001/cc/trees/threaded_channel.h#newcode151 > ...
5 years, 1 month ago (2015-11-18 21:53:51 UTC) #19
brianderson
https://codereview.chromium.org/1417053005/diff/220001/cc/test/layer_tree_test.h File cc/test/layer_tree_test.h (right): https://codereview.chromium.org/1417053005/diff/220001/cc/test/layer_tree_test.h#newcode252 cc/test/layer_tree_test.h:252: // TODO(khushalsagar): Add mode for running remote channel tests. ...
5 years, 1 month ago (2015-11-19 21:18:15 UTC) #20
Khushal
https://codereview.chromium.org/1417053005/diff/220001/cc/test/layer_tree_test.h File cc/test/layer_tree_test.h (right): https://codereview.chromium.org/1417053005/diff/220001/cc/test/layer_tree_test.h#newcode252 cc/test/layer_tree_test.h:252: // TODO(khushalsagar): Add mode for running remote channel tests. ...
5 years, 1 month ago (2015-11-19 22:43:49 UTC) #21
Wez
https://codereview.chromium.org/1417053005/diff/260001/cc/trees/channel_main.h File cc/trees/channel_main.h (right): https://codereview.chromium.org/1417053005/diff/260001/cc/trees/channel_main.h#newcode63 cc/trees/channel_main.h:63: virtual ~ChannelMain() {} nit: dtor should be declared before ...
5 years ago (2015-11-21 01:00:30 UTC) #22
Khushal
https://codereview.chromium.org/1417053005/diff/260001/cc/trees/channel_main.h File cc/trees/channel_main.h (right): https://codereview.chromium.org/1417053005/diff/260001/cc/trees/channel_main.h#newcode63 cc/trees/channel_main.h:63: virtual ~ChannelMain() {} On 2015/11/21 01:00:29, Wez wrote: > ...
5 years ago (2015-11-23 20:07:20 UTC) #23
Wez
Apologies for the delay... https://codereview.chromium.org/1417053005/diff/260001/cc/trees/proxy_impl.cc File cc/trees/proxy_impl.cc (right): https://codereview.chromium.org/1417053005/diff/260001/cc/trees/proxy_impl.cc#newcode311 cc/trees/proxy_impl.cc:311: channel_impl_->BeginMainFrameNotExpectedSoon(); On 2015/11/23 at 20:07:19, ...
5 years ago (2015-11-24 22:37:00 UTC) #24
Khushal
https://codereview.chromium.org/1417053005/diff/260001/cc/trees/proxy_impl.cc File cc/trees/proxy_impl.cc (right): https://codereview.chromium.org/1417053005/diff/260001/cc/trees/proxy_impl.cc#newcode311 cc/trees/proxy_impl.cc:311: channel_impl_->BeginMainFrameNotExpectedSoon(); On 2015/11/24 22:36:59, Wez wrote: > On 2015/11/23 ...
5 years ago (2015-11-25 06:48:12 UTC) #25
vmpstr
https://codereview.chromium.org/1417053005/diff/280001/cc/trees/proxy_impl.h File cc/trees/proxy_impl.h (right): https://codereview.chromium.org/1417053005/diff/280001/cc/trees/proxy_impl.h#newcode115 cc/trees/proxy_impl.h:115: // virtual for testing. On 2015/11/25 06:48:12, Khushal wrote: ...
5 years ago (2015-11-25 19:30:39 UTC) #26
Khushal
https://codereview.chromium.org/1417053005/diff/280001/cc/trees/proxy_impl.h File cc/trees/proxy_impl.h (right): https://codereview.chromium.org/1417053005/diff/280001/cc/trees/proxy_impl.h#newcode115 cc/trees/proxy_impl.h:115: // virtual for testing. On 2015/11/25 19:30:39, vmpstr wrote: ...
5 years ago (2015-11-25 22:42:25 UTC) #27
Wez
LGTM w/ nits. *does a little dance* https://codereview.chromium.org/1417053005/diff/340001/cc/trees/proxy_impl.h File cc/trees/proxy_impl.h (right): https://codereview.chromium.org/1417053005/diff/340001/cc/trees/proxy_impl.h#newcode25 cc/trees/proxy_impl.h:25: // ChannelImpl ...
5 years ago (2015-11-26 00:39:47 UTC) #28
Khushal
On 2015/11/26 00:39:47, Wez wrote: > LGTM w/ nits. > > *does a little dance* ...
5 years ago (2015-11-30 18:34:37 UTC) #29
Khushal
On 2015/11/30 18:34:37, Khushal wrote: > On 2015/11/26 00:39:47, Wez wrote: > > LGTM w/ ...
5 years ago (2015-12-03 20:23:13 UTC) #30
vmpstr
This mostly looks good, just some minor comments and questions. brianderson, can you please take ...
5 years ago (2015-12-04 00:25:41 UTC) #31
Khushal
https://codereview.chromium.org/1417053005/diff/360001/cc/test/layer_tree_test.cc File cc/test/layer_tree_test.cc (right): https://codereview.chromium.org/1417053005/diff/360001/cc/test/layer_tree_test.cc#newcode119 cc/test/layer_tree_test.cc:119: class ProxyImplForTest : public ProxyImpl { On 2015/12/04 00:25:40, ...
5 years ago (2015-12-04 22:45:23 UTC) #32
vmpstr
lgtm % brianderson https://codereview.chromium.org/1417053005/diff/360001/cc/test/layer_tree_test.cc File cc/test/layer_tree_test.cc (right): https://codereview.chromium.org/1417053005/diff/360001/cc/test/layer_tree_test.cc#newcode119 cc/test/layer_tree_test.cc:119: class ProxyImplForTest : public ProxyImpl { ...
5 years ago (2015-12-07 22:14:42 UTC) #33
Khushal
https://codereview.chromium.org/1417053005/diff/360001/cc/test/layer_tree_test.cc File cc/test/layer_tree_test.cc (right): https://codereview.chromium.org/1417053005/diff/360001/cc/test/layer_tree_test.cc#newcode1228 cc/test/layer_tree_test.cc:1228: ProxyImpl* LayerTreeTest::GetProxyImpl() const { On 2015/12/07 22:14:42, vmpstr wrote: ...
5 years ago (2015-12-08 02:19:35 UTC) #34
Khushal
+ernstm, could you review the change in cc/debug. +sullivan, could you review the change in ...
5 years ago (2015-12-08 18:19:15 UTC) #37
vmpstr
On 2015/12/08 18:19:15, Khushal wrote: > +ernstm, could you review the change in cc/debug. > ...
5 years ago (2015-12-08 21:20:31 UTC) #39
Khushal
On 2015/12/08 21:20:31, vmpstr wrote: > On 2015/12/08 18:19:15, Khushal wrote: > > +ernstm, could ...
5 years ago (2015-12-08 21:22:15 UTC) #41
sullivan
Adding nednguyen as telemetry reviewer
5 years ago (2015-12-08 21:24:22 UTC) #43
nednguyen
On 2015/12/08 21:24:22, sullivan wrote: > Adding nednguyen as telemetry reviewer Can you move telemetry/ ...
5 years ago (2015-12-08 21:31:08 UTC) #44
nednguyen
+Sami for rendering frame change (frame_queuing_durations) metrics. Talked offline, if we don't do any change ...
5 years ago (2015-12-08 21:55:36 UTC) #47
Khushal
On 2015/12/08 21:55:36, nednguyen wrote: > +Sami for rendering frame change (frame_queuing_durations) metrics. > > ...
5 years ago (2015-12-08 22:06:51 UTC) #48
nednguyen
On 2015/12/08 22:06:51, Khushal wrote: > On 2015/12/08 21:55:36, nednguyen wrote: > > +Sami for ...
5 years ago (2015-12-08 22:30:24 UTC) #49
vmpstr
On 2015/12/08 22:30:24, nednguyen wrote: > On 2015/12/08 22:06:51, Khushal wrote: > > On 2015/12/08 ...
5 years ago (2015-12-08 22:36:30 UTC) #50
brianderson
lgtm, pending the benchmark issues. All my comments are nits. I imagine this patch is ...
5 years ago (2015-12-09 02:53:30 UTC) #51
Khushal
https://codereview.chromium.org/1417053005/diff/360001/cc/trees/threaded_channel.cc File cc/trees/threaded_channel.cc (right): https://codereview.chromium.org/1417053005/diff/360001/cc/trees/threaded_channel.cc#newcode314 cc/trees/threaded_channel.cc:314: impl().proxy_impl_weak_factory = make_scoped_ptr( On 2015/12/09 02:53:30, brianderson wrote: > ...
5 years ago (2015-12-09 08:18:56 UTC) #52
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1417053005/460001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1417053005/460001
5 years ago (2015-12-09 08:20:22 UTC) #55
commit-bot: I haz the power
Committed patchset #24 (id:460001)
5 years ago (2015-12-09 10:30:30 UTC) #57
commit-bot: I haz the power
Patchset 24 (id:??) landed as https://crrev.com/0a226af5cb4c5ca5b3bac3e3d857601cc356dc33 Cr-Commit-Position: refs/heads/master@{#364034}
5 years ago (2015-12-09 10:31:31 UTC) #59
engedy
5 years ago (2015-12-09 13:33:04 UTC) #60
Message was sent while issue was closed.
A revert of this CL (patchset #24 id:460001) has been created in
https://codereview.chromium.org/1506023008/ by engedy@chromium.org.

The reason for reverting is: Quite likely causing substantial flakiness in
cc_unittests on 'Win7 Tests (dbg)(1)'.

LayerTreeHostCopyRequestCompletionCausesCommit.RunMultiThread_DirectRenderer
(run #1):
[ RUN      ]
LayerTreeHostCopyRequestCompletionCausesCommit.RunMultiThread_DirectRenderer
c:uild\slave\win_builder__dbg_uild\src\cc	rees\layer_tree_host_unittest_copyrequest.cc(222):
error: Value of: callback_count_
  Actual: 0
Expected: 1
[  FAILED  ]
LayerTreeHostCopyRequestCompletionCausesCommit.RunMultiThread_DirectRenderer (23
ms)

See:
https://build.chromium.org/p/chromium.win/builders/Win7%20Tests%20%28dbg%29%2....

Powered by Google App Engine
This is Rietveld 408576698