tp: experimental dynamic table for callstack annotation

This patch introduces experimental_annotated_callstack, which, given a
leaf callsite id of a callstack, reconstructs the callstack, and adds
per-frame annotations. The annotations are currently Android-specific:
interp/jit/aot ART mode for managed frames, and "common-frame" for ART
implementation details.

An annotation for a given callsite should be stable, in other words,
depending only on the path from the root. Annotations are derived
directly from the frame/mapping names.

Short version:
* art/jit/aot is based directly on the mapping
* once a managed frame is seen in a callstack, all libart frames below
  it get tagged as "common-frame", except the special case where the ART
  frame is the target of a JNI trampoline (managed->native). In these
  cases, the ART frame is a native implementation of a managed library
  method. This "next frame" logic is why the annotations require
  considering more than just a single frame.

A lot of this logic could be moved into mapping/callsite tables, but I
wish to retain the flexibility for iteration for now.

The table is based on experimental_ancestor_stack_profile_callsite. One
notable difference is that the new table also returns the queried frame.

Change-Id: I53d00f384a26111183b6bf03c79c939a6c5ef844
6 files changed
tree: bf556002ed4779fd7f263c557e2cf5e1a3a344e6
  1. .github/
  2. bazel/
  3. build_overrides/
  4. buildtools/
  5. debian/
  6. docs/
  7. examples/
  8. gn/
  9. include/
  10. infra/
  11. protos/
  12. src/
  13. test/
  14. tools/
  15. ui/
  16. .clang-format
  17. .clang-tidy
  18. .gitattributes
  19. .gitignore
  20. .gn
  21. .style.yapf
  22. Android.bp
  23. Android.bp.extras
  24. BUILD
  25. BUILD.extras
  26. BUILD.gn
  27. CHANGELOG
  28. codereview.settings
  29. DIR_METADATA
  30. heapprofd.rc
  31. LICENSE
  32. meson.build
  33. METADATA
  34. MODULE_LICENSE_APACHE2
  35. OWNERS
  36. perfetto.rc
  37. PerfettoIntegrationTests.xml
  38. PRESUBMIT.py
  39. README.chromium
  40. README.md
  41. TEST_MAPPING
  42. traced_perf.rc
  43. 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.