tp: support remote clock sync

Implement injestion of the RemoteClockSync message for multi-machine
tracing sessions. A RemoteClockSync message consists of multiple
SyncedClocks messages, each of which contains ClockSnapshot taken on the
remote client and host sides:

```
  remote_clock_sync {
    synced_clocks {
      client_clocks {
        clocks {
          clock_id: 6 # CLOCK_BOOTTIME in the client.
          timestamp: 10000
        }
        # Other clocks domains
      }
      host_clocks {
        clocks {
          clock_id: 6 # CLOCK_BOOTTIME in the host
          timestamp: 111000
        }
      }
    }
    # more synced_clocks {}
  }
```

A round of clock synchronization consists of 4 snapshots taken in the
order of client, host, client, host. The process is repeated with an
interval of 30 seconds.

The proto trace reader injests this message to make an estimation of
clock offset between client and host for converting timestamps from
client to the host clock domains. The trace processor takes an average
of the estimated offset in the RemoteClockSync message to provide a more
stable and predictable offset value. For more details, refer to section
"Clock Synchronization" of go/crosetto-vm-tracing.

Bug: 347623660
Change-Id: Ide96e8fb8101b76464416effe971f57ac3c33374
10 files changed
tree: 574ae55164a37f4773d4089367cbf4e08f4342f7
  1. .github/
  2. bazel/
  3. build_overrides/
  4. buildtools/
  5. debian/
  6. docs/
  7. examples/
  8. gn/
  9. include/
  10. infra/
  11. protos/
  12. python/
  13. src/
  14. test/
  15. third_party/
  16. tools/
  17. ui/
  18. .bazelignore
  19. .bazelrc
  20. .clang-format
  21. .clang-tidy
  22. .git-blame-ignore-revs
  23. .gitattributes
  24. .gitignore
  25. .gn
  26. .style.yapf
  27. Android.bp
  28. Android.bp.extras
  29. BUILD
  30. BUILD.extras
  31. BUILD.gn
  32. CHANGELOG
  33. codereview.settings
  34. DIR_METADATA
  35. heapprofd.rc
  36. LICENSE
  37. meson.build
  38. METADATA
  39. MODULE.bazel
  40. MODULE_LICENSE_APACHE2
  41. OWNERS
  42. perfetto.rc
  43. PerfettoIntegrationTests.xml
  44. persistent_cfg.pbtxt
  45. PRESUBMIT.py
  46. README.chromium
  47. README.md
  48. TEST_MAPPING
  49. traced_perf.rc
  50. WATCHLISTS
  51. WORKSPACE
README.md

Perfetto - System profiling, app tracing and trace analysis

Perfetto is a production-grade open-source stack for performance instrumentation and trace analysis. It offers services and libraries and for recording system-level and app-level traces, native + java heap profiling, a library for analyzing traces using SQL and a web-based UI to visualize and explore multi-GB traces.

See https://perfetto.dev/docs or the /docs/ directory for documentation.