ui: Use plugin deps to add tracks to process groups

Currently, plugins that add tracks to process or track groups get
access to the group by looking up these groups via their well known ids.
The problem is getTrackById isn't particularly efficient and is called
frequently during trace load.

This CL switches to using plugin dependencies to solve the issue of
multiple plugins adding to a shared group instead.

We have the ProcessThreadGroups plugin which exposes a
getGroupForProcess and getGroupForThread method. Other plugins can use
these methods to look up the correct group for their track, and the
dependencies list means that that this plugin is run before any
dependent plugin so these groups are guraranteed to exist by the time
the dependent plugins are run.

Change-Id: Ic1c3e077c2fbe7f145401c361e5e408a4da7a908
10 files changed
tree: 6da14dc01b40d5fd0cd5f6c2d6c1d2fdeb6c639a
  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.