heapprofd: split main() in a seprate target
This splits the main() symbol from HeapprofdMain()
so the latter can be referred by other executables.
This is consistent with what we did with the other
daemons. #fixit
Bug: 187945217
Change-Id: Iee2f406703d44330bbe57ff0e95550d50b4783a5
diff --git a/Android.bp b/Android.bp
index de0d6e9..1d83399 100644
--- a/Android.bp
+++ b/Android.bp
@@ -83,6 +83,7 @@
":perfetto_src_profiling_common_profiler_guardrails",
":perfetto_src_profiling_common_unwind_support",
":perfetto_src_profiling_memory_daemon",
+ ":perfetto_src_profiling_memory_heapprofd_main",
":perfetto_src_profiling_memory_ring_buffer",
":perfetto_src_profiling_memory_scoped_spinlock",
":perfetto_src_profiling_memory_wire_protocol",
@@ -7287,6 +7288,14 @@
],
}
+// GN: //src/profiling/memory:heapprofd_main
+filegroup {
+ name: "perfetto_src_profiling_memory_heapprofd_main",
+ srcs: [
+ "src/profiling/memory/heapprofd.cc",
+ ],
+}
+
// GN: //src/profiling/memory:malloc_interceptor_bionic_hooks
filegroup {
name: "perfetto_src_profiling_memory_malloc_interceptor_bionic_hooks",