Support standalone logcat parsing

Add support to parse logcat files outside of bug reports. For that we
refactored the parsing code a bit and split it into a tokenization and
a parsing (after sorting) phase. The sorting phase is now needed as we
need to sort the logcat events with events from other trace types.

This cl introduces some logic changes too:

1. When deduplication logcat and dumpstate events we only match each
event once. E.g.
Logcat
ts_1 "Msg 1"

Dumpstate
ts_1 "Msg 1" < This event is not emitted as it is a duplicate
ts_1 "Msg 1" < This event used to be not emitted but is now emitted
               (there is no match for it in the locat)

2. The dedup logic used to ignore the event priority when matching. It
now takes that into account.


Change-Id: Idab950a1e2b1a20451821e2a443335e8f7947409
35 files changed
tree: 0f7a78c447f0222cd9a3b76da9035f1e8e9e4bd3
  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.