tp: move android camera to full target and push down importer srcs

Change-Id: I34b9bb86c69b4fbb61754a2804bccd51d1d3084a
diff --git a/Android.bp b/Android.bp
index 1aad826..771b599 100644
--- a/Android.bp
+++ b/Android.bp
@@ -1968,14 +1968,15 @@
         ":perfetto_src_trace_processor_db_db",
         ":perfetto_src_trace_processor_dynamic_dynamic",
         ":perfetto_src_trace_processor_export_json",
-        ":perfetto_src_trace_processor_ftrace_descriptors",
         ":perfetto_src_trace_processor_importers_android_bugreport_android_bugreport",
         ":perfetto_src_trace_processor_importers_common_common",
         ":perfetto_src_trace_processor_importers_common_parser_types",
         ":perfetto_src_trace_processor_importers_common_trace_parser_hdr",
+        ":perfetto_src_trace_processor_importers_ftrace_descriptors",
         ":perfetto_src_trace_processor_importers_fuchsia_fuchsia_record",
-        ":perfetto_src_trace_processor_importers_importers_full",
+        ":perfetto_src_trace_processor_importers_full",
         ":perfetto_src_trace_processor_importers_memory_tracker_graph_processor",
+        ":perfetto_src_trace_processor_importers_minimal",
         ":perfetto_src_trace_processor_importers_ninja_ninja",
         ":perfetto_src_trace_processor_importers_proto_full",
         ":perfetto_src_trace_processor_importers_proto_minimal",
@@ -9104,14 +9105,6 @@
     ],
 }
 
-// GN: //src/trace_processor:ftrace_descriptors
-filegroup {
-    name: "perfetto_src_trace_processor_ftrace_descriptors",
-    srcs: [
-        "src/trace_processor/importers/ftrace/ftrace_descriptors.cc",
-    ],
-}
-
 // GN: //src/trace_processor:gen_cc_test_messages_descriptor
 genrule {
     name: "perfetto_src_trace_processor_gen_cc_test_messages_descriptor",
@@ -9189,6 +9182,14 @@
     ],
 }
 
+// GN: //src/trace_processor/importers:ftrace_descriptors
+filegroup {
+    name: "perfetto_src_trace_processor_importers_ftrace_descriptors",
+    srcs: [
+        "src/trace_processor/importers/ftrace/ftrace_descriptors.cc",
+    ],
+}
+
 // GN: //src/trace_processor/importers/fuchsia:fuchsia_record
 filegroup {
     name: "perfetto_src_trace_processor_importers_fuchsia_fuchsia_record",
@@ -9197,6 +9198,51 @@
     ],
 }
 
+// GN: //src/trace_processor/importers:full
+filegroup {
+    name: "perfetto_src_trace_processor_importers_full",
+    srcs: [
+        "src/trace_processor/importers/additional_modules.cc",
+        "src/trace_processor/importers/ftrace/binder_tracker.cc",
+        "src/trace_processor/importers/ftrace/drm_tracker.cc",
+        "src/trace_processor/importers/ftrace/ftrace_module_impl.cc",
+        "src/trace_processor/importers/ftrace/ftrace_parser.cc",
+        "src/trace_processor/importers/ftrace/ftrace_tokenizer.cc",
+        "src/trace_processor/importers/ftrace/iostat_tracker.cc",
+        "src/trace_processor/importers/ftrace/rss_stat_tracker.cc",
+        "src/trace_processor/importers/ftrace/sched_event_tracker.cc",
+        "src/trace_processor/importers/ftrace/thread_state_tracker.cc",
+        "src/trace_processor/importers/ftrace/v4l2_tracker.cc",
+        "src/trace_processor/importers/ftrace/virtio_video_tracker.cc",
+        "src/trace_processor/importers/fuchsia/fuchsia_trace_parser.cc",
+        "src/trace_processor/importers/fuchsia/fuchsia_trace_tokenizer.cc",
+        "src/trace_processor/importers/fuchsia/fuchsia_trace_utils.cc",
+        "src/trace_processor/importers/gzip/gzip_trace_parser.cc",
+        "src/trace_processor/importers/i2c/i2c_tracker.cc",
+        "src/trace_processor/importers/json/json_trace_parser.cc",
+        "src/trace_processor/importers/json/json_trace_tokenizer.cc",
+        "src/trace_processor/importers/proto/android_camera_event_module.cc",
+        "src/trace_processor/importers/proto/android_probes_module.cc",
+        "src/trace_processor/importers/proto/android_probes_parser.cc",
+        "src/trace_processor/importers/proto/android_probes_tracker.cc",
+        "src/trace_processor/importers/proto/content_analyzer.cc",
+        "src/trace_processor/importers/proto/frame_timeline_event_parser.cc",
+        "src/trace_processor/importers/proto/gpu_event_parser.cc",
+        "src/trace_processor/importers/proto/graphics_event_module.cc",
+        "src/trace_processor/importers/proto/graphics_frame_event_parser.cc",
+        "src/trace_processor/importers/proto/heap_graph_module.cc",
+        "src/trace_processor/importers/proto/system_probes_module.cc",
+        "src/trace_processor/importers/proto/system_probes_parser.cc",
+        "src/trace_processor/importers/proto/translation_table_module.cc",
+        "src/trace_processor/importers/proto/vulkan_memory_tracker.cc",
+        "src/trace_processor/importers/syscalls/syscall_tracker.cc",
+        "src/trace_processor/importers/systrace/systrace_line_parser.cc",
+        "src/trace_processor/importers/systrace/systrace_line_tokenizer.cc",
+        "src/trace_processor/importers/systrace/systrace_parser.cc",
+        "src/trace_processor/importers/systrace/systrace_trace_parser.cc",
+    ],
+}
+
 // GN: //src/trace_processor/importers:gen_cc_chrome_track_event_descriptor
 genrule {
     name: "perfetto_src_trace_processor_importers_gen_cc_chrome_track_event_descriptor",
@@ -9257,49 +9303,6 @@
     ],
 }
 
-// GN: //src/trace_processor/importers:importers_full
-filegroup {
-    name: "perfetto_src_trace_processor_importers_importers_full",
-    srcs: [
-        "src/trace_processor/importers/additional_modules.cc",
-        "src/trace_processor/importers/ftrace/binder_tracker.cc",
-        "src/trace_processor/importers/ftrace/drm_tracker.cc",
-        "src/trace_processor/importers/ftrace/ftrace_module_impl.cc",
-        "src/trace_processor/importers/ftrace/ftrace_parser.cc",
-        "src/trace_processor/importers/ftrace/ftrace_tokenizer.cc",
-        "src/trace_processor/importers/ftrace/iostat_tracker.cc",
-        "src/trace_processor/importers/ftrace/rss_stat_tracker.cc",
-        "src/trace_processor/importers/ftrace/sched_event_tracker.cc",
-        "src/trace_processor/importers/ftrace/thread_state_tracker.cc",
-        "src/trace_processor/importers/ftrace/v4l2_tracker.cc",
-        "src/trace_processor/importers/ftrace/virtio_video_tracker.cc",
-        "src/trace_processor/importers/fuchsia/fuchsia_trace_parser.cc",
-        "src/trace_processor/importers/fuchsia/fuchsia_trace_tokenizer.cc",
-        "src/trace_processor/importers/fuchsia/fuchsia_trace_utils.cc",
-        "src/trace_processor/importers/gzip/gzip_trace_parser.cc",
-        "src/trace_processor/importers/i2c/i2c_tracker.cc",
-        "src/trace_processor/importers/json/json_trace_parser.cc",
-        "src/trace_processor/importers/json/json_trace_tokenizer.cc",
-        "src/trace_processor/importers/proto/android_probes_module.cc",
-        "src/trace_processor/importers/proto/android_probes_parser.cc",
-        "src/trace_processor/importers/proto/android_probes_tracker.cc",
-        "src/trace_processor/importers/proto/content_analyzer.cc",
-        "src/trace_processor/importers/proto/frame_timeline_event_parser.cc",
-        "src/trace_processor/importers/proto/gpu_event_parser.cc",
-        "src/trace_processor/importers/proto/graphics_event_module.cc",
-        "src/trace_processor/importers/proto/graphics_frame_event_parser.cc",
-        "src/trace_processor/importers/proto/heap_graph_module.cc",
-        "src/trace_processor/importers/proto/system_probes_module.cc",
-        "src/trace_processor/importers/proto/system_probes_parser.cc",
-        "src/trace_processor/importers/proto/vulkan_memory_tracker.cc",
-        "src/trace_processor/importers/syscalls/syscall_tracker.cc",
-        "src/trace_processor/importers/systrace/systrace_line_parser.cc",
-        "src/trace_processor/importers/systrace/systrace_line_tokenizer.cc",
-        "src/trace_processor/importers/systrace/systrace_parser.cc",
-        "src/trace_processor/importers/systrace/systrace_trace_parser.cc",
-    ],
-}
-
 // GN: //src/trace_processor/importers/memory_tracker:graph_processor
 filegroup {
     name: "perfetto_src_trace_processor_importers_memory_tracker_graph_processor",
@@ -9312,6 +9315,32 @@
     ],
 }
 
+// GN: //src/trace_processor/importers:minimal
+filegroup {
+    name: "perfetto_src_trace_processor_importers_minimal",
+    srcs: [
+        "src/trace_processor/importers/default_modules.cc",
+        "src/trace_processor/importers/ftrace/ftrace_module.cc",
+        "src/trace_processor/importers/json/json_utils.cc",
+        "src/trace_processor/importers/proto/chrome_system_probes_module.cc",
+        "src/trace_processor/importers/proto/chrome_system_probes_parser.cc",
+        "src/trace_processor/importers/proto/memory_tracker_snapshot_module.cc",
+        "src/trace_processor/importers/proto/memory_tracker_snapshot_parser.cc",
+        "src/trace_processor/importers/proto/metadata_module.cc",
+        "src/trace_processor/importers/proto/metadata_tracker.cc",
+        "src/trace_processor/importers/proto/perf_sample_tracker.cc",
+        "src/trace_processor/importers/proto/profile_module.cc",
+        "src/trace_processor/importers/proto/profile_packet_utils.cc",
+        "src/trace_processor/importers/proto/proto_trace_parser.cc",
+        "src/trace_processor/importers/proto/proto_trace_reader.cc",
+        "src/trace_processor/importers/proto/proto_trace_tokenizer.cc",
+        "src/trace_processor/importers/proto/track_event_module.cc",
+        "src/trace_processor/importers/proto/track_event_parser.cc",
+        "src/trace_processor/importers/proto/track_event_tokenizer.cc",
+        "src/trace_processor/importers/proto/track_event_tracker.cc",
+    ],
+}
+
 // GN: //src/trace_processor/importers/ninja:ninja
 filegroup {
     name: "perfetto_src_trace_processor_importers_ninja_ninja",
@@ -9379,6 +9408,26 @@
     name: "perfetto_src_trace_processor_importers_systrace_systrace_line",
 }
 
+// GN: //src/trace_processor/importers:unittests
+filegroup {
+    name: "perfetto_src_trace_processor_importers_unittests",
+    srcs: [
+        "src/trace_processor/importers/ftrace/binder_tracker_unittest.cc",
+        "src/trace_processor/importers/ftrace/sched_event_tracker_unittest.cc",
+        "src/trace_processor/importers/ftrace/thread_state_tracker_unittest.cc",
+        "src/trace_processor/importers/fuchsia/fuchsia_parser_unittest.cc",
+        "src/trace_processor/importers/fuchsia/fuchsia_trace_utils_unittest.cc",
+        "src/trace_processor/importers/memory_tracker/graph_processor_unittest.cc",
+        "src/trace_processor/importers/memory_tracker/graph_unittest.cc",
+        "src/trace_processor/importers/memory_tracker/raw_process_memory_node_unittest.cc",
+        "src/trace_processor/importers/proto/async_track_set_tracker_unittest.cc",
+        "src/trace_processor/importers/proto/perf_sample_tracker_unittest.cc",
+        "src/trace_processor/importers/proto/proto_trace_parser_unittest.cc",
+        "src/trace_processor/importers/syscalls/syscall_tracker_unittest.cc",
+        "src/trace_processor/importers/systrace/systrace_parser_unittest.cc",
+    ],
+}
+
 // GN: //src/trace_processor:lib
 filegroup {
     name: "perfetto_src_trace_processor_lib",
@@ -9736,27 +9785,6 @@
     name: "perfetto_src_trace_processor_storage_minimal",
     srcs: [
         "src/trace_processor/forwarding_trace_parser.cc",
-        "src/trace_processor/importers/default_modules.cc",
-        "src/trace_processor/importers/ftrace/ftrace_module.cc",
-        "src/trace_processor/importers/json/json_utils.cc",
-        "src/trace_processor/importers/proto/android_camera_event_module.cc",
-        "src/trace_processor/importers/proto/chrome_system_probes_module.cc",
-        "src/trace_processor/importers/proto/chrome_system_probes_parser.cc",
-        "src/trace_processor/importers/proto/memory_tracker_snapshot_module.cc",
-        "src/trace_processor/importers/proto/memory_tracker_snapshot_parser.cc",
-        "src/trace_processor/importers/proto/metadata_module.cc",
-        "src/trace_processor/importers/proto/metadata_tracker.cc",
-        "src/trace_processor/importers/proto/perf_sample_tracker.cc",
-        "src/trace_processor/importers/proto/profile_module.cc",
-        "src/trace_processor/importers/proto/profile_packet_utils.cc",
-        "src/trace_processor/importers/proto/proto_trace_parser.cc",
-        "src/trace_processor/importers/proto/proto_trace_reader.cc",
-        "src/trace_processor/importers/proto/proto_trace_tokenizer.cc",
-        "src/trace_processor/importers/proto/track_event_module.cc",
-        "src/trace_processor/importers/proto/track_event_parser.cc",
-        "src/trace_processor/importers/proto/track_event_tokenizer.cc",
-        "src/trace_processor/importers/proto/track_event_tracker.cc",
-        "src/trace_processor/importers/proto/translation_table_module.cc",
         "src/trace_processor/trace_blob.cc",
         "src/trace_processor/trace_processor_context.cc",
         "src/trace_processor/trace_processor_storage.cc",
@@ -9789,6 +9817,15 @@
     ],
 }
 
+// GN: //src/trace_processor:top_level_unittests
+filegroup {
+    name: "perfetto_src_trace_processor_top_level_unittests",
+    srcs: [
+        "src/trace_processor/forwarding_trace_parser_unittest.cc",
+        "src/trace_processor/ref_counted_unittest.cc",
+    ],
+}
+
 // GN: //src/trace_processor/types:types
 filegroup {
     name: "perfetto_src_trace_processor_types_types",
@@ -9811,23 +9848,6 @@
 // GN: //src/trace_processor:unittests
 filegroup {
     name: "perfetto_src_trace_processor_unittests",
-    srcs: [
-        "src/trace_processor/forwarding_trace_parser_unittest.cc",
-        "src/trace_processor/importers/ftrace/binder_tracker_unittest.cc",
-        "src/trace_processor/importers/ftrace/sched_event_tracker_unittest.cc",
-        "src/trace_processor/importers/ftrace/thread_state_tracker_unittest.cc",
-        "src/trace_processor/importers/fuchsia/fuchsia_parser_unittest.cc",
-        "src/trace_processor/importers/fuchsia/fuchsia_trace_utils_unittest.cc",
-        "src/trace_processor/importers/memory_tracker/graph_processor_unittest.cc",
-        "src/trace_processor/importers/memory_tracker/graph_unittest.cc",
-        "src/trace_processor/importers/memory_tracker/raw_process_memory_node_unittest.cc",
-        "src/trace_processor/importers/proto/async_track_set_tracker_unittest.cc",
-        "src/trace_processor/importers/proto/perf_sample_tracker_unittest.cc",
-        "src/trace_processor/importers/proto/proto_trace_parser_unittest.cc",
-        "src/trace_processor/importers/syscalls/syscall_tracker_unittest.cc",
-        "src/trace_processor/importers/systrace/systrace_parser_unittest.cc",
-        "src/trace_processor/ref_counted_unittest.cc",
-    ],
 }
 
 // GN: //src/trace_processor/util:descriptors
@@ -11231,22 +11251,24 @@
         ":perfetto_src_trace_processor_dynamic_dynamic",
         ":perfetto_src_trace_processor_dynamic_unittests",
         ":perfetto_src_trace_processor_export_json",
-        ":perfetto_src_trace_processor_ftrace_descriptors",
         ":perfetto_src_trace_processor_importers_android_bugreport_android_bugreport",
         ":perfetto_src_trace_processor_importers_android_bugreport_unittests",
         ":perfetto_src_trace_processor_importers_common_common",
         ":perfetto_src_trace_processor_importers_common_parser_types",
         ":perfetto_src_trace_processor_importers_common_trace_parser_hdr",
         ":perfetto_src_trace_processor_importers_common_unittests",
+        ":perfetto_src_trace_processor_importers_ftrace_descriptors",
         ":perfetto_src_trace_processor_importers_fuchsia_fuchsia_record",
-        ":perfetto_src_trace_processor_importers_importers_full",
+        ":perfetto_src_trace_processor_importers_full",
         ":perfetto_src_trace_processor_importers_memory_tracker_graph_processor",
+        ":perfetto_src_trace_processor_importers_minimal",
         ":perfetto_src_trace_processor_importers_ninja_ninja",
         ":perfetto_src_trace_processor_importers_proto_full",
         ":perfetto_src_trace_processor_importers_proto_minimal",
         ":perfetto_src_trace_processor_importers_proto_packet_sequence_state_generation_hdr",
         ":perfetto_src_trace_processor_importers_proto_unittests",
         ":perfetto_src_trace_processor_importers_systrace_systrace_line",
+        ":perfetto_src_trace_processor_importers_unittests",
         ":perfetto_src_trace_processor_lib",
         ":perfetto_src_trace_processor_metatrace",
         ":perfetto_src_trace_processor_metrics_metrics",
@@ -11264,6 +11286,7 @@
         ":perfetto_src_trace_processor_storage_storage",
         ":perfetto_src_trace_processor_tables_tables",
         ":perfetto_src_trace_processor_tables_unittests",
+        ":perfetto_src_trace_processor_top_level_unittests",
         ":perfetto_src_trace_processor_types_types",
         ":perfetto_src_trace_processor_types_unittests",
         ":perfetto_src_trace_processor_unittests",
@@ -11881,14 +11904,15 @@
         ":perfetto_src_trace_processor_db_db",
         ":perfetto_src_trace_processor_dynamic_dynamic",
         ":perfetto_src_trace_processor_export_json",
-        ":perfetto_src_trace_processor_ftrace_descriptors",
         ":perfetto_src_trace_processor_importers_android_bugreport_android_bugreport",
         ":perfetto_src_trace_processor_importers_common_common",
         ":perfetto_src_trace_processor_importers_common_parser_types",
         ":perfetto_src_trace_processor_importers_common_trace_parser_hdr",
+        ":perfetto_src_trace_processor_importers_ftrace_descriptors",
         ":perfetto_src_trace_processor_importers_fuchsia_fuchsia_record",
-        ":perfetto_src_trace_processor_importers_importers_full",
+        ":perfetto_src_trace_processor_importers_full",
         ":perfetto_src_trace_processor_importers_memory_tracker_graph_processor",
+        ":perfetto_src_trace_processor_importers_minimal",
         ":perfetto_src_trace_processor_importers_ninja_ninja",
         ":perfetto_src_trace_processor_importers_proto_full",
         ":perfetto_src_trace_processor_importers_proto_minimal",
@@ -12080,14 +12104,15 @@
         ":perfetto_src_trace_processor_db_db",
         ":perfetto_src_trace_processor_dynamic_dynamic",
         ":perfetto_src_trace_processor_export_json",
-        ":perfetto_src_trace_processor_ftrace_descriptors",
         ":perfetto_src_trace_processor_importers_android_bugreport_android_bugreport",
         ":perfetto_src_trace_processor_importers_common_common",
         ":perfetto_src_trace_processor_importers_common_parser_types",
         ":perfetto_src_trace_processor_importers_common_trace_parser_hdr",
+        ":perfetto_src_trace_processor_importers_ftrace_descriptors",
         ":perfetto_src_trace_processor_importers_fuchsia_fuchsia_record",
-        ":perfetto_src_trace_processor_importers_importers_full",
+        ":perfetto_src_trace_processor_importers_full",
         ":perfetto_src_trace_processor_importers_memory_tracker_graph_processor",
+        ":perfetto_src_trace_processor_importers_minimal",
         ":perfetto_src_trace_processor_importers_ninja_ninja",
         ":perfetto_src_trace_processor_importers_proto_full",
         ":perfetto_src_trace_processor_importers_proto_minimal",
diff --git a/BUILD b/BUILD
index 943df9d..b44ab50 100644
--- a/BUILD
+++ b/BUILD
@@ -1230,6 +1230,97 @@
     ],
 )
 
+# GN target: //src/trace_processor/importers:ftrace_descriptors
+perfetto_filegroup(
+    name = "src_trace_processor_importers_ftrace_descriptors",
+    srcs = [
+        "src/trace_processor/importers/ftrace/ftrace_descriptors.cc",
+        "src/trace_processor/importers/ftrace/ftrace_descriptors.h",
+    ],
+)
+
+# GN target: //src/trace_processor/importers:full
+perfetto_filegroup(
+    name = "src_trace_processor_importers_full",
+    srcs = [
+        "src/trace_processor/importers/additional_modules.cc",
+        "src/trace_processor/importers/additional_modules.h",
+        "src/trace_processor/importers/ftrace/binder_tracker.cc",
+        "src/trace_processor/importers/ftrace/binder_tracker.h",
+        "src/trace_processor/importers/ftrace/drm_tracker.cc",
+        "src/trace_processor/importers/ftrace/drm_tracker.h",
+        "src/trace_processor/importers/ftrace/ftrace_module_impl.cc",
+        "src/trace_processor/importers/ftrace/ftrace_module_impl.h",
+        "src/trace_processor/importers/ftrace/ftrace_parser.cc",
+        "src/trace_processor/importers/ftrace/ftrace_parser.h",
+        "src/trace_processor/importers/ftrace/ftrace_tokenizer.cc",
+        "src/trace_processor/importers/ftrace/ftrace_tokenizer.h",
+        "src/trace_processor/importers/ftrace/iostat_tracker.cc",
+        "src/trace_processor/importers/ftrace/iostat_tracker.h",
+        "src/trace_processor/importers/ftrace/rss_stat_tracker.cc",
+        "src/trace_processor/importers/ftrace/rss_stat_tracker.h",
+        "src/trace_processor/importers/ftrace/sched_event_tracker.cc",
+        "src/trace_processor/importers/ftrace/sched_event_tracker.h",
+        "src/trace_processor/importers/ftrace/thread_state_tracker.cc",
+        "src/trace_processor/importers/ftrace/thread_state_tracker.h",
+        "src/trace_processor/importers/ftrace/v4l2_tracker.cc",
+        "src/trace_processor/importers/ftrace/v4l2_tracker.h",
+        "src/trace_processor/importers/ftrace/virtio_video_tracker.cc",
+        "src/trace_processor/importers/ftrace/virtio_video_tracker.h",
+        "src/trace_processor/importers/fuchsia/fuchsia_trace_parser.cc",
+        "src/trace_processor/importers/fuchsia/fuchsia_trace_parser.h",
+        "src/trace_processor/importers/fuchsia/fuchsia_trace_tokenizer.cc",
+        "src/trace_processor/importers/fuchsia/fuchsia_trace_tokenizer.h",
+        "src/trace_processor/importers/fuchsia/fuchsia_trace_utils.cc",
+        "src/trace_processor/importers/gzip/gzip_trace_parser.cc",
+        "src/trace_processor/importers/gzip/gzip_trace_parser.h",
+        "src/trace_processor/importers/i2c/i2c_tracker.cc",
+        "src/trace_processor/importers/i2c/i2c_tracker.h",
+        "src/trace_processor/importers/json/json_trace_parser.cc",
+        "src/trace_processor/importers/json/json_trace_parser.h",
+        "src/trace_processor/importers/json/json_trace_tokenizer.cc",
+        "src/trace_processor/importers/json/json_trace_tokenizer.h",
+        "src/trace_processor/importers/proto/android_camera_event_module.cc",
+        "src/trace_processor/importers/proto/android_camera_event_module.h",
+        "src/trace_processor/importers/proto/android_probes_module.cc",
+        "src/trace_processor/importers/proto/android_probes_module.h",
+        "src/trace_processor/importers/proto/android_probes_parser.cc",
+        "src/trace_processor/importers/proto/android_probes_parser.h",
+        "src/trace_processor/importers/proto/android_probes_tracker.cc",
+        "src/trace_processor/importers/proto/android_probes_tracker.h",
+        "src/trace_processor/importers/proto/content_analyzer.cc",
+        "src/trace_processor/importers/proto/content_analyzer.h",
+        "src/trace_processor/importers/proto/frame_timeline_event_parser.cc",
+        "src/trace_processor/importers/proto/frame_timeline_event_parser.h",
+        "src/trace_processor/importers/proto/gpu_event_parser.cc",
+        "src/trace_processor/importers/proto/gpu_event_parser.h",
+        "src/trace_processor/importers/proto/graphics_event_module.cc",
+        "src/trace_processor/importers/proto/graphics_event_module.h",
+        "src/trace_processor/importers/proto/graphics_frame_event_parser.cc",
+        "src/trace_processor/importers/proto/graphics_frame_event_parser.h",
+        "src/trace_processor/importers/proto/heap_graph_module.cc",
+        "src/trace_processor/importers/proto/heap_graph_module.h",
+        "src/trace_processor/importers/proto/system_probes_module.cc",
+        "src/trace_processor/importers/proto/system_probes_module.h",
+        "src/trace_processor/importers/proto/system_probes_parser.cc",
+        "src/trace_processor/importers/proto/system_probes_parser.h",
+        "src/trace_processor/importers/proto/translation_table_module.cc",
+        "src/trace_processor/importers/proto/translation_table_module.h",
+        "src/trace_processor/importers/proto/vulkan_memory_tracker.cc",
+        "src/trace_processor/importers/proto/vulkan_memory_tracker.h",
+        "src/trace_processor/importers/syscalls/syscall_tracker.cc",
+        "src/trace_processor/importers/syscalls/syscall_tracker.h",
+        "src/trace_processor/importers/systrace/systrace_line_parser.cc",
+        "src/trace_processor/importers/systrace/systrace_line_parser.h",
+        "src/trace_processor/importers/systrace/systrace_line_tokenizer.cc",
+        "src/trace_processor/importers/systrace/systrace_line_tokenizer.h",
+        "src/trace_processor/importers/systrace/systrace_parser.cc",
+        "src/trace_processor/importers/systrace/systrace_parser.h",
+        "src/trace_processor/importers/systrace/systrace_trace_parser.cc",
+        "src/trace_processor/importers/systrace/systrace_trace_parser.h",
+    ],
+)
+
 # GN target: //src/trace_processor/importers:gen_cc_chrome_track_event_descriptor
 perfetto_cc_proto_descriptor(
     name = "src_trace_processor_importers_gen_cc_chrome_track_event_descriptor",
@@ -1274,80 +1365,50 @@
     ],
 )
 
-# GN target: //src/trace_processor/importers:importers_full
+# GN target: //src/trace_processor/importers:minimal
 perfetto_filegroup(
-    name = "src_trace_processor_importers_importers_full",
+    name = "src_trace_processor_importers_minimal",
     srcs = [
-        "src/trace_processor/importers/additional_modules.cc",
-        "src/trace_processor/importers/additional_modules.h",
-        "src/trace_processor/importers/ftrace/binder_tracker.cc",
-        "src/trace_processor/importers/ftrace/binder_tracker.h",
-        "src/trace_processor/importers/ftrace/drm_tracker.cc",
-        "src/trace_processor/importers/ftrace/drm_tracker.h",
-        "src/trace_processor/importers/ftrace/ftrace_module_impl.cc",
-        "src/trace_processor/importers/ftrace/ftrace_module_impl.h",
-        "src/trace_processor/importers/ftrace/ftrace_parser.cc",
-        "src/trace_processor/importers/ftrace/ftrace_parser.h",
-        "src/trace_processor/importers/ftrace/ftrace_tokenizer.cc",
-        "src/trace_processor/importers/ftrace/ftrace_tokenizer.h",
-        "src/trace_processor/importers/ftrace/iostat_tracker.cc",
-        "src/trace_processor/importers/ftrace/iostat_tracker.h",
-        "src/trace_processor/importers/ftrace/rss_stat_tracker.cc",
-        "src/trace_processor/importers/ftrace/rss_stat_tracker.h",
-        "src/trace_processor/importers/ftrace/sched_event_tracker.cc",
-        "src/trace_processor/importers/ftrace/sched_event_tracker.h",
-        "src/trace_processor/importers/ftrace/thread_state_tracker.cc",
-        "src/trace_processor/importers/ftrace/thread_state_tracker.h",
-        "src/trace_processor/importers/ftrace/v4l2_tracker.cc",
-        "src/trace_processor/importers/ftrace/v4l2_tracker.h",
-        "src/trace_processor/importers/ftrace/virtio_video_tracker.cc",
-        "src/trace_processor/importers/ftrace/virtio_video_tracker.h",
-        "src/trace_processor/importers/fuchsia/fuchsia_trace_parser.cc",
-        "src/trace_processor/importers/fuchsia/fuchsia_trace_parser.h",
-        "src/trace_processor/importers/fuchsia/fuchsia_trace_tokenizer.cc",
-        "src/trace_processor/importers/fuchsia/fuchsia_trace_tokenizer.h",
-        "src/trace_processor/importers/fuchsia/fuchsia_trace_utils.cc",
-        "src/trace_processor/importers/gzip/gzip_trace_parser.cc",
-        "src/trace_processor/importers/gzip/gzip_trace_parser.h",
-        "src/trace_processor/importers/i2c/i2c_tracker.cc",
-        "src/trace_processor/importers/i2c/i2c_tracker.h",
-        "src/trace_processor/importers/json/json_trace_parser.cc",
-        "src/trace_processor/importers/json/json_trace_parser.h",
-        "src/trace_processor/importers/json/json_trace_tokenizer.cc",
-        "src/trace_processor/importers/json/json_trace_tokenizer.h",
-        "src/trace_processor/importers/proto/android_probes_module.cc",
-        "src/trace_processor/importers/proto/android_probes_module.h",
-        "src/trace_processor/importers/proto/android_probes_parser.cc",
-        "src/trace_processor/importers/proto/android_probes_parser.h",
-        "src/trace_processor/importers/proto/android_probes_tracker.cc",
-        "src/trace_processor/importers/proto/android_probes_tracker.h",
-        "src/trace_processor/importers/proto/content_analyzer.cc",
-        "src/trace_processor/importers/proto/content_analyzer.h",
-        "src/trace_processor/importers/proto/frame_timeline_event_parser.cc",
-        "src/trace_processor/importers/proto/frame_timeline_event_parser.h",
-        "src/trace_processor/importers/proto/gpu_event_parser.cc",
-        "src/trace_processor/importers/proto/gpu_event_parser.h",
-        "src/trace_processor/importers/proto/graphics_event_module.cc",
-        "src/trace_processor/importers/proto/graphics_event_module.h",
-        "src/trace_processor/importers/proto/graphics_frame_event_parser.cc",
-        "src/trace_processor/importers/proto/graphics_frame_event_parser.h",
-        "src/trace_processor/importers/proto/heap_graph_module.cc",
-        "src/trace_processor/importers/proto/heap_graph_module.h",
-        "src/trace_processor/importers/proto/system_probes_module.cc",
-        "src/trace_processor/importers/proto/system_probes_module.h",
-        "src/trace_processor/importers/proto/system_probes_parser.cc",
-        "src/trace_processor/importers/proto/system_probes_parser.h",
-        "src/trace_processor/importers/proto/vulkan_memory_tracker.cc",
-        "src/trace_processor/importers/proto/vulkan_memory_tracker.h",
-        "src/trace_processor/importers/syscalls/syscall_tracker.cc",
-        "src/trace_processor/importers/systrace/systrace_line_parser.cc",
-        "src/trace_processor/importers/systrace/systrace_line_parser.h",
-        "src/trace_processor/importers/systrace/systrace_line_tokenizer.cc",
-        "src/trace_processor/importers/systrace/systrace_line_tokenizer.h",
-        "src/trace_processor/importers/systrace/systrace_parser.cc",
-        "src/trace_processor/importers/systrace/systrace_parser.h",
-        "src/trace_processor/importers/systrace/systrace_trace_parser.cc",
-        "src/trace_processor/importers/systrace/systrace_trace_parser.h",
+        "src/trace_processor/importers/default_modules.cc",
+        "src/trace_processor/importers/default_modules.h",
+        "src/trace_processor/importers/ftrace/ftrace_module.cc",
+        "src/trace_processor/importers/ftrace/ftrace_module.h",
+        "src/trace_processor/importers/fuchsia/fuchsia_trace_utils.h",
+        "src/trace_processor/importers/json/json_utils.cc",
+        "src/trace_processor/importers/json/json_utils.h",
+        "src/trace_processor/importers/proto/chrome_system_probes_module.cc",
+        "src/trace_processor/importers/proto/chrome_system_probes_module.h",
+        "src/trace_processor/importers/proto/chrome_system_probes_parser.cc",
+        "src/trace_processor/importers/proto/chrome_system_probes_parser.h",
+        "src/trace_processor/importers/proto/memory_tracker_snapshot_module.cc",
+        "src/trace_processor/importers/proto/memory_tracker_snapshot_module.h",
+        "src/trace_processor/importers/proto/memory_tracker_snapshot_parser.cc",
+        "src/trace_processor/importers/proto/memory_tracker_snapshot_parser.h",
+        "src/trace_processor/importers/proto/metadata_module.cc",
+        "src/trace_processor/importers/proto/metadata_module.h",
+        "src/trace_processor/importers/proto/metadata_tracker.cc",
+        "src/trace_processor/importers/proto/metadata_tracker.h",
+        "src/trace_processor/importers/proto/perf_sample_tracker.cc",
+        "src/trace_processor/importers/proto/perf_sample_tracker.h",
+        "src/trace_processor/importers/proto/profile_module.cc",
+        "src/trace_processor/importers/proto/profile_module.h",
+        "src/trace_processor/importers/proto/profile_packet_utils.cc",
+        "src/trace_processor/importers/proto/profile_packet_utils.h",
+        "src/trace_processor/importers/proto/proto_incremental_state.h",
+        "src/trace_processor/importers/proto/proto_trace_parser.cc",
+        "src/trace_processor/importers/proto/proto_trace_parser.h",
+        "src/trace_processor/importers/proto/proto_trace_reader.cc",
+        "src/trace_processor/importers/proto/proto_trace_reader.h",
+        "src/trace_processor/importers/proto/proto_trace_tokenizer.cc",
+        "src/trace_processor/importers/proto/proto_trace_tokenizer.h",
+        "src/trace_processor/importers/proto/track_event_module.cc",
+        "src/trace_processor/importers/proto/track_event_module.h",
+        "src/trace_processor/importers/proto/track_event_parser.cc",
+        "src/trace_processor/importers/proto/track_event_parser.h",
+        "src/trace_processor/importers/proto/track_event_tokenizer.cc",
+        "src/trace_processor/importers/proto/track_event_tokenizer.h",
+        "src/trace_processor/importers/proto/track_event_tracker.cc",
+        "src/trace_processor/importers/proto/track_event_tracker.h",
     ],
 )
 
@@ -1926,15 +1987,6 @@
     ],
 )
 
-# GN target: //src/trace_processor:ftrace_descriptors
-perfetto_filegroup(
-    name = "src_trace_processor_ftrace_descriptors",
-    srcs = [
-        "src/trace_processor/importers/ftrace/ftrace_descriptors.cc",
-        "src/trace_processor/importers/ftrace/ftrace_descriptors.h",
-    ],
-)
-
 # GN target: //src/trace_processor:lib
 perfetto_filegroup(
     name = "src_trace_processor_lib",
@@ -1965,51 +2017,6 @@
     srcs = [
         "src/trace_processor/forwarding_trace_parser.cc",
         "src/trace_processor/forwarding_trace_parser.h",
-        "src/trace_processor/importers/default_modules.cc",
-        "src/trace_processor/importers/default_modules.h",
-        "src/trace_processor/importers/ftrace/ftrace_module.cc",
-        "src/trace_processor/importers/ftrace/ftrace_module.h",
-        "src/trace_processor/importers/fuchsia/fuchsia_trace_utils.h",
-        "src/trace_processor/importers/json/json_utils.cc",
-        "src/trace_processor/importers/json/json_utils.h",
-        "src/trace_processor/importers/proto/android_camera_event_module.cc",
-        "src/trace_processor/importers/proto/android_camera_event_module.h",
-        "src/trace_processor/importers/proto/chrome_system_probes_module.cc",
-        "src/trace_processor/importers/proto/chrome_system_probes_module.h",
-        "src/trace_processor/importers/proto/chrome_system_probes_parser.cc",
-        "src/trace_processor/importers/proto/chrome_system_probes_parser.h",
-        "src/trace_processor/importers/proto/memory_tracker_snapshot_module.cc",
-        "src/trace_processor/importers/proto/memory_tracker_snapshot_module.h",
-        "src/trace_processor/importers/proto/memory_tracker_snapshot_parser.cc",
-        "src/trace_processor/importers/proto/memory_tracker_snapshot_parser.h",
-        "src/trace_processor/importers/proto/metadata_module.cc",
-        "src/trace_processor/importers/proto/metadata_module.h",
-        "src/trace_processor/importers/proto/metadata_tracker.cc",
-        "src/trace_processor/importers/proto/metadata_tracker.h",
-        "src/trace_processor/importers/proto/perf_sample_tracker.cc",
-        "src/trace_processor/importers/proto/perf_sample_tracker.h",
-        "src/trace_processor/importers/proto/profile_module.cc",
-        "src/trace_processor/importers/proto/profile_module.h",
-        "src/trace_processor/importers/proto/profile_packet_utils.cc",
-        "src/trace_processor/importers/proto/profile_packet_utils.h",
-        "src/trace_processor/importers/proto/proto_incremental_state.h",
-        "src/trace_processor/importers/proto/proto_trace_parser.cc",
-        "src/trace_processor/importers/proto/proto_trace_parser.h",
-        "src/trace_processor/importers/proto/proto_trace_reader.cc",
-        "src/trace_processor/importers/proto/proto_trace_reader.h",
-        "src/trace_processor/importers/proto/proto_trace_tokenizer.cc",
-        "src/trace_processor/importers/proto/proto_trace_tokenizer.h",
-        "src/trace_processor/importers/proto/track_event_module.cc",
-        "src/trace_processor/importers/proto/track_event_module.h",
-        "src/trace_processor/importers/proto/track_event_parser.cc",
-        "src/trace_processor/importers/proto/track_event_parser.h",
-        "src/trace_processor/importers/proto/track_event_tokenizer.cc",
-        "src/trace_processor/importers/proto/track_event_tokenizer.h",
-        "src/trace_processor/importers/proto/track_event_tracker.cc",
-        "src/trace_processor/importers/proto/track_event_tracker.h",
-        "src/trace_processor/importers/proto/translation_table_module.cc",
-        "src/trace_processor/importers/proto/translation_table_module.h",
-        "src/trace_processor/importers/syscalls/syscall_tracker.h",
         "src/trace_processor/trace_blob.cc",
         "src/trace_processor/trace_processor_context.cc",
         "src/trace_processor/trace_processor_storage.cc",
@@ -4395,14 +4402,15 @@
         ":src_trace_processor_db_db",
         ":src_trace_processor_dynamic_dynamic",
         ":src_trace_processor_export_json",
-        ":src_trace_processor_ftrace_descriptors",
         ":src_trace_processor_importers_android_bugreport_android_bugreport",
         ":src_trace_processor_importers_common_common",
         ":src_trace_processor_importers_common_parser_types",
         ":src_trace_processor_importers_common_trace_parser_hdr",
+        ":src_trace_processor_importers_ftrace_descriptors",
         ":src_trace_processor_importers_fuchsia_fuchsia_record",
-        ":src_trace_processor_importers_importers_full",
+        ":src_trace_processor_importers_full",
         ":src_trace_processor_importers_memory_tracker_graph_processor",
+        ":src_trace_processor_importers_minimal",
         ":src_trace_processor_importers_ninja_ninja",
         ":src_trace_processor_importers_proto_full",
         ":src_trace_processor_importers_proto_minimal",
@@ -4530,14 +4538,15 @@
         ":src_trace_processor_db_db",
         ":src_trace_processor_dynamic_dynamic",
         ":src_trace_processor_export_json",
-        ":src_trace_processor_ftrace_descriptors",
         ":src_trace_processor_importers_android_bugreport_android_bugreport",
         ":src_trace_processor_importers_common_common",
         ":src_trace_processor_importers_common_parser_types",
         ":src_trace_processor_importers_common_trace_parser_hdr",
+        ":src_trace_processor_importers_ftrace_descriptors",
         ":src_trace_processor_importers_fuchsia_fuchsia_record",
-        ":src_trace_processor_importers_importers_full",
+        ":src_trace_processor_importers_full",
         ":src_trace_processor_importers_memory_tracker_graph_processor",
+        ":src_trace_processor_importers_minimal",
         ":src_trace_processor_importers_ninja_ninja",
         ":src_trace_processor_importers_proto_full",
         ":src_trace_processor_importers_proto_minimal",
@@ -4724,14 +4733,15 @@
         ":src_trace_processor_db_db",
         ":src_trace_processor_dynamic_dynamic",
         ":src_trace_processor_export_json",
-        ":src_trace_processor_ftrace_descriptors",
         ":src_trace_processor_importers_android_bugreport_android_bugreport",
         ":src_trace_processor_importers_common_common",
         ":src_trace_processor_importers_common_parser_types",
         ":src_trace_processor_importers_common_trace_parser_hdr",
+        ":src_trace_processor_importers_ftrace_descriptors",
         ":src_trace_processor_importers_fuchsia_fuchsia_record",
-        ":src_trace_processor_importers_importers_full",
+        ":src_trace_processor_importers_full",
         ":src_trace_processor_importers_memory_tracker_graph_processor",
+        ":src_trace_processor_importers_minimal",
         ":src_trace_processor_importers_ninja_ninja",
         ":src_trace_processor_importers_proto_full",
         ":src_trace_processor_importers_proto_minimal",
diff --git a/src/trace_processor/BUILD.gn b/src/trace_processor/BUILD.gn
index 95d1bf6..c605029 100644
--- a/src/trace_processor/BUILD.gn
+++ b/src/trace_processor/BUILD.gn
@@ -80,67 +80,10 @@
   }
 }
 
-source_set("ftrace_descriptors") {
-  sources = [
-    "importers/ftrace/ftrace_descriptors.cc",
-    "importers/ftrace/ftrace_descriptors.h",
-  ]
-  deps = [
-    "../../gn:default_deps",
-    "../../include/perfetto/ext/base:base",
-    "../protozero",
-  ]
-}
-
 source_set("storage_minimal") {
   sources = [
     "forwarding_trace_parser.cc",
     "forwarding_trace_parser.h",
-    "importers/default_modules.cc",
-    "importers/default_modules.h",
-    "importers/ftrace/ftrace_module.cc",
-    "importers/ftrace/ftrace_module.h",
-    "importers/fuchsia/fuchsia_trace_utils.h",
-    "importers/json/json_utils.cc",
-    "importers/json/json_utils.h",
-    "importers/proto/android_camera_event_module.cc",
-    "importers/proto/android_camera_event_module.h",
-    "importers/proto/chrome_system_probes_module.cc",
-    "importers/proto/chrome_system_probes_module.h",
-    "importers/proto/chrome_system_probes_parser.cc",
-    "importers/proto/chrome_system_probes_parser.h",
-    "importers/proto/memory_tracker_snapshot_module.cc",
-    "importers/proto/memory_tracker_snapshot_module.h",
-    "importers/proto/memory_tracker_snapshot_parser.cc",
-    "importers/proto/memory_tracker_snapshot_parser.h",
-    "importers/proto/metadata_module.cc",
-    "importers/proto/metadata_module.h",
-    "importers/proto/metadata_tracker.cc",
-    "importers/proto/metadata_tracker.h",
-    "importers/proto/perf_sample_tracker.cc",
-    "importers/proto/perf_sample_tracker.h",
-    "importers/proto/profile_module.cc",
-    "importers/proto/profile_module.h",
-    "importers/proto/profile_packet_utils.cc",
-    "importers/proto/profile_packet_utils.h",
-    "importers/proto/proto_incremental_state.h",
-    "importers/proto/proto_trace_parser.cc",
-    "importers/proto/proto_trace_parser.h",
-    "importers/proto/proto_trace_reader.cc",
-    "importers/proto/proto_trace_reader.h",
-    "importers/proto/proto_trace_tokenizer.cc",
-    "importers/proto/proto_trace_tokenizer.h",
-    "importers/proto/track_event_module.cc",
-    "importers/proto/track_event_module.h",
-    "importers/proto/track_event_parser.cc",
-    "importers/proto/track_event_parser.h",
-    "importers/proto/track_event_tokenizer.cc",
-    "importers/proto/track_event_tokenizer.h",
-    "importers/proto/track_event_tracker.cc",
-    "importers/proto/track_event_tracker.h",
-    "importers/proto/translation_table_module.cc",
-    "importers/proto/translation_table_module.h",
-    "importers/syscalls/syscall_tracker.h",
     "trace_blob.cc",
     "trace_processor_context.cc",
     "trace_processor_storage.cc",
@@ -155,6 +98,7 @@
     "containers",
     "importers:gen_cc_chrome_track_event_descriptor",
     "importers:gen_cc_track_event_descriptor",
+    "importers:minimal",
     "importers/common",
     "importers/common:parser_types",
     "importers/fuchsia:fuchsia_record",
@@ -165,7 +109,6 @@
     "storage",
     "tables",
     "types",
-    "util",
     "util:descriptors",
     "util:gzip",
     "util:proto_to_args_parser",
@@ -174,21 +117,6 @@
   ]
   public_deps = [
     "../../include/perfetto/trace_processor:storage",
-    "../../protos/perfetto/common:zero",
-    "../../protos/perfetto/config:zero",
-    "../../protos/perfetto/trace:zero",
-    "../../protos/perfetto/trace/android:zero",
-    "../../protos/perfetto/trace/chrome:zero",
-    "../../protos/perfetto/trace/ftrace:zero",
-    "../../protos/perfetto/trace/interned_data:zero",
-    "../../protos/perfetto/trace/perfetto:zero",
-    "../../protos/perfetto/trace/power:zero",
-    "../../protos/perfetto/trace/profiling:zero",
-    "../../protos/perfetto/trace/ps:zero",
-    "../../protos/perfetto/trace/sys_stats:zero",
-    "../../protos/perfetto/trace/system_info:zero",
-    "../../protos/perfetto/trace/track_event:zero",
-    "../../protos/perfetto/trace/translation:zero",
     "../../src/kernel_utils:syscall_table",
   ]
 
@@ -207,6 +135,7 @@
     ":storage_minimal",
     "../../gn:default_deps",
     "../base",
+    "importers:minimal",
     "storage",
     "types",
   ]
@@ -232,12 +161,15 @@
     deps = [
       ":metatrace",
       "../../gn:default_deps",
-      "../../protos/perfetto/trace/ftrace:zero",
+      "../../protos/perfetto/common:zero",
+      "../../protos/perfetto/trace:zero",
+      "../../protos/perfetto/trace/perfetto:zero",
       "../base",
       "../protozero",
       "db",
       "dynamic",
-      "importers:importers_full",
+      "importers:full",
+      "importers:minimal",
       "importers/android_bugreport",
       "importers/common",
       "importers/ninja",
@@ -300,98 +232,64 @@
   }
 }  # if (enable_perfetto_trace_processor_sqlite)
 
-perfetto_unittest_source_set("unittests") {
+perfetto_unittest_source_set("top_level_unittests") {
   testonly = true
+
   sources = [
     "forwarding_trace_parser_unittest.cc",
-    "importers/ftrace/binder_tracker_unittest.cc",
-    "importers/ftrace/sched_event_tracker_unittest.cc",
-    "importers/ftrace/thread_state_tracker_unittest.cc",
-    "importers/fuchsia/fuchsia_parser_unittest.cc",
-    "importers/fuchsia/fuchsia_trace_utils_unittest.cc",
-    "importers/memory_tracker/graph_processor_unittest.cc",
-    "importers/memory_tracker/graph_unittest.cc",
-    "importers/memory_tracker/raw_process_memory_node_unittest.cc",
-    "importers/proto/async_track_set_tracker_unittest.cc",
-    "importers/proto/perf_sample_tracker_unittest.cc",
-    "importers/proto/proto_trace_parser_unittest.cc",
-    "importers/syscalls/syscall_tracker_unittest.cc",
-    "importers/systrace/systrace_parser_unittest.cc",
     "ref_counted_unittest.cc",
   ]
   deps = [
-    ":gen_cc_test_messages_descriptor",
+    ":storage_minimal",
     "../../gn:default_deps",
     "../../gn:gtest_and_gmock",
-    "../../protos/perfetto/common:cpp",
-    "../../protos/perfetto/common:zero",
-    "../../protos/perfetto/trace:cpp",
-    "../../protos/perfetto/trace:minimal_zero",
-    "../../protos/perfetto/trace:zero",
-    "../../protos/perfetto/trace/android:zero",
-    "../../protos/perfetto/trace/chrome:zero",
-    "../../protos/perfetto/trace/ftrace:zero",
-    "../../protos/perfetto/trace/gpu:zero",
-    "../../protos/perfetto/trace/interned_data:zero",
-    "../../protos/perfetto/trace/profiling:cpp",
-    "../../protos/perfetto/trace/ps:zero",
-    "../../protos/perfetto/trace/sys_stats:zero",
-    "../../protos/perfetto/trace/track_event:zero",
-    "../base",
-    "../protozero",
-    "../protozero:testing_messages_zero",
-    "containers",
+    "../../include/perfetto/trace_processor",
+  ]
+
+  if (enable_perfetto_trace_processor_json && !is_win) {
+    # export_json_unittest.cc uses base::TempFile, which is not supported on
+    # windows.
+    sources += [ "export_json_unittest.cc" ]
+    deps += [
+      ":export_json",
+      "../../gn:jsoncpp",
+      "containers",
+      "importers:minimal",
+      "importers/common",
+      "storage",
+      "types",
+    ]
+  }
+}
+
+perfetto_unittest_source_set("unittests") {
+  testonly = true
+
+  # Do not add sources to this target: use top_level_unittests
+  # instead. This us really just a grouping
+  deps = [
+    ":top_level_unittests",
     "containers:unittests",
     "db:unittests",
-    "dynamic",
-    "importers:importers_full",
+    "importers:unittests",
     "importers/android_bugreport:unittests",
-    "importers/common",
-    "importers/common:parser_types",
     "importers/common:unittests",
-    "importers/memory_tracker:graph_processor",
-    "importers/proto:minimal",
     "importers/proto:unittests",
     "rpc:unittests",
-    "sorter",
     "sorter:unittests",
     "sqlite/functions:unittests",
-    "storage",
     "tables:unittests",
-    "types",
     "types:unittests",
     "util:descriptors",
     "util:unittests",
-    "views",
     "views:unittests",
   ]
-
   if (enable_perfetto_trace_processor_sqlite) {
     deps += [
-      ":lib",
-      "../../gn:sqlite",
       "dynamic:unittests",
       "sqlite:unittests",
     ]
   }
-
-  if (enable_perfetto_trace_processor_json) {
-    sources += [
-      "importers/json/json_trace_tokenizer_unittest.cc",
-      "importers/json/json_utils_unittest.cc",
-    ]
-    deps += [ "../../gn:jsoncpp" ]
-
-    if (!is_win) {
-      # export_json_unittest.cc uses base::TempFile, which is not supported on
-      # windows.
-      sources += [ "export_json_unittest.cc" ]
-      deps += [
-        ":export_json",
-        "../../include/perfetto/ext/trace_processor:export_json",
-      ]
-    }
-  }
 }
 
 perfetto_cc_proto_descriptor("gen_cc_test_messages_descriptor") {
@@ -447,6 +345,6 @@
   deps = [
     "../../gn:default_deps",
     "../base",
-    "importers:importers_full",
+    "importers:full",
   ]
 }
diff --git a/src/trace_processor/importers/BUILD.gn b/src/trace_processor/importers/BUILD.gn
index e03a203..1374bf1 100644
--- a/src/trace_processor/importers/BUILD.gn
+++ b/src/trace_processor/importers/BUILD.gn
@@ -13,8 +13,90 @@
 # limitations under the License.
 
 import("../../../gn/perfetto_cc_proto_descriptor.gni")
+import("../../../gn/test.gni")
 
-source_set("importers_full") {
+source_set("minimal") {
+  sources = [
+    "default_modules.cc",
+    "default_modules.h",
+    "ftrace/ftrace_module.cc",
+    "ftrace/ftrace_module.h",
+    "fuchsia/fuchsia_trace_utils.h",
+    "json/json_utils.cc",
+    "json/json_utils.h",
+    "proto/chrome_system_probes_module.cc",
+    "proto/chrome_system_probes_module.h",
+    "proto/chrome_system_probes_parser.cc",
+    "proto/chrome_system_probes_parser.h",
+    "proto/memory_tracker_snapshot_module.cc",
+    "proto/memory_tracker_snapshot_module.h",
+    "proto/memory_tracker_snapshot_parser.cc",
+    "proto/memory_tracker_snapshot_parser.h",
+    "proto/metadata_module.cc",
+    "proto/metadata_module.h",
+    "proto/metadata_tracker.cc",
+    "proto/metadata_tracker.h",
+    "proto/perf_sample_tracker.cc",
+    "proto/perf_sample_tracker.h",
+    "proto/profile_module.cc",
+    "proto/profile_module.h",
+    "proto/profile_packet_utils.cc",
+    "proto/profile_packet_utils.h",
+    "proto/proto_incremental_state.h",
+    "proto/proto_trace_parser.cc",
+    "proto/proto_trace_parser.h",
+    "proto/proto_trace_reader.cc",
+    "proto/proto_trace_reader.h",
+    "proto/proto_trace_tokenizer.cc",
+    "proto/proto_trace_tokenizer.h",
+    "proto/track_event_module.cc",
+    "proto/track_event_module.h",
+    "proto/track_event_parser.cc",
+    "proto/track_event_parser.h",
+    "proto/track_event_tokenizer.cc",
+    "proto/track_event_tokenizer.h",
+    "proto/track_event_tracker.cc",
+    "proto/track_event_tracker.h",
+  ]
+  deps = [
+    "../../../gn:default_deps",
+    "../../../protos/perfetto/common:zero",
+    "../../../protos/perfetto/config:zero",
+    "../../../protos/perfetto/trace:zero",
+    "../../../protos/perfetto/trace/android:zero",
+    "../../../protos/perfetto/trace/chrome:zero",
+    "../../../protos/perfetto/trace/ftrace:zero",
+    "../../../protos/perfetto/trace/interned_data:zero",
+    "../../../protos/perfetto/trace/perfetto:zero",
+    "../../../protos/perfetto/trace/power:zero",
+    "../../../protos/perfetto/trace/profiling:zero",
+    "../../../protos/perfetto/trace/ps:zero",
+    "../../../protos/perfetto/trace/sys_stats:zero",
+    "../../../protos/perfetto/trace/system_info:zero",
+    "../../../protos/perfetto/trace/track_event:zero",
+    "../../../protos/perfetto/trace/translation:zero",
+    "../../protozero",
+    "../containers",
+    "../sorter",
+    "../storage",
+    "../tables",
+    "../types",
+    "../util",
+    "../util:gzip",
+    "../util:proto_to_args_parser",
+    "../util:stack_traces_util",
+    "common",
+    "common:parser_types",
+    "fuchsia:fuchsia_record",
+    "memory_tracker:graph_processor",
+    "proto:minimal",
+  ]
+  if (enable_perfetto_trace_processor_json) {
+    deps += [ "../../../gn:jsoncpp" ]
+  }
+}
+
+source_set("full") {
   sources = [
     "additional_modules.cc",
     "additional_modules.h",
@@ -53,6 +135,8 @@
     "json/json_trace_parser.h",
     "json/json_trace_tokenizer.cc",
     "json/json_trace_tokenizer.h",
+    "proto/android_camera_event_module.cc",
+    "proto/android_camera_event_module.h",
     "proto/android_probes_module.cc",
     "proto/android_probes_module.h",
     "proto/android_probes_parser.cc",
@@ -75,9 +159,12 @@
     "proto/system_probes_module.h",
     "proto/system_probes_parser.cc",
     "proto/system_probes_parser.h",
+    "proto/translation_table_module.cc",
+    "proto/translation_table_module.h",
     "proto/vulkan_memory_tracker.cc",
     "proto/vulkan_memory_tracker.h",
     "syscalls/syscall_tracker.cc",
+    "syscalls/syscall_tracker.h",
     "systrace/systrace_line_parser.cc",
     "systrace/systrace_line_parser.h",
     "systrace/systrace_line_tokenizer.cc",
@@ -89,16 +176,27 @@
   ]
   public_deps = [ "../:storage_minimal" ]
   deps = [
+    ":ftrace_descriptors",
     ":gen_cc_trace_descriptor",
-    "../:ftrace_descriptors",
+    ":minimal",
+    "../../../gn:default_deps",
     "../../../include/perfetto/ext/base:base",
     "../../../include/perfetto/ext/traced:sys_stats_counters",
     "../../../protos/perfetto/common:zero",
+    "../../../protos/perfetto/config:zero",
     "../../../protos/perfetto/trace:zero",
     "../../../protos/perfetto/trace/android:zero",
+    "../../../protos/perfetto/trace/ftrace:zero",
     "../../../protos/perfetto/trace/gpu:zero",
     "../../../protos/perfetto/trace/interned_data:zero",
+    "../../../protos/perfetto/trace/power:zero",
+    "../../../protos/perfetto/trace/profiling:zero",
+    "../../../protos/perfetto/trace/ps:zero",
+    "../../../protos/perfetto/trace/sys_stats:zero",
+    "../../../protos/perfetto/trace/system_info:zero",
+    "../../../protos/perfetto/trace/translation:zero",
     "../../protozero",
+    "../containers",
     "../sorter",
     "../storage",
     "../tables",
@@ -120,6 +218,18 @@
   }
 }
 
+source_set("ftrace_descriptors") {
+  sources = [
+    "ftrace/ftrace_descriptors.cc",
+    "ftrace/ftrace_descriptors.h",
+  ]
+  deps = [
+    "../../../gn:default_deps",
+    "../../../include/perfetto/ext/base:base",
+    "../../protozero",
+  ]
+}
+
 perfetto_cc_proto_descriptor("gen_cc_config_descriptor") {
   descriptor_name = "config.descriptor"
   descriptor_target = "../../../protos/perfetto/config:descriptor"
@@ -139,3 +249,65 @@
   descriptor_name = "trace.descriptor"
   descriptor_target = "../../../protos/perfetto/trace:descriptor"
 }
+
+perfetto_unittest_source_set("unittests") {
+  testonly = true
+  sources = [
+    "ftrace/binder_tracker_unittest.cc",
+    "ftrace/sched_event_tracker_unittest.cc",
+    "ftrace/thread_state_tracker_unittest.cc",
+    "fuchsia/fuchsia_parser_unittest.cc",
+    "fuchsia/fuchsia_trace_utils_unittest.cc",
+    "memory_tracker/graph_processor_unittest.cc",
+    "memory_tracker/graph_unittest.cc",
+    "memory_tracker/raw_process_memory_node_unittest.cc",
+    "proto/async_track_set_tracker_unittest.cc",
+    "proto/perf_sample_tracker_unittest.cc",
+    "proto/proto_trace_parser_unittest.cc",
+    "syscalls/syscall_tracker_unittest.cc",
+    "systrace/systrace_parser_unittest.cc",
+  ]
+  deps = [
+    ":full",
+    ":minimal",
+    "..:gen_cc_test_messages_descriptor",
+    "../../../gn:default_deps",
+    "../../../gn:gtest_and_gmock",
+    "../../../protos/perfetto/common:cpp",
+    "../../../protos/perfetto/common:zero",
+    "../../../protos/perfetto/config:zero",
+    "../../../protos/perfetto/trace:cpp",
+    "../../../protos/perfetto/trace:minimal_zero",
+    "../../../protos/perfetto/trace:zero",
+    "../../../protos/perfetto/trace/android:zero",
+    "../../../protos/perfetto/trace/chrome:zero",
+    "../../../protos/perfetto/trace/ftrace:zero",
+    "../../../protos/perfetto/trace/gpu:zero",
+    "../../../protos/perfetto/trace/interned_data:zero",
+    "../../../protos/perfetto/trace/profiling:cpp",
+    "../../../protos/perfetto/trace/profiling:zero",
+    "../../../protos/perfetto/trace/ps:zero",
+    "../../../protos/perfetto/trace/sys_stats:zero",
+    "../../../protos/perfetto/trace/track_event:zero",
+    "../../base",
+    "../../protozero",
+    "../../protozero:testing_messages_zero",
+    "../sorter",
+    "../storage",
+    "../types",
+    "../util",
+    "../util:descriptors",
+    "../util:proto_to_args_parser",
+    "common",
+    "memory_tracker:graph_processor",
+    "proto:minimal",
+  ]
+
+  if (enable_perfetto_trace_processor_json) {
+    sources += [
+      "json/json_trace_tokenizer_unittest.cc",
+      "json/json_utils_unittest.cc",
+    ]
+    deps += [ "../../../gn:jsoncpp" ]
+  }
+}
diff --git a/src/trace_processor/importers/additional_modules.cc b/src/trace_processor/importers/additional_modules.cc
index b531a22..825cf21 100644
--- a/src/trace_processor/importers/additional_modules.cc
+++ b/src/trace_processor/importers/additional_modules.cc
@@ -16,6 +16,7 @@
 
 #include "src/trace_processor/importers/additional_modules.h"
 #include "src/trace_processor/importers/ftrace/ftrace_module_impl.h"
+#include "src/trace_processor/importers/proto/android_camera_event_module.h"
 #include "src/trace_processor/importers/proto/android_probes_module.h"
 #include "src/trace_processor/importers/proto/content_analyzer.h"
 #include "src/trace_processor/importers/proto/graphics_event_module.h"
@@ -34,6 +35,8 @@
   context->modules.emplace_back(new SystemProbesModule(context));
   context->modules.emplace_back(new TranslationTableModule(context));
   context->modules.emplace_back(new StatsdModule(context));
+  context->modules.emplace_back(new AndroidCameraEventModule(context));
+
   if (context->config.analyze_trace_proto_content) {
     context->modules.emplace_back(new ContentAnalyzerModule(context));
   }
diff --git a/src/trace_processor/importers/default_modules.cc b/src/trace_processor/importers/default_modules.cc
index 51c73cd..5fbc40c 100644
--- a/src/trace_processor/importers/default_modules.cc
+++ b/src/trace_processor/importers/default_modules.cc
@@ -16,7 +16,6 @@
 
 #include "src/trace_processor/importers/default_modules.h"
 #include "src/trace_processor/importers/ftrace/ftrace_module.h"
-#include "src/trace_processor/importers/proto/android_camera_event_module.h"
 #include "src/trace_processor/importers/proto/chrome_system_probes_module.h"
 #include "src/trace_processor/importers/proto/memory_tracker_snapshot_module.h"
 #include "src/trace_processor/importers/proto/metadata_module.h"
@@ -41,7 +40,6 @@
   context->modules.emplace_back(new ChromeSystemProbesModule(context));
   context->modules.emplace_back(new ProfileModule(context));
   context->modules.emplace_back(new MetadataModule(context));
-  context->modules.emplace_back(new AndroidCameraEventModule(context));
 }
 
 }  // namespace trace_processor
diff --git a/src/trace_processor/sorter/BUILD.gn b/src/trace_processor/sorter/BUILD.gn
index 53609a5..218d639 100644
--- a/src/trace_processor/sorter/BUILD.gn
+++ b/src/trace_processor/sorter/BUILD.gn
@@ -46,11 +46,11 @@
   ]
   deps = [
     ":sorter",
-    "..:storage_minimal",
     "../../../gn:default_deps",
     "../../../gn:gtest_and_gmock",
     "../../../include/perfetto/trace_processor:storage",
     "../../base",
+    "../importers:minimal",
     "../importers/common:parser_types",
     "../importers/proto:minimal",
     "../types",
diff --git a/src/trace_processor/sqlite/BUILD.gn b/src/trace_processor/sqlite/BUILD.gn
index 98ef4c1..0e63e54 100644
--- a/src/trace_processor/sqlite/BUILD.gn
+++ b/src/trace_processor/sqlite/BUILD.gn
@@ -34,7 +34,6 @@
       "window_operator_table.h",
     ]
     deps = [
-      "..:ftrace_descriptors",
       "..:metatrace",
       "../../../gn:default_deps",
       "../../../gn:sqlite",
@@ -43,6 +42,7 @@
       "../containers",
       "../db",
       "../dynamic",
+      "../importers:ftrace_descriptors",
       "../importers/common",
       "../storage",
       "../types",
diff --git a/src/trace_processor/sqlite/functions/BUILD.gn b/src/trace_processor/sqlite/functions/BUILD.gn
index 6a234bf..aa9a953 100644
--- a/src/trace_processor/sqlite/functions/BUILD.gn
+++ b/src/trace_processor/sqlite/functions/BUILD.gn
@@ -37,7 +37,6 @@
     deps = [
       "../..:demangle",
       "../..:export_json",
-      "../..:ftrace_descriptors",
       "../..:metatrace",
       "../../../../gn:default_deps",
       "../../../../gn:sqlite",
@@ -47,6 +46,7 @@
       "../../containers",
       "../../db",
       "../../dynamic",
+      "../../importers:ftrace_descriptors",
       "../../importers/common",
       "../../storage",
       "../../types",