tp: remove importers/BUILD.gn file entirely and push down all targets
We're finally in the state where we can remove the importers/BUILD.gn
file entirely and push everything down to the leaf targets. This makes
everything a lot cleaner and easier to reason about.
Change-Id: I02caa198ef0d96755cb33e077daf25d500003170
diff --git a/Android.bp b/Android.bp
index d4aefe7..dd0f94e 100644
--- a/Android.bp
+++ b/Android.bp
@@ -1976,17 +1976,20 @@
":perfetto_src_trace_processor_importers_ftrace_full",
":perfetto_src_trace_processor_importers_ftrace_minimal",
":perfetto_src_trace_processor_importers_fuchsia_fuchsia_record",
- ":perfetto_src_trace_processor_importers_full",
+ ":perfetto_src_trace_processor_importers_fuchsia_full",
+ ":perfetto_src_trace_processor_importers_fuchsia_minimal",
+ ":perfetto_src_trace_processor_importers_gzip_full",
":perfetto_src_trace_processor_importers_i2c_full",
+ ":perfetto_src_trace_processor_importers_json_full",
":perfetto_src_trace_processor_importers_json_minimal",
":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_proto_importer_module",
":perfetto_src_trace_processor_importers_syscalls_full",
+ ":perfetto_src_trace_processor_importers_systrace_full",
":perfetto_src_trace_processor_importers_systrace_systrace_line",
":perfetto_src_trace_processor_importers_systrace_systrace_parser",
":perfetto_src_trace_processor_lib",
@@ -2181,11 +2184,11 @@
"perfetto_protos_third_party_pprof_zero_gen_headers",
"perfetto_protos_third_party_statsd_config_zero_gen_headers",
"perfetto_src_base_version_gen_h",
- "perfetto_src_trace_processor_importers_gen_cc_chrome_track_event_descriptor",
- "perfetto_src_trace_processor_importers_gen_cc_config_descriptor",
- "perfetto_src_trace_processor_importers_gen_cc_track_event_descriptor",
+ "perfetto_src_trace_processor_importers_proto_gen_cc_chrome_track_event_descriptor",
+ "perfetto_src_trace_processor_importers_proto_gen_cc_config_descriptor",
"perfetto_src_trace_processor_importers_proto_gen_cc_statsd_atoms_descriptor",
"perfetto_src_trace_processor_importers_proto_gen_cc_trace_descriptor",
+ "perfetto_src_trace_processor_importers_proto_gen_cc_track_event_descriptor",
"perfetto_src_trace_processor_metrics_gen_cc_all_chrome_metrics_descriptor",
"perfetto_src_trace_processor_metrics_gen_cc_metrics_descriptor",
"perfetto_src_trace_processor_metrics_sql_gen_amalgamated_sql_metrics",
@@ -9226,6 +9229,16 @@
],
}
+// GN: //src/trace_processor/importers/ftrace:unittests
+filegroup {
+ name: "perfetto_src_trace_processor_importers_ftrace_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",
+ ],
+}
+
// GN: //src/trace_processor/importers/fuchsia:fuchsia_record
filegroup {
name: "perfetto_src_trace_processor_importers_fuchsia_fuchsia_record",
@@ -9234,65 +9247,35 @@
],
}
-// GN: //src/trace_processor/importers:full
+// GN: //src/trace_processor/importers/fuchsia:full
filegroup {
- name: "perfetto_src_trace_processor_importers_full",
+ name: "perfetto_src_trace_processor_importers_fuchsia_full",
srcs: [
- "src/trace_processor/importers/additional_modules.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",
+ ],
+}
+
+// GN: //src/trace_processor/importers/fuchsia:minimal
+filegroup {
+ name: "perfetto_src_trace_processor_importers_fuchsia_minimal",
+}
+
+// GN: //src/trace_processor/importers/fuchsia:unittests
+filegroup {
+ name: "perfetto_src_trace_processor_importers_fuchsia_unittests",
+ srcs: [
+ "src/trace_processor/importers/fuchsia/fuchsia_parser_unittest.cc",
+ "src/trace_processor/importers/fuchsia/fuchsia_trace_utils_unittest.cc",
+ ],
+}
+
+// GN: //src/trace_processor/importers/gzip:full
+filegroup {
+ name: "perfetto_src_trace_processor_importers_gzip_full",
+ srcs: [
"src/trace_processor/importers/gzip/gzip_trace_parser.cc",
- "src/trace_processor/importers/json/json_trace_parser.cc",
- "src/trace_processor/importers/json/json_trace_tokenizer.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_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",
- srcs: [
- ":perfetto_protos_third_party_chromium_descriptor",
- ],
- cmd: "$(location tools/gen_cc_proto_descriptor.py) --gen_dir=$(genDir) --cpp_out=$(out) $(in)",
- out: [
- "src/trace_processor/importers/chrome_track_event.descriptor.h",
- ],
- tool_files: [
- "tools/gen_cc_proto_descriptor.py",
- ],
-}
-
-// GN: //src/trace_processor/importers:gen_cc_config_descriptor
-genrule {
- name: "perfetto_src_trace_processor_importers_gen_cc_config_descriptor",
- srcs: [
- ":perfetto_protos_perfetto_config_descriptor",
- ],
- cmd: "$(location tools/gen_cc_proto_descriptor.py) --gen_dir=$(genDir) --cpp_out=$(out) $(in)",
- out: [
- "src/trace_processor/importers/config.descriptor.h",
- ],
- tool_files: [
- "tools/gen_cc_proto_descriptor.py",
- ],
-}
-
-// GN: //src/trace_processor/importers:gen_cc_track_event_descriptor
-genrule {
- name: "perfetto_src_trace_processor_importers_gen_cc_track_event_descriptor",
- srcs: [
- ":perfetto_protos_perfetto_trace_track_event_descriptor",
- ],
- cmd: "$(location tools/gen_cc_proto_descriptor.py) --gen_dir=$(genDir) --cpp_out=$(out) $(in)",
- out: [
- "src/trace_processor/importers/track_event.descriptor.h",
- ],
- tool_files: [
- "tools/gen_cc_proto_descriptor.py",
],
}
@@ -9304,6 +9287,15 @@
],
}
+// GN: //src/trace_processor/importers/json:full
+filegroup {
+ name: "perfetto_src_trace_processor_importers_json_full",
+ srcs: [
+ "src/trace_processor/importers/json/json_trace_parser.cc",
+ "src/trace_processor/importers/json/json_trace_tokenizer.cc",
+ ],
+}
+
// GN: //src/trace_processor/importers/json:minimal
filegroup {
name: "perfetto_src_trace_processor_importers_json_minimal",
@@ -9324,11 +9316,13 @@
],
}
-// GN: //src/trace_processor/importers:minimal
+// GN: //src/trace_processor/importers/memory_tracker:unittests
filegroup {
- name: "perfetto_src_trace_processor_importers_minimal",
+ name: "perfetto_src_trace_processor_importers_memory_tracker_unittests",
srcs: [
- "src/trace_processor/importers/default_modules.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",
],
}
@@ -9344,6 +9338,7 @@
filegroup {
name: "perfetto_src_trace_processor_importers_proto_full",
srcs: [
+ "src/trace_processor/importers/proto/additional_modules.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",
@@ -9364,6 +9359,36 @@
],
}
+// GN: //src/trace_processor/importers/proto:gen_cc_chrome_track_event_descriptor
+genrule {
+ name: "perfetto_src_trace_processor_importers_proto_gen_cc_chrome_track_event_descriptor",
+ srcs: [
+ ":perfetto_protos_third_party_chromium_descriptor",
+ ],
+ cmd: "$(location tools/gen_cc_proto_descriptor.py) --gen_dir=$(genDir) --cpp_out=$(out) $(in)",
+ out: [
+ "src/trace_processor/importers/proto/chrome_track_event.descriptor.h",
+ ],
+ tool_files: [
+ "tools/gen_cc_proto_descriptor.py",
+ ],
+}
+
+// GN: //src/trace_processor/importers/proto:gen_cc_config_descriptor
+genrule {
+ name: "perfetto_src_trace_processor_importers_proto_gen_cc_config_descriptor",
+ srcs: [
+ ":perfetto_protos_perfetto_config_descriptor",
+ ],
+ cmd: "$(location tools/gen_cc_proto_descriptor.py) --gen_dir=$(genDir) --cpp_out=$(out) $(in)",
+ out: [
+ "src/trace_processor/importers/proto/config.descriptor.h",
+ ],
+ tool_files: [
+ "tools/gen_cc_proto_descriptor.py",
+ ],
+}
+
// GN: //src/trace_processor/importers/proto:gen_cc_statsd_atoms_descriptor
genrule {
name: "perfetto_src_trace_processor_importers_proto_gen_cc_statsd_atoms_descriptor",
@@ -9394,6 +9419,21 @@
],
}
+// GN: //src/trace_processor/importers/proto:gen_cc_track_event_descriptor
+genrule {
+ name: "perfetto_src_trace_processor_importers_proto_gen_cc_track_event_descriptor",
+ srcs: [
+ ":perfetto_protos_perfetto_trace_track_event_descriptor",
+ ],
+ cmd: "$(location tools/gen_cc_proto_descriptor.py) --gen_dir=$(genDir) --cpp_out=$(out) $(in)",
+ out: [
+ "src/trace_processor/importers/proto/track_event.descriptor.h",
+ ],
+ tool_files: [
+ "tools/gen_cc_proto_descriptor.py",
+ ],
+}
+
// GN: //src/trace_processor/importers/proto:minimal
filegroup {
name: "perfetto_src_trace_processor_importers_proto_minimal",
@@ -9402,6 +9442,7 @@
"src/trace_processor/importers/proto/chrome_string_lookup.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/default_modules.cc",
"src/trace_processor/importers/proto/heap_profile_tracker.cc",
"src/trace_processor/importers/proto/memory_tracker_snapshot_module.cc",
"src/trace_processor/importers/proto/memory_tracker_snapshot_parser.cc",
@@ -9443,6 +9484,8 @@
"src/trace_processor/importers/proto/active_chrome_processes_tracker_unittest.cc",
"src/trace_processor/importers/proto/heap_graph_tracker_unittest.cc",
"src/trace_processor/importers/proto/heap_profile_tracker_unittest.cc",
+ "src/trace_processor/importers/proto/perf_sample_tracker_unittest.cc",
+ "src/trace_processor/importers/proto/proto_trace_parser_unittest.cc",
],
}
@@ -9454,6 +9497,24 @@
],
}
+// GN: //src/trace_processor/importers/syscalls:unittests
+filegroup {
+ name: "perfetto_src_trace_processor_importers_syscalls_unittests",
+ srcs: [
+ "src/trace_processor/importers/syscalls/syscall_tracker_unittest.cc",
+ ],
+}
+
+// GN: //src/trace_processor/importers/systrace:full
+filegroup {
+ name: "perfetto_src_trace_processor_importers_systrace_full",
+ srcs: [
+ "src/trace_processor/importers/systrace/systrace_line_parser.cc",
+ "src/trace_processor/importers/systrace/systrace_line_tokenizer.cc",
+ "src/trace_processor/importers/systrace/systrace_trace_parser.cc",
+ ],
+}
+
// GN: //src/trace_processor/importers/systrace:systrace_line
filegroup {
name: "perfetto_src_trace_processor_importers_systrace_systrace_line",
@@ -9467,21 +9528,10 @@
],
}
-// GN: //src/trace_processor/importers:unittests
+// GN: //src/trace_processor/importers/systrace:unittests
filegroup {
- name: "perfetto_src_trace_processor_importers_unittests",
+ name: "perfetto_src_trace_processor_importers_systrace_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/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",
],
}
@@ -11347,12 +11397,17 @@
":perfetto_src_trace_processor_importers_ftrace_ftrace_descriptors",
":perfetto_src_trace_processor_importers_ftrace_full",
":perfetto_src_trace_processor_importers_ftrace_minimal",
+ ":perfetto_src_trace_processor_importers_ftrace_unittests",
":perfetto_src_trace_processor_importers_fuchsia_fuchsia_record",
- ":perfetto_src_trace_processor_importers_full",
+ ":perfetto_src_trace_processor_importers_fuchsia_full",
+ ":perfetto_src_trace_processor_importers_fuchsia_minimal",
+ ":perfetto_src_trace_processor_importers_fuchsia_unittests",
+ ":perfetto_src_trace_processor_importers_gzip_full",
":perfetto_src_trace_processor_importers_i2c_full",
+ ":perfetto_src_trace_processor_importers_json_full",
":perfetto_src_trace_processor_importers_json_minimal",
":perfetto_src_trace_processor_importers_memory_tracker_graph_processor",
- ":perfetto_src_trace_processor_importers_minimal",
+ ":perfetto_src_trace_processor_importers_memory_tracker_unittests",
":perfetto_src_trace_processor_importers_ninja_ninja",
":perfetto_src_trace_processor_importers_proto_full",
":perfetto_src_trace_processor_importers_proto_minimal",
@@ -11360,9 +11415,11 @@
":perfetto_src_trace_processor_importers_proto_proto_importer_module",
":perfetto_src_trace_processor_importers_proto_unittests",
":perfetto_src_trace_processor_importers_syscalls_full",
+ ":perfetto_src_trace_processor_importers_syscalls_unittests",
+ ":perfetto_src_trace_processor_importers_systrace_full",
":perfetto_src_trace_processor_importers_systrace_systrace_line",
":perfetto_src_trace_processor_importers_systrace_systrace_parser",
- ":perfetto_src_trace_processor_importers_unittests",
+ ":perfetto_src_trace_processor_importers_systrace_unittests",
":perfetto_src_trace_processor_lib",
":perfetto_src_trace_processor_metatrace",
":perfetto_src_trace_processor_metrics_metrics",
@@ -11590,11 +11647,11 @@
"perfetto_src_protozero_testing_messages_lite_gen_headers",
"perfetto_src_protozero_testing_messages_zero_gen_headers",
"perfetto_src_trace_processor_gen_cc_test_messages_descriptor",
- "perfetto_src_trace_processor_importers_gen_cc_chrome_track_event_descriptor",
- "perfetto_src_trace_processor_importers_gen_cc_config_descriptor",
- "perfetto_src_trace_processor_importers_gen_cc_track_event_descriptor",
+ "perfetto_src_trace_processor_importers_proto_gen_cc_chrome_track_event_descriptor",
+ "perfetto_src_trace_processor_importers_proto_gen_cc_config_descriptor",
"perfetto_src_trace_processor_importers_proto_gen_cc_statsd_atoms_descriptor",
"perfetto_src_trace_processor_importers_proto_gen_cc_trace_descriptor",
+ "perfetto_src_trace_processor_importers_proto_gen_cc_track_event_descriptor",
"perfetto_src_trace_processor_metrics_gen_cc_all_chrome_metrics_descriptor",
"perfetto_src_trace_processor_metrics_gen_cc_metrics_descriptor",
"perfetto_src_trace_processor_metrics_sql_gen_amalgamated_sql_metrics",
@@ -12007,17 +12064,20 @@
":perfetto_src_trace_processor_importers_ftrace_full",
":perfetto_src_trace_processor_importers_ftrace_minimal",
":perfetto_src_trace_processor_importers_fuchsia_fuchsia_record",
- ":perfetto_src_trace_processor_importers_full",
+ ":perfetto_src_trace_processor_importers_fuchsia_full",
+ ":perfetto_src_trace_processor_importers_fuchsia_minimal",
+ ":perfetto_src_trace_processor_importers_gzip_full",
":perfetto_src_trace_processor_importers_i2c_full",
+ ":perfetto_src_trace_processor_importers_json_full",
":perfetto_src_trace_processor_importers_json_minimal",
":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_proto_importer_module",
":perfetto_src_trace_processor_importers_syscalls_full",
+ ":perfetto_src_trace_processor_importers_systrace_full",
":perfetto_src_trace_processor_importers_systrace_systrace_line",
":perfetto_src_trace_processor_importers_systrace_systrace_parser",
":perfetto_src_trace_processor_lib",
@@ -12090,11 +12150,11 @@
"perfetto_protos_perfetto_trace_translation_zero_gen_headers",
"perfetto_protos_third_party_pprof_zero_gen_headers",
"perfetto_src_base_version_gen_h",
- "perfetto_src_trace_processor_importers_gen_cc_chrome_track_event_descriptor",
- "perfetto_src_trace_processor_importers_gen_cc_config_descriptor",
- "perfetto_src_trace_processor_importers_gen_cc_track_event_descriptor",
+ "perfetto_src_trace_processor_importers_proto_gen_cc_chrome_track_event_descriptor",
+ "perfetto_src_trace_processor_importers_proto_gen_cc_config_descriptor",
"perfetto_src_trace_processor_importers_proto_gen_cc_statsd_atoms_descriptor",
"perfetto_src_trace_processor_importers_proto_gen_cc_trace_descriptor",
+ "perfetto_src_trace_processor_importers_proto_gen_cc_track_event_descriptor",
"perfetto_src_trace_processor_metrics_gen_cc_all_chrome_metrics_descriptor",
"perfetto_src_trace_processor_metrics_gen_cc_metrics_descriptor",
"perfetto_src_trace_processor_metrics_sql_gen_amalgamated_sql_metrics",
@@ -12215,17 +12275,20 @@
":perfetto_src_trace_processor_importers_ftrace_full",
":perfetto_src_trace_processor_importers_ftrace_minimal",
":perfetto_src_trace_processor_importers_fuchsia_fuchsia_record",
- ":perfetto_src_trace_processor_importers_full",
+ ":perfetto_src_trace_processor_importers_fuchsia_full",
+ ":perfetto_src_trace_processor_importers_fuchsia_minimal",
+ ":perfetto_src_trace_processor_importers_gzip_full",
":perfetto_src_trace_processor_importers_i2c_full",
+ ":perfetto_src_trace_processor_importers_json_full",
":perfetto_src_trace_processor_importers_json_minimal",
":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_proto_importer_module",
":perfetto_src_trace_processor_importers_syscalls_full",
+ ":perfetto_src_trace_processor_importers_systrace_full",
":perfetto_src_trace_processor_importers_systrace_systrace_line",
":perfetto_src_trace_processor_importers_systrace_systrace_parser",
":perfetto_src_trace_processor_lib",
@@ -12300,11 +12363,11 @@
"perfetto_protos_perfetto_trace_translation_zero_gen_headers",
"perfetto_protos_third_party_pprof_zero_gen_headers",
"perfetto_src_base_version_gen_h",
- "perfetto_src_trace_processor_importers_gen_cc_chrome_track_event_descriptor",
- "perfetto_src_trace_processor_importers_gen_cc_config_descriptor",
- "perfetto_src_trace_processor_importers_gen_cc_track_event_descriptor",
+ "perfetto_src_trace_processor_importers_proto_gen_cc_chrome_track_event_descriptor",
+ "perfetto_src_trace_processor_importers_proto_gen_cc_config_descriptor",
"perfetto_src_trace_processor_importers_proto_gen_cc_statsd_atoms_descriptor",
"perfetto_src_trace_processor_importers_proto_gen_cc_trace_descriptor",
+ "perfetto_src_trace_processor_importers_proto_gen_cc_track_event_descriptor",
"perfetto_src_trace_processor_metrics_gen_cc_all_chrome_metrics_descriptor",
"perfetto_src_trace_processor_metrics_gen_cc_metrics_descriptor",
"perfetto_src_trace_processor_metrics_sql_gen_amalgamated_sql_metrics",