binder: optimize OnewayCallQueueing
time out/host/linux-x86/nativetest64/binderRpcTestNoKernel/binderRpcTestNoKernel --gtest_filter="*OnewayCallQueueing*"
before: 1:20.09 total
after: 49.387 total
All of the time is spent in saturateThreadPool now.
Bug: 271860373
Test: see above
Change-Id: Id41ff1d6e77070c39c656c07be87028011c6e663
diff --git a/libs/binder/tests/binderRpcTestService.cpp b/libs/binder/tests/binderRpcTestService.cpp
index a27bd2f..ca5a117 100644
--- a/libs/binder/tests/binderRpcTestService.cpp
+++ b/libs/binder/tests/binderRpcTestService.cpp
@@ -83,6 +83,18 @@
fd->reset(mFdChannel.read());
return Status::ok();
}
+
+ HandoffChannel<int> mIntChannel;
+
+ Status blockingSendIntOneway(int n) override {
+ mIntChannel.write(n);
+ return Status::ok();
+ }
+
+ Status blockingRecvInt(int* n) override {
+ *n = mIntChannel.read();
+ return Status::ok();
+ }
};
int main(int argc, char* argv[]) {