tracing: Move tracing_service_impl from core/ to service/ directory

No functional change. `core/` is for code that's used mostly on the
client. `service/` is for code that's used exclusively on the service.

Change-Id: I1e8d6c37011f4f120aaeac29ffa5c1584f05b5ef
diff --git a/Android.bp b/Android.bp
index df72d73..084cb61 100644
--- a/Android.bp
+++ b/Android.bp
@@ -604,13 +604,13 @@
         ":perfetto_src_traced_service_service",
         ":perfetto_src_tracing_common",
         ":perfetto_src_tracing_core_core",
-        ":perfetto_src_tracing_core_service",
-        ":perfetto_src_tracing_core_zlib_compressor",
         ":perfetto_src_tracing_ipc_common",
         ":perfetto_src_tracing_ipc_consumer_consumer",
         ":perfetto_src_tracing_ipc_default_socket",
         ":perfetto_src_tracing_ipc_producer_producer",
         ":perfetto_src_tracing_ipc_service_service",
+        ":perfetto_src_tracing_service_service",
+        ":perfetto_src_tracing_service_zlib_compressor",
     ],
     host_supported: true,
     export_include_dirs: [
@@ -828,7 +828,6 @@
         ":perfetto_src_tracing_client_api_without_backends",
         ":perfetto_src_tracing_common",
         ":perfetto_src_tracing_core_core",
-        ":perfetto_src_tracing_core_service",
         ":perfetto_src_tracing_in_process_backend",
         ":perfetto_src_tracing_ipc_common",
         ":perfetto_src_tracing_ipc_consumer_consumer",
@@ -836,6 +835,7 @@
         ":perfetto_src_tracing_ipc_producer_producer",
         ":perfetto_src_tracing_ipc_service_service",
         ":perfetto_src_tracing_platform_impl",
+        ":perfetto_src_tracing_service_service",
         ":perfetto_src_tracing_system_backend",
     ],
     host_supported: true,
@@ -997,7 +997,6 @@
         ":perfetto_src_tracing_client_api_without_backends",
         ":perfetto_src_tracing_common",
         ":perfetto_src_tracing_core_core",
-        ":perfetto_src_tracing_core_service",
         ":perfetto_src_tracing_in_process_backend",
         ":perfetto_src_tracing_ipc_common",
         ":perfetto_src_tracing_ipc_consumer_consumer",
@@ -1005,6 +1004,7 @@
         ":perfetto_src_tracing_ipc_producer_producer",
         ":perfetto_src_tracing_ipc_service_service",
         ":perfetto_src_tracing_platform_impl",
+        ":perfetto_src_tracing_service_service",
         ":perfetto_src_tracing_system_backend",
     ],
     shared_libs: [
@@ -1287,12 +1287,12 @@
         ":perfetto_src_traced_probes_system_info_system_info",
         ":perfetto_src_tracing_common",
         ":perfetto_src_tracing_core_core",
-        ":perfetto_src_tracing_core_service",
         ":perfetto_src_tracing_ipc_common",
         ":perfetto_src_tracing_ipc_consumer_consumer",
         ":perfetto_src_tracing_ipc_default_socket",
         ":perfetto_src_tracing_ipc_producer_producer",
         ":perfetto_src_tracing_ipc_service_service",
+        ":perfetto_src_tracing_service_service",
         ":perfetto_test_test_helper",
         "test/cts/device_feature_test_cts.cc",
         "test/cts/heapprofd_java_test_cts.cc",
@@ -1584,12 +1584,12 @@
         ":perfetto_src_traced_probes_system_info_system_info",
         ":perfetto_src_tracing_common",
         ":perfetto_src_tracing_core_core",
-        ":perfetto_src_tracing_core_service",
         ":perfetto_src_tracing_ipc_common",
         ":perfetto_src_tracing_ipc_consumer_consumer",
         ":perfetto_src_tracing_ipc_default_socket",
         ":perfetto_src_tracing_ipc_producer_producer",
         ":perfetto_src_tracing_ipc_service_service",
+        ":perfetto_src_tracing_service_service",
         ":perfetto_test_test_helper",
     ],
     static_libs: [
@@ -2211,7 +2211,6 @@
         ":perfetto_src_tracing_client_api_without_backends",
         ":perfetto_src_tracing_common",
         ":perfetto_src_tracing_core_core",
-        ":perfetto_src_tracing_core_service",
         ":perfetto_src_tracing_core_test_support",
         ":perfetto_src_tracing_in_process_backend",
         ":perfetto_src_tracing_integrationtests",
@@ -2221,6 +2220,7 @@
         ":perfetto_src_tracing_ipc_producer_producer",
         ":perfetto_src_tracing_ipc_service_service",
         ":perfetto_src_tracing_platform_impl",
+        ":perfetto_src_tracing_service_service",
         ":perfetto_src_tracing_system_backend",
         ":perfetto_src_tracing_test_api_test_support",
         ":perfetto_src_tracing_test_client_api_integrationtests",
@@ -12786,17 +12786,6 @@
     ],
 }
 
-// GN: //src/tracing/core:service
-filegroup {
-    name: "perfetto_src_tracing_core_service",
-    srcs: [
-        "src/tracing/core/metatrace_writer.cc",
-        "src/tracing/core/packet_stream_validator.cc",
-        "src/tracing/core/trace_buffer.cc",
-        "src/tracing/core/tracing_service_impl.cc",
-    ],
-}
-
 // GN: //src/tracing/core:test_support
 filegroup {
     name: "perfetto_src_tracing_core_test_support",
@@ -12809,26 +12798,13 @@
 filegroup {
     name: "perfetto_src_tracing_core_unittests",
     srcs: [
-        "src/tracing/core/histogram_unittest.cc",
         "src/tracing/core/id_allocator_unittest.cc",
         "src/tracing/core/null_trace_writer_unittest.cc",
-        "src/tracing/core/packet_stream_validator_unittest.cc",
         "src/tracing/core/patch_list_unittest.cc",
         "src/tracing/core/shared_memory_abi_unittest.cc",
         "src/tracing/core/shared_memory_arbiter_impl_unittest.cc",
-        "src/tracing/core/trace_buffer_unittest.cc",
         "src/tracing/core/trace_packet_unittest.cc",
         "src/tracing/core/trace_writer_impl_unittest.cc",
-        "src/tracing/core/tracing_service_impl_unittest.cc",
-        "src/tracing/core/zlib_compressor_unittest.cc",
-    ],
-}
-
-// GN: //src/tracing/core:zlib_compressor
-filegroup {
-    name: "perfetto_src_tracing_core_zlib_compressor",
-    srcs: [
-        "src/tracing/core/zlib_compressor.cc",
     ],
 }
 
@@ -12909,6 +12885,37 @@
     ],
 }
 
+// GN: //src/tracing/service:service
+filegroup {
+    name: "perfetto_src_tracing_service_service",
+    srcs: [
+        "src/tracing/service/metatrace_writer.cc",
+        "src/tracing/service/packet_stream_validator.cc",
+        "src/tracing/service/trace_buffer.cc",
+        "src/tracing/service/tracing_service_impl.cc",
+    ],
+}
+
+// GN: //src/tracing/service:unittests
+filegroup {
+    name: "perfetto_src_tracing_service_unittests",
+    srcs: [
+        "src/tracing/service/histogram_unittest.cc",
+        "src/tracing/service/packet_stream_validator_unittest.cc",
+        "src/tracing/service/trace_buffer_unittest.cc",
+        "src/tracing/service/tracing_service_impl_unittest.cc",
+        "src/tracing/service/zlib_compressor_unittest.cc",
+    ],
+}
+
+// GN: //src/tracing/service:zlib_compressor
+filegroup {
+    name: "perfetto_src_tracing_service_zlib_compressor",
+    srcs: [
+        "src/tracing/service/zlib_compressor.cc",
+    ],
+}
+
 // GN: //src/tracing:system_backend
 filegroup {
     name: "perfetto_src_tracing_system_backend",
@@ -13673,10 +13680,8 @@
         ":perfetto_src_tracing_client_api_without_backends",
         ":perfetto_src_tracing_common",
         ":perfetto_src_tracing_core_core",
-        ":perfetto_src_tracing_core_service",
         ":perfetto_src_tracing_core_test_support",
         ":perfetto_src_tracing_core_unittests",
-        ":perfetto_src_tracing_core_zlib_compressor",
         ":perfetto_src_tracing_ipc_common",
         ":perfetto_src_tracing_ipc_consumer_consumer",
         ":perfetto_src_tracing_ipc_default_socket",
@@ -13684,6 +13689,9 @@
         ":perfetto_src_tracing_ipc_service_service",
         ":perfetto_src_tracing_ipc_unittests",
         ":perfetto_src_tracing_platform_impl",
+        ":perfetto_src_tracing_service_service",
+        ":perfetto_src_tracing_service_unittests",
+        ":perfetto_src_tracing_service_zlib_compressor",
         ":perfetto_src_tracing_test_test_support",
         ":perfetto_src_tracing_unittests",
         ":perfetto_test_sanitizers_unittests",
@@ -13999,12 +14007,12 @@
         ":perfetto_src_traced_probes_system_info_system_info",
         ":perfetto_src_tracing_common",
         ":perfetto_src_tracing_core_core",
-        ":perfetto_src_tracing_core_service",
         ":perfetto_src_tracing_ipc_common",
         ":perfetto_src_tracing_ipc_consumer_consumer",
         ":perfetto_src_tracing_ipc_default_socket",
         ":perfetto_src_tracing_ipc_producer_producer",
         ":perfetto_src_tracing_ipc_service_service",
+        ":perfetto_src_tracing_service_service",
         ":perfetto_test_test_helper",
     ],
     static_libs: [
@@ -14752,10 +14760,10 @@
         ":perfetto_src_traced_probes_packages_list_packages_list_parser",
         ":perfetto_src_tracing_common",
         ":perfetto_src_tracing_core_core",
-        ":perfetto_src_tracing_core_service",
         ":perfetto_src_tracing_ipc_common",
         ":perfetto_src_tracing_ipc_default_socket",
         ":perfetto_src_tracing_ipc_producer_producer",
+        ":perfetto_src_tracing_service_service",
         "src/profiling/perf/main.cc",
     ],
     shared_libs: [