Separate client management from hooks.

Currently, we include the client in the same library as the malloc
hooks. This is incorrect, as the malloc hooks should ship within the
com.android.runtime APEX, while the client should ship with the
platform (or wherever the heapprofd executable ships from).

This can then also be used for ART object allocation callstack
tracking.

Diff of HEAD~1:malloc_hooks.cc and client_ext.cc:
https://gist.github.com/segfaulthunter/05b7f0253a79c18b851d595a5d1df2a5

Test: get system_server profile.

Change-Id: If2b96e9a8c6baadcac8eea999653c6dd16977dca
Bug: 141241849
8 files changed
tree: b79e0925c7b04ac432bac978469d4907c0a9b6b5
  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. .gitignore
  17. .gn
  18. .style.yapf
  19. Android.bp
  20. Android.bp.extras
  21. BUILD
  22. BUILD.extras
  23. BUILD.gn
  24. codereview.settings
  25. heapprofd.rc
  26. LICENSE
  27. METADATA
  28. MODULE_LICENSE_APACHE2
  29. OWNERS
  30. perfetto.rc
  31. PRESUBMIT.py
  32. README.chromium
  33. README.md
  34. TEST_MAPPING
  35. traced_perf.rc
  36. 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://docs.perfetto.dev or the /docs/ directory for documentation.