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
diff --git a/BUILD b/BUILD
index 3c6b25a..91bbad6 100644
--- a/BUILD
+++ b/BUILD
@@ -1143,6 +1143,8 @@
"src/trace_processor/dynamic/descendant_slice_generator.h",
"src/trace_processor/dynamic/describe_slice_generator.cc",
"src/trace_processor/dynamic/describe_slice_generator.h",
+ "src/trace_processor/dynamic/experimental_annotated_stack_generator.cc",
+ "src/trace_processor/dynamic/experimental_annotated_stack_generator.h",
"src/trace_processor/dynamic/experimental_counter_dur_generator.cc",
"src/trace_processor/dynamic/experimental_counter_dur_generator.h",
"src/trace_processor/dynamic/experimental_flamegraph_generator.cc",