profiling: reuse interning output tracker in traced_perf
NB: this refactoring slightly changes the points at which the
heapprofd's DumpState checks for the 500k packet chunking limits. I
believe this retains enough calls to |GetCurrentInternedData| to be
fine, but please double-check (in particular, the WriteMap).
The InterningOutputTracker (nee InternState) isn't yet fully untangled
from a couple of heapprofd specifics, looking for advice on how you'd
prefer them resolved.
The perf profiler is now writing StreamingProfilePackets as a
placeholder. Final flush coming soon.
Bug: 144281346
Change-Id: I7897fe6eae71d1745adb95550177a48832838590
diff --git a/Android.bp b/Android.bp
index 83ac1b6..781d421 100644
--- a/Android.bp
+++ b/Android.bp
@@ -112,6 +112,7 @@
":perfetto_src_ipc_common",
":perfetto_src_profiling_common_callstack_trie",
":perfetto_src_profiling_common_interner",
+ ":perfetto_src_profiling_common_interning_output",
":perfetto_src_profiling_common_unwind_support",
":perfetto_src_profiling_memory_daemon",
":perfetto_src_profiling_memory_proc_utils",
@@ -1346,6 +1347,7 @@
":perfetto_src_perfetto_cmd_perfetto_atoms",
":perfetto_src_profiling_common_callstack_trie",
":perfetto_src_profiling_common_interner",
+ ":perfetto_src_profiling_common_interning_output",
":perfetto_src_profiling_common_unwind_support",
":perfetto_src_profiling_memory_client",
":perfetto_src_profiling_memory_daemon",
@@ -5611,6 +5613,14 @@
name: "perfetto_src_profiling_common_interner",
}
+// GN: //src/profiling/common:interning_output
+filegroup {
+ name: "perfetto_src_profiling_common_interning_output",
+ srcs: [
+ "src/profiling/common/interning_output.cc",
+ ],
+}
+
// GN: //src/profiling/common:unittests
filegroup {
name: "perfetto_src_profiling_common_unittests",
@@ -6996,6 +7006,7 @@
":perfetto_src_perfetto_cmd_unittests",
":perfetto_src_profiling_common_callstack_trie",
":perfetto_src_profiling_common_interner",
+ ":perfetto_src_profiling_common_interning_output",
":perfetto_src_profiling_common_unittests",
":perfetto_src_profiling_common_unwind_support",
":perfetto_src_profiling_deobfuscator",
@@ -7495,6 +7506,7 @@
":perfetto_src_ipc_common",
":perfetto_src_profiling_common_callstack_trie",
":perfetto_src_profiling_common_interner",
+ ":perfetto_src_profiling_common_interning_output",
":perfetto_src_profiling_common_unwind_support",
":perfetto_src_profiling_perf_proc_descriptors",
":perfetto_src_profiling_perf_producer",