[RELAND] tp: move thread state implementation to trace processor

Thread state is pretty complicated to calculate and has a lot of edge
cases and subtlety that's hard to capture in SQL. The other problem is
that we also want to have thread state available for metrics (currently
some metrics have recreated a cut down version of this class).

For this reason, move the thread state computation as a dynamic table in
C++ which allows sharing it with other places. It also has the advantage
of making startup of the UI much faster as it doesn't need to compute
the thread state table.

This is a reland of aosp/1360559

Bug: 163812686
Change-Id: I48ed30e9b9696890fb8d389b0014d65e609feb3d
12 files changed
tree: fc4b9dffe52ad24037a0c0281ea0bd88634d0e19
  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.