traced_probes: Refactor statsd_client

A lot of the over general code in statsd_data_source
was based on the idea that we would eventually add a second
`StatsdBackend` which, rather than execing `cmd stats data-subscribe`,
used the related binder API[1]. Since that API was also based around
file descriptions a lot of the code could be shared.

As it happens that didn't work out and the new binder based API
we are actually going to used is callback based so the
generalisation was unnecessary. Instead the callback based API
can have a DataSource subclass all of it's own.

This CL:
- collapses ExecStatsdBackend into the main class
- extracts the code we'll actually want to share into a
  'common' file
- Does a few other random cleanups (removing the unused
  GetWeakPtr static method).

[1]: https://cs.android.com/android/platform/superproject/+/master:frameworks/native/libs/binder/ndk/include_cpp/android/binder_interface_utils.h;l=243;drc=affab527c820c06d3a6b3c4451aaaa744e652eb7

Bug: 268661096
Change-Id: If6701b1f677028573495ccc0cab3e67ce615b15e
9 files changed
tree: 61aca3f5c89c449a4be8e8430ecdcf0322a32c47
  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. .git-blame-ignore-revs
  20. .gitattributes
  21. .gitignore
  22. .gn
  23. .style.yapf
  24. Android.bp
  25. Android.bp.extras
  26. BUILD
  27. BUILD.extras
  28. BUILD.gn
  29. CHANGELOG
  30. codereview.settings
  31. DIR_METADATA
  32. heapprofd.rc
  33. LICENSE
  34. meson.build
  35. METADATA
  36. MODULE_LICENSE_APACHE2
  37. OWNERS
  38. perfetto.rc
  39. PerfettoIntegrationTests.xml
  40. PRESUBMIT.py
  41. README.chromium
  42. README.md
  43. TEST_MAPPING
  44. traced_perf.rc
  45. 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.