commit | e98f7a96f249d4eab83fac78d7f584f02ee1b99c | [log] [tgz] |
---|---|---|
author | Yifei Teng <yifeit@fuchsia.infra.roller.google.com> | Wed Aug 18 23:22:00 2021 +0000 |
committer | Copybara-Service <copybara-worker@google.com> | Wed Aug 18 16:23:21 2021 -0700 |
tree | 536917ee7f2d096e35a2ce04242d4a1413c636ac | |
parent | 091a0a5e1bc2f6be364f855afb72143f589ef15c [diff] |
[roll] Roll fuchsia [fidl][llcpp] Avoid redundant buffer initialization Disables automatic variable initialization [1] in cases where it's safe, specifically in generated code and in FIDL message buffer types that is only used for encoding/decoding. Unfortunately the disabling is a bit less well encapsulated than we'd like, since one has to apply it on a per-variable basis. The macro definition is inspired by [2]. See [3] for a godbolt showing the difference in generated code. LLCPP performance generally improved. Encoding a byte vector went from >2000ns to ~200ns since we are no longer filling the 64 KiB buffer. Examples perfcompare data: LLCPP/Encode/BoolArray/256/Steps.Encode/WallTime faster 0.987-0.997 1720.3 +/- 8.0 ns 1706.56 +/- 0.49 ns LLCPP/Encode/ByteArray/16/Steps.Encode/WallTime faster 0.856-0.882 130.8 +/- 1.2 ns 113.61 +/- 0.66 ns LLCPP/Encode/ByteArray/16/Steps.Teardown/WallTime faster 0.962-0.996 14.31 +/- 0.13 ns 14.00 +/- 0.11 ns LLCPP/Encode/ByteArray/256/Steps.Encode/WallTime faster 0.784-0.809 130.8 +/- 1.3 ns 104.12 +/- 0.61 ns LLCPP/Encode/ByteArray/256/Steps.Teardown/WallTime faster 0.957-0.977 15.316 +/- 0.031 ns 14.81 +/- 0.12 ns LLCPP/Encode/ByteVector/16/Steps.Encode/WallTime faster 0.106-0.115 2124 +/- 70 ns 235.1 +/- 1.8 ns LLCPP/Encode/ByteVector/256/Steps.Encode/WallTime faster 0.107-0.117 2122 +/- 69 ns 237.5 +/- 2.5 ns LLCPP/Encode/ByteVector/4096/Steps.Encode/WallTime faster 0.091-0.100 2079 +/- 70 ns 198.0 +/- 3.1 ns LLCPP/Encode/ByteVector/4096/Steps.Setup/WallTime faster 0.983-0.999 2170 +/- 12 ns 2151.0 +/- 5.7 ns LLCPP/Encode/ByteVector/65280/Steps.Encode/WallTime faster 0.091-0.098 2044 +/- 69 ns 192.6 +/- 1.3 ns LLCPP/Encode/ByteVectorLimit/1/Steps.Encode/WallTime faster 0.821-0.925 145.4 +/- 3.4 ns 126.7 +/- 4.6 ns LLCPP/Encode/DatagramSocket/RecvMsg/Request/Steps.Encode/WallTime faster 0.813-0.899 132.0 +/- 2.8 ns 112.9 +/- 3.3 ns LLCPP/Encode/DatagramSocket/RecvMsg/Request/Steps.Teardown/WallTime slower 1.025-1.036 13.780 +/- 0.030 ns 14.200 +/- 0.042 ns LLCPP/Encode/DatagramSocket/RecvMsg/Result/Steps.Encode/WallTime faster 0.129-0.143 2155 +/- 77 ns 293.3 +/- 4.8 ns LLCPP/Encode/DatagramSocket/SendMsg2/Request/Steps.Encode/WallTime faster 0.105-0.119 2105 +/- 76 ns 235.4 +/- 6.5 ns LLCPP/Encode/DatagramSocket/SendMsg2/Result/Steps.Encode/WallTime faster 0.857-0.940 173.0 +/- 2.9 ns 155.2 +/- 4.5 ns In particular, the time it takes to round-trip a sync call more than halved, since we also avoid buffer filling in the async binding: LLCPP/EchoCall/ByteVector/16/Steps.EchoCall/WallTime faster 0.404-0.426 13300 +/- 108 ns 5514 +/- 102 ns See [4] for the full data. [1]: https://reviews.llvm.org/D54604 [2]: https://chromium.googlesource.com/chromium/src/base/+/8f4dbc27d7a19efd35181ddd533523ae6371a03d/compiler_specific.h#276 [3]: https://godbolt.org/z/Tsjo3bf9W [4]: https://logs.chromium.org/logs/fuchsia/buildbucket/cr-buildbucket.appspot.com/8838599435516804016/+/u/compare_perf_test_results_without_and_with_CL/stdout?format=raw Original-Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/570303 Original-Revision: 2b581926a60660e8fd36ac01ffdc3c22e7cf8b2e GitOrigin-RevId: 0d1f2a032bca25605cd742964e865625ad65732c Change-Id: I7a68a134cf00b1a6f74d2af728be83efc5ceb306
This repository contains Fuchsia's Global Integration manifest files.
All changes should be made to the internal version of this repository. Our infrastructure automatically updates this version when the internal one changes.
Currently all changes must be made by a Google employee. Non-Google employees wishing to make a change can ask for assistance via the IRC channel #fuchsia
on Freenode.
First install Jiri.
Next run:
$ jiri init $ jiri import minimal https://fuchsia.googlesource.com/integration $ jiri update
Third party projects should have their own subdirectory in ./third_party
.