[roll] Roll fuchsia [fidl][cpp] Correctly discard unknowns in natural tables and unions

Previously natural tables did not handle unknown envelopes. Decoding
fails due to unconsumed bytes and handles. GIDL did not fail because
there's a logic to skip any test dealing with unknowns in the natural
C++ GIDL generator. Some skipping were moved to GIDL allow/denylisting
in this CL and we should represent all the skipping in GIDL
allow/denylists eventually.

PS1 is a simple fix but performance is too slow:

  CPP/Decode/Table/AllSet/63/Steps.Decode/WallTime
  slower            1.390-1.434    636.6 +/- 8.9 ns     898.8 +/- 1.6 ns
  CPP/Decode/Table/SingleSet/1_of_63/Steps.Decode/WallTime
  slower            1.577-1.616    423.8 +/- 3.4 ns     676.7 +/- 2.9 ns

After inspecting the assembly using `fx dis`, it turns out the compiler
no longer flattens the tail calls used when traversing table members. I
got a `std::apply` + fold trick working to ensure that we avoid tail
calls in the first place. The same technique could be applied to all
visitation down the road. In PS 5 we have:

  CPP/Decode/Table/AllSet/63/Steps.Decode/WallTime
  faster            0.777-0.797    637.3 +/- 1.9 ns     501.6 +/- 4.8 ns
  CPP/Decode/Table/SingleSet/1_of_63/Steps.Decode/WallTime
  faster            0.504-0.515    419.5 +/- 2.3 ns     213.8 +/- 1.2 ns

These benchmark got slower:

  CPP/Decode/Table/LastSetOthersReserved/16/Steps.Decode/WallTime
  slower            1.264-1.290    153.43 +/- 0.25 ns   196.0 +/- 1.7 ns
  CPP/Decode/Table/LastSetOthersReserved/63/Steps.Decode/WallTime
  slower            2.168-2.314    156.2 +/- 3.5 ns     349.9 +/- 3.6 ns

But there's less room to optimize because now the decoder has to perform
extra work to inspect and close all those reserved envelopes.

Original-Fixed: 111372
Original-Bug: 85383
Original-Bug: 111709
Original-Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/737167
Original-Revision: 71462b0ff734ec8ff3f9e47fc52f437e8cc336c0
GitOrigin-RevId: e5cc44ba1ecfc91050794e834821d5fb8155512d
Change-Id: I74b0c094078ddfa4a0b99f77dbb83e67765b48ad
1 file changed
tree: 06f8cb8ebdbec53a8b5b306fc37c91834a2208f3
  1. git-hooks/
  2. infra/
  3. third_party/
  4. cts
  5. firmware
  6. flower
  7. jiri.lock
  8. minimal
  9. prebuilts
  10. README.md
  11. stem
  12. test_durations
  13. toolchain
README.md

Integration

This repository contains Fuchsia's Global Integration manifest files.

Making changes

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.

Obtaining the source

First install Jiri.

Next run:

$ jiri init
$ jiri import minimal https://fuchsia.googlesource.com/integration
$ jiri update

Third party

Third party projects should have their own subdirectory in ./third_party.