[trace-processor] Add importer for Instruments XML files

This adds an importer for Instruments XML files, as exported from an
Instruments trace with `xtrace export` (see code comments for the exact
command line and XML format).

Specifically, the XML tokenizer parses the XML into time sample Row data
structures, which are inserted into the sorter and then semi-trivially
parsed after sorting into frames, callsites, and samples. Row timestamps
are relative to the start of Instruments profiling -- there is support
for clock sync events in the profile to sync these timestamps against
Perfetto's boottime clock.

The XML parsing requires pulling in a dependency on libexpat, which is a
third-party streaming XML parser.

Bug: 362665903
Change-Id: I7e638f0b3c7275214aef3410f6263fb75e3968ac
42 files changed
tree: 7bd34b7c9b325229a5420522aeb06f9223c8da91
  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_LICENSE_APACHE2
  40. OWNERS
  41. perfetto.rc
  42. PerfettoIntegrationTests.xml
  43. persistent_cfg.pbtxt
  44. PRESUBMIT.py
  45. README.chromium
  46. README.md
  47. TEST_MAPPING
  48. traced_perf.rc
  49. WATCHLISTS
  50. 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.