traced_perf: basic producer scaffolding with logging of samples on Flush.

Nothing final about the class structure / control flow yet, will keep iterating
in future patches. Next step is handling registers, and doing proper unwinding.

The build targets are split up in preparation for later sharing a .so with
heapprofd (similar to traced and traced_probes).

Bug: 144281346
Change-Id: I1addfc5c8c559fe67283e1241b19ac66077b6cf0
diff --git a/gn/perfetto_unittests.gni b/gn/perfetto_unittests.gni
index bdcf82f..b8df601 100644
--- a/gn/perfetto_unittests.gni
+++ b/gn/perfetto_unittests.gni
@@ -55,6 +55,10 @@
   ]
 }
 
+if (enable_perfetto_traced_perf) {
+  perfetto_unittests_targets += [ "src/profiling/perf:producer_unittests" ]
+}
+
 if (enable_perfetto_trace_processor) {
   perfetto_unittests_targets += [ "src/trace_processor:unittests" ]