Use the SharedRingBuffer for sending payload from client to service.

This simplifies the code as we no longer have to deal with the
complexity of having to quickly drain the client socket in order to
unblock the client anymore.

We now use standard base::TaskRunner for our threads, including the
unwinding threads, as we no longer need to provide backpressure.

Remove code providing support for multiple DataSources about the same
process. We now only accept one DataSource per process, and we pick the
earliest we receive from traced. This simplifies the matching between
DataSource and process.

Change-Id: I9f91f7d4993a37eb8e92a43108b1cd8883b229c6
Bug: 126724929
Bug: 125891203
diff --git a/Android.bp b/Android.bp
index 8317acd..d68cdc0 100644
--- a/Android.bp
+++ b/Android.bp
@@ -62,9 +62,9 @@
     "src/profiling/memory/heapprofd_producer.cc",
     "src/profiling/memory/main.cc",
     "src/profiling/memory/proc_utils.cc",
-    "src/profiling/memory/process_matcher.cc",
     "src/profiling/memory/record_reader.cc",
-    "src/profiling/memory/socket_listener.cc",
+    "src/profiling/memory/scoped_spinlock.cc",
+    "src/profiling/memory/shared_ring_buffer.cc",
     "src/profiling/memory/system_property.cc",
     "src/profiling/memory/unwinding.cc",
     "src/profiling/memory/wire_protocol.cc",
@@ -171,6 +171,7 @@
     "src/profiling/memory/malloc_hooks.cc",
     "src/profiling/memory/proc_utils.cc",
     "src/profiling/memory/scoped_spinlock.cc",
+    "src/profiling/memory/shared_ring_buffer.cc",
     "src/profiling/memory/wire_protocol.cc",
   ],
   shared_libs: [
@@ -591,10 +592,9 @@
     "src/profiling/memory/heapprofd_end_to_end_test.cc",
     "src/profiling/memory/heapprofd_producer.cc",
     "src/profiling/memory/proc_utils.cc",
-    "src/profiling/memory/process_matcher.cc",
     "src/profiling/memory/record_reader.cc",
     "src/profiling/memory/scoped_spinlock.cc",
-    "src/profiling/memory/socket_listener.cc",
+    "src/profiling/memory/shared_ring_buffer.cc",
     "src/profiling/memory/system_property.cc",
     "src/profiling/memory/unwinding.cc",
     "src/profiling/memory/wire_protocol.cc",
@@ -2849,24 +2849,18 @@
     "src/perfetto_cmd/rate_limiter_unittest.cc",
     "src/profiling/memory/bookkeeping.cc",
     "src/profiling/memory/bookkeeping_unittest.cc",
-    "src/profiling/memory/bounded_queue_unittest.cc",
     "src/profiling/memory/client.cc",
     "src/profiling/memory/client_unittest.cc",
-    "src/profiling/memory/heapprofd_integrationtest.cc",
     "src/profiling/memory/heapprofd_producer.cc",
     "src/profiling/memory/interner_unittest.cc",
     "src/profiling/memory/proc_utils.cc",
     "src/profiling/memory/proc_utils_unittest.cc",
-    "src/profiling/memory/process_matcher.cc",
-    "src/profiling/memory/process_matcher_unittest.cc",
     "src/profiling/memory/record_reader.cc",
     "src/profiling/memory/record_reader_unittest.cc",
     "src/profiling/memory/sampler_unittest.cc",
     "src/profiling/memory/scoped_spinlock.cc",
     "src/profiling/memory/shared_ring_buffer.cc",
     "src/profiling/memory/shared_ring_buffer_unittest.cc",
-    "src/profiling/memory/socket_listener.cc",
-    "src/profiling/memory/socket_listener_unittest.cc",
     "src/profiling/memory/system_property.cc",
     "src/profiling/memory/system_property_unittest.cc",
     "src/profiling/memory/unwinding.cc",