Merge lp:~raof/mir/no-hidden-rpc-in-bufferstream into lp:mir
Status: | Work in progress |
---|---|
Proposed branch: | lp:~raof/mir/no-hidden-rpc-in-bufferstream |
Merge into: | lp:mir |
Prerequisite: | lp:~raof/mir/fix-non-precompiled-headers-build |
Diff against target: |
852 lines (+379/-72) 14 files modified
src/client/buffer_factory.cpp (+11/-1) src/client/buffer_stream.cpp (+57/-21) src/client/mir_connection.cpp (+22/-6) src/client/mir_connection.h (+3/-0) src/client/no_tls_future-inl.h (+76/-6) src/client/rpc/mir_protobuf_rpc_channel.cpp (+1/-1) tests/acceptance-tests/test_client_library.cpp (+2/-0) tests/acceptance-tests/test_client_surfaces.cpp (+37/-0) tests/include/mir/test/doubles/stub_buffer.h (+8/-6) tests/integration-tests/test_surfaceloop.cpp (+44/-28) tests/mir_test_doubles/stub_buffer.cpp (+5/-3) tests/unit-tests/client/CMakeLists.txt (+1/-0) tests/unit-tests/client/test_client_buffer_stream.cpp (+1/-0) tests/unit-tests/client/test_no_tls_future.cpp (+111/-0) |
To merge this branch: | bzr merge lp:~raof/mir/no-hidden-rpc-in-bufferstream |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Mir CI Bot | continuous-integration | Needs Fixing | |
Kevin DuBois (community) | Approve | ||
Review via email: mp+298202@code.launchpad.net |
Commit message
Eliminate the hidden RPC waits in MirBufferStream with NBS.
There were a variety of mir_buffer_stream_* calls which would implicitly block on RPC, particularly mir_buffer_
mir_connection_
Resolve this by having the wait handles not signal until the buffer stream is in a valid state.
Description of the change
Another prerequisite for manual event dispatch.
This removes two unit tests from TestMirConnection - I did this because they require a lot of state set up now - surface creation doesn't complete until buffer stream creation is complete, which doesn't complete until the buffer vault receives a buffer in response to its alloc_buffer calls, and this buffer needs to be sufficiently genuine to make it through multiple layers of RPC/MirSurface dispatch.
Instead, there's a new acceptance test for this behaviour in https:/
Unmerged revisions
- 3560. By Chris Halse Rogers
-
Wait for default BufferStream creation before calling surface created callback.
Punt completion of the operation into the delayed-processing queue, where it can block on
the creation MirWaitHandle of the default BufferStream. - 3559. By Chris Halse Rogers
-
Be more verbose when receiving an unexpected buffer.
This *should* never happen, so being verbose in the error message is low cost and potentially
high reward. - 3558. By Chris Halse Rogers
-
MirProtobufRpcC
hannel: Don't destroy exception information on error. - 3557. By Chris Halse Rogers
-
Send valid buffers in SurfaceLoop integration test.
This requires making StubBuffer a bit stubbier and actually packing the IPC messages.
- 3556. By Chris Halse Rogers
-
Fix NoTLSFuture so that the move-setter is actually accessible.
Because NoTLSPromise only had a set_value(T val) (wat‽) method, PromiseState's set_value(T&& val)
method was unreachable. Which is apparently why g++ didn't notice that it was broken. - 3555. By Chris Halse Rogers
-
BufferStream: Do not signal creation wait handle until fully ready.
With NewBufferSemantics we were signalling the creation wait handle after the construction of the mcl::BufferStream,
but at this point the BufferVault does not necessarily have a buffer yet - that comes later as an event in response
to the allocate_buffer requests made during construction.Instead, wait until the current buffer future<> has resolved before signalling that the BufferStream
is ready. - 3554. By Chris Halse Rogers
-
Add missing gmock header.
testing::Eq and EXPECT_THAT are defined in Google Mock, not Google Test.
This only builds because MIR_USE_
PRECOMPILED_ HEADERS means that all our tests effectively
get the same set of headers included. - 3553. By Chris Halse Rogers
-
Remove synthesised-
focuse- event unit tests on MirConnection. These require an ungodly amount of setup, so much so that they're basically
acceptance tests. The change to making sure buffer-streams are completely
constructed before we inform the client that they're completely constructed
results in these tests requiring *even more* setup.Since we've just added real acceptance tests for this behaviour, just delete
these “unit” tests. - 3552. By Chris Halse Rogers
-
Add NoTLSPromise<
T>::or_ else() - 3551. By Chris Halse Rogers
-
NoTLSFuture is a class, damnit.
FAILED: Continuous integration, rev:3555 /mir-jenkins. ubuntu. com/job/ mir-ci/ 1177/ /mir-jenkins. ubuntu. com/job/ build-mir/ 1325/console /mir-jenkins. ubuntu. com/job/ build-0- fetch/1376 /mir-jenkins. ubuntu. com/job/ build-1- sourcepkg/ release= vivid+overlay/ 1367 /mir-jenkins. ubuntu. com/job/ build-1- sourcepkg/ release= xenial/ 1367 /mir-jenkins. ubuntu. com/job/ build-2- binpkg- mir/arch= amd64,compiler= clang,platform= mesa,release= vivid+overlay/ 1339/console /mir-jenkins. ubuntu. com/job/ build-2- binpkg- mir/arch= amd64,compiler= gcc,platform= mesa,release= xenial/ 1339 /mir-jenkins. ubuntu. com/job/ build-2- binpkg- mir/arch= amd64,compiler= gcc,platform= mesa,release= xenial/ 1339/artifact/ output/ *zip*/output. zip /mir-jenkins. ubuntu. com/job/ build-2- binpkg- mir/arch= cross-armhf, compiler= gcc,platform= android, release= vivid+overlay/ 1339 /mir-jenkins. ubuntu. com/job/ build-2- binpkg- mir/arch= cross-armhf, compiler= gcc,platform= android, release= vivid+overlay/ 1339/artifact/ output/ *zip*/output. zip /mir-jenkins. ubuntu. com/job/ build-2- binpkg- mir/arch= i386,compiler= gcc,platform= android, release= vivid+overlay/ 1339 /mir-jenkins. ubuntu. com/job/ build-2- binpkg- mir/arch= i386,compiler= gcc,platform= android, release= vivid+overlay/ 1339/artifact/ output/ *zip*/output. zip /mir-jenkins. ubuntu. com/job/ build-2- binpkg- mir/arch= i386,compiler= gcc,platform= mesa,release= xenial/ 1339 /mir-jenkins. ubuntu. com/job/ build-2- binpkg- mir/arch= i386,compiler= gcc,platform= mesa,release= xenial/ 1339/artifact/ output/ *zip*/output. zip
https:/
Executed test runs:
FAILURE: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
FAILURE: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild: /mir-jenkins. ubuntu. com/job/ mir-ci/ 1177/rebuild
https:/