[roll] Roll fuchsia [ui][input-pipeline] add trace events for input handlers

When adding a handler to the input pipeline, instrument the handler's
task with a Fuchsia Trace `duration`.

This provides a "catch-all" or "backstop" trace of task duration
for all input handlers. This backstop has some known limitations:
1. The duration does not distinguish between time spent on the
   CPU, and time spent `await`-ing some `Future`.
2. The duration only provides the highest-level accounting of
   the elapsed time for each loop on an InputHandler's task.
3. The backstop only accounts for time spent in the `Task`s
   created by `InputPipelineAssembly:add_handler()`. This
   excludes, for example, the `Task` that informs Flatland of
   the new cursor transform.

For input handlers where we want to distinguish active/awaiting
time, or where we want a more fine-grained breakdown of the work,
we'll add additional instrumentation within the handler.

Similarly, for `Task`s not created by `add_handler()`, we'll
add more instrumentation in later CLs.

Design note
-----------
The instumentation passes the `handler_name` into the duration as an
argument, rather than as the name of the duration itself. Consequently,
the slices in the Perfetto visualization will all say
"handle_input_event", and we'll need to select a slice to get the
details of which handler was running.

The challenge here is that (for technical reasons), using the
`handler_name` as the duration's name would require adding
`unsafe` code. If the indirection to get to the handler's name
in the Perfetto UI turns out to be an impediment to analyzing
traces, we can reconsider.

While there
-----------
Update an error message in the `Task` created by `add_handler()`, to
provide more detailed information on the affected `InputHandler`.

Manual test
-----------
1. Flash onto an Atlas.
2. Capture trace of using the touchpad.
3. Open trace at ui.perfetto.dev
4. Share trace as https://ui.perfetto.dev/#!/?s=9b81418ca3d1448be6c6902c4e296683f2f8f9437508131a2db81fcbe7

Original-Bug: 110679
Test: fx test input_pipeline_lib_tests and manual (see above)
Original-Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/732062
Original-Revision: 06b583d60ffe3d59189055f510109a7c159bbf42
GitOrigin-RevId: 18ee70fa4178fce3c03ae0bb33403b76f8af2860
Change-Id: I0d5d3d9928dc917925e828eb97c2a2d3534088b1
1 file changed
tree: ddaa7341eb9ff04ed59a337ddb03c33c643536c4
  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.