TraceProcessor: add android_dumpstate table and ingestion

Before this CL we would ingest only the persistent logcat from
a BR. With this CL, we are ingesting also:
- The non-persistent logcat from the bugreport-xxx.txt file
  (also known as "dumpstate" output)
- The other, non-logcat, sections of dumpstate.

Dumpstate is organized in a two level hierarchy (beautifully
flattened into one text file with load bearing ----- markers):
1. Various dumpstate sections, examples:
```
  ------ DUMPSYS CRITICAL (/system/bin/dumpsys) ------
  ...
  ------ SYSTEM LOG (logcat -v threadtime -v printable -v uid -d *:v) ------
  ...
  ------ RADIO LOG (logcat -b radio -v threadtime -v printable -v uid -d *:v) ------
  ...
  ------ IPTABLES (iptables -L -nvx) ------
  ...
  ------ DUMPSYS HIGH (/system/bin/dumpsys) ------
  ...
  ------ DUMPSYS (/system/bin/dumpsys) ------
```

2. Within the "DUMPSYS" section (note dumpsys != dumpstate), there are
   multiple services. Note that there are at least 3 DUMPSYS sections
   (CRITICAL, HIGH and default), and each reports multiple services:
```
   ------ DUMPSYS (/system/bin/dumpsys) ------
-------------------------------------------------------------------------------
DUMP OF SERVICE activity:
...
-------------------------------------------------------------------------------
DUMP OF SERVICE input_method:
...
-------------------------------------------------------------------------------
```

This CL creates one `android_dumpstate` table that has three columns:
(1) section; (2) service and (3) line, containing one row per line.
This is to help future dumpsys/dumpstate parsers to query their own sections.

Bug: 240159066
Change-Id: Iefa8b2fe1f31697237c2debe295a691c3d88ef0f
18 files changed
tree: 6920719d20e1541f9f38973bcee55b7733e96ebe
  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. tools/
  16. ui/
  17. .clang-format
  18. .clang-tidy
  19. .gitattributes
  20. .gitignore
  21. .gn
  22. .style.yapf
  23. Android.bp
  24. Android.bp.extras
  25. BUILD
  26. BUILD.extras
  27. BUILD.gn
  28. CHANGELOG
  29. codereview.settings
  30. DIR_METADATA
  31. heapprofd.rc
  32. LICENSE
  33. meson.build
  34. METADATA
  35. MODULE_LICENSE_APACHE2
  36. OWNERS
  37. perfetto.rc
  38. PerfettoIntegrationTests.xml
  39. PRESUBMIT.py
  40. README.chromium
  41. README.md
  42. TEST_MAPPING
  43. traced_perf.rc
  44. 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.