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

Issue 2754143005: Use WaitableEvents to wake up sync IPC waiting (Closed)

Created:
3 years, 9 months ago by Ken Rockot(use gerrit already)
Modified:
3 years, 9 months ago
Reviewers:
jam, yzshen1
CC:
Aaron Boodman, abarth-chromium, chromium-reviews, darin (slow to review), darin-cc_chromium.org, jam, qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, vmpstr+watch_chromium.org, yzshen+watch_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Use WaitableEvents to wake up sync IPC waiting Changes mojo::WaitSet and mojo::SyncHandleRegistry to support waiting on arbitrary user events concurrently with Mojo handle state changes. Reverts IPC::SyncChannel to use WaitableEvent for forced wakeups in lieu of signaling with one-off message pipes (i.e. "MojoEvents", which have been removed here as well.) Also uses WaitableEvent for blocking in the bindings' MultiplexRouter and IPC Channel's internal equivalent. BUG=698460 Review-Url: https://codereview.chromium.org/2754143005 Cr-Commit-Position: refs/heads/master@{#459486} Committed: https://chromium.googlesource.com/chromium/src/+/b62e2e3d17205ea1e128d85fb6211192e62855d9

Patch Set 1 : . #

Patch Set 2 : . #

Patch Set 3 : docs #

Total comments: 12

Patch Set 4 : . #

Patch Set 5 : . #

Total comments: 2

Patch Set 6 : . #

Unified diffs Side-by-side diffs Delta from patch set Stats (+632 lines, -486 lines) Patch
M ipc/BUILD.gn View 1 chunk +0 lines, -2 lines 0 comments Download
M ipc/ipc_channel_mojo_unittest.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M ipc/ipc_mojo_bootstrap.cc View 5 chunks +11 lines, -16 lines 0 comments Download
M ipc/ipc_sync_channel.h View 6 chunks +9 lines, -5 lines 0 comments Download
M ipc/ipc_sync_channel.cc View 1 2 3 16 chunks +124 lines, -121 lines 0 comments Download
M ipc/ipc_sync_message.h View 2 chunks +7 lines, -4 lines 0 comments Download
M ipc/ipc_sync_message_filter.h View 3 chunks +0 lines, -21 lines 0 comments Download
M ipc/ipc_sync_message_filter.cc View 1 2 3 8 chunks +14 lines, -110 lines 0 comments Download
D ipc/mojo_event.h View 1 chunk +0 lines, -45 lines 0 comments Download
D ipc/mojo_event.cc View 1 chunk +0 lines, -39 lines 0 comments Download
M mojo/public/cpp/bindings/BUILD.gn View 2 chunks +2 lines, -0 lines 0 comments Download
M mojo/public/cpp/bindings/lib/multiplex_router.cc View 1 2 3 4 5 6 chunks +28 lines, -54 lines 0 comments Download
A mojo/public/cpp/bindings/lib/sync_event_watcher.cc View 1 2 3 1 chunk +67 lines, -0 lines 0 comments Download
M mojo/public/cpp/bindings/lib/sync_handle_registry.cc View 1 2 3 2 chunks +34 lines, -7 lines 0 comments Download
M mojo/public/cpp/bindings/lib/sync_handle_watcher.cc View 1 2 3 1 chunk +3 lines, -3 lines 0 comments Download
A mojo/public/cpp/bindings/sync_event_watcher.h View 1 chunk +68 lines, -0 lines 0 comments Download
M mojo/public/cpp/bindings/sync_handle_registry.h View 1 2 3 2 chunks +15 lines, -12 lines 0 comments Download
M mojo/public/cpp/system/tests/wait_set_unittest.cc View 12 chunks +129 lines, -13 lines 0 comments Download
M mojo/public/cpp/system/wait_set.h View 4 chunks +39 lines, -10 lines 0 comments Download
M mojo/public/cpp/system/wait_set.cc View 1 2 3 10 chunks +81 lines, -23 lines 0 comments Download

Messages

Total messages: 65 (51 generated)
Ken Rockot(use gerrit already)
PTAL Yuzhu for //mojo IPC mojo bootstrap John for the rest of IPC
3 years, 9 months ago (2017-03-22 19:58:32 UTC) #17
jam
should I wait for the the IPC test failures in case they change this? my ...
3 years, 9 months ago (2017-03-23 00:44:40 UTC) #20
Ken Rockot(use gerrit already)
On 2017/03/23 at 00:44:40, jam wrote: > should I wait for the the IPC test ...
3 years, 9 months ago (2017-03-23 01:32:40 UTC) #21
Ken Rockot(use gerrit already)
Alright! Figured out the bug. One of the test classes (ChannelProxyRunner) was destroying its WaitableEvent ...
3 years, 9 months ago (2017-03-23 03:52:27 UTC) #24
yzshen1
LGTM with a few nits. https://codereview.chromium.org/2754143005/diff/120001/ipc/ipc_sync_channel.cc File ipc/ipc_sync_channel.cc (right): https://codereview.chromium.org/2754143005/diff/120001/ipc/ipc_sync_channel.cc#newcode660 ipc/ipc_sync_channel.cc:660: base::WaitableEventWatcher* outer_watcher = nullptr; ...
3 years, 9 months ago (2017-03-23 20:15:51 UTC) #35
Ken Rockot(use gerrit already)
https://codereview.chromium.org/2754143005/diff/120001/ipc/ipc_sync_channel.cc File ipc/ipc_sync_channel.cc (right): https://codereview.chromium.org/2754143005/diff/120001/ipc/ipc_sync_channel.cc#newcode660 ipc/ipc_sync_channel.cc:660: base::WaitableEventWatcher* outer_watcher = nullptr; On 2017/03/23 at 20:15:50, yzshen1 ...
3 years, 9 months ago (2017-03-23 22:04:20 UTC) #37
yzshen1
https://codereview.chromium.org/2754143005/diff/120001/mojo/public/cpp/bindings/lib/multiplex_router.cc File mojo/public/cpp/bindings/lib/multiplex_router.cc (right): https://codereview.chromium.org/2754143005/diff/120001/mojo/public/cpp/bindings/lib/multiplex_router.cc#newcode112 mojo/public/cpp/bindings/lib/multiplex_router.cc:112: sync_message_event_->Signal(); On 2017/03/23 22:04:20, Ken Rockot wrote: > On ...
3 years, 9 months ago (2017-03-23 22:42:10 UTC) #47
Ken Rockot(use gerrit already)
https://codereview.chromium.org/2754143005/diff/120001/mojo/public/cpp/bindings/lib/multiplex_router.cc File mojo/public/cpp/bindings/lib/multiplex_router.cc (right): https://codereview.chromium.org/2754143005/diff/120001/mojo/public/cpp/bindings/lib/multiplex_router.cc#newcode112 mojo/public/cpp/bindings/lib/multiplex_router.cc:112: sync_message_event_->Signal(); On 2017/03/23 at 22:42:10, yzshen1 wrote: > On ...
3 years, 9 months ago (2017-03-24 04:59:55 UTC) #52
yzshen1
https://codereview.chromium.org/2754143005/diff/200001/mojo/public/cpp/bindings/lib/multiplex_router.cc File mojo/public/cpp/bindings/lib/multiplex_router.cc (right): https://codereview.chromium.org/2754143005/diff/200001/mojo/public/cpp/bindings/lib/multiplex_router.cc#newcode196 mojo/public/cpp/bindings/lib/multiplex_router.cc:196: base::WaitableEvent::InitialState::NOT_SIGNALED); If the flag |event_signaled_| is already set to ...
3 years, 9 months ago (2017-03-24 16:41:47 UTC) #53
Ken Rockot(use gerrit already)
https://codereview.chromium.org/2754143005/diff/200001/mojo/public/cpp/bindings/lib/multiplex_router.cc File mojo/public/cpp/bindings/lib/multiplex_router.cc (right): https://codereview.chromium.org/2754143005/diff/200001/mojo/public/cpp/bindings/lib/multiplex_router.cc#newcode196 mojo/public/cpp/bindings/lib/multiplex_router.cc:196: base::WaitableEvent::InitialState::NOT_SIGNALED); On 2017/03/24 at 16:41:47, yzshen1 wrote: > If ...
3 years, 9 months ago (2017-03-24 16:43:55 UTC) #55
yzshen1
lgtm
3 years, 9 months ago (2017-03-24 16:45:06 UTC) #57
jam
lgtm
3 years, 9 months ago (2017-03-24 18:16:07 UTC) #60
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/2754143005/220001
3 years, 9 months ago (2017-03-24 18:17:11 UTC) #62
commit-bot: I haz the power
3 years, 9 months ago (2017-03-24 18:37:43 UTC) #65
Message was sent while issue was closed.
Committed patchset #6 (id:220001) as
https://chromium.googlesource.com/chromium/src/+/b62e2e3d17205ea1e128d85fb621...

Powered by Google App Engine
This is Rietveld 408576698