tp: extract out tokenizing logic from ProtoTraceTokenizer

This CL does three things:
1. Renames ProtoTraceTokenizer -> ProtoTraceReader to better reflect its
   true purpose.
2. Extracts out all the actual tokenization from ProtoTraceReader into a
   new ProtoTraceTokenizer class which can be reused. This includes
   handling any decompression of compressed packets.
3. Updates all usage of ProtoTraceTokenizer to ProtoTraceReader.

This is needed to support handling gzip traces in DecompressTrace
without duplicating really subtle logic.

Bug: 167975440
Change-Id: I4d14aa011663b9cbbac4672a63f18f9c08e7201d
14 files changed
tree: 396e344dc1d962a3b7db93b566f38904943aa042
  1. bazel/
  2. build_overrides/
  3. buildtools/
  4. debian/
  5. docs/
  6. examples/
  7. gn/
  8. include/
  9. infra/
  10. protos/
  11. src/
  12. test/
  13. tools/
  14. ui/
  15. .clang-format
  16. .clang-tidy
  17. .gitignore
  18. .gn
  19. .style.yapf
  20. Android.bp
  21. Android.bp.extras
  22. BUILD
  23. BUILD.extras
  24. BUILD.gn
  25. CHANGELOG
  26. codereview.settings
  27. heapprofd.rc
  28. LICENSE
  29. METADATA
  30. MODULE_LICENSE_APACHE2
  31. OWNERS
  32. perfetto.rc
  33. PRESUBMIT.py
  34. README.chromium
  35. README.md
  36. TEST_MAPPING
  37. traced_perf.rc
  38. 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.