Explicitly install optional components of perfetto
perfetto-extras is a phony module that abstracts optional components for
perfetto. Previously, the dependencies were installed by directly
required from traced_probes.
But that is expected to interfere with an upcoming change in Soong where
`required` dependencies are installed by Soong. Specifically, it will
increase the size of the `microdroid` module by 2-3MB because the
dependencies - which are unnecessary in Microdroid - will be installed
there due to the `required` being effective in Soong.
This change fixes that regression by making the dependencies to be only
for Android.
Bug: 321626681
Test: check the dependencies are found in Android
Test: check the dependencies are absent in Microdroid
Change-Id: I01de13d6a65c683302f85fad69107171c1f2022e
diff --git a/Android.bp b/Android.bp
index dec60eb..2eb8bf6 100644
--- a/Android.bp
+++ b/Android.bp
@@ -15256,12 +15256,6 @@
defaults: [
"perfetto_defaults",
],
- required: [
- "libperfetto_android_internal",
- "mm_events",
- "traced_perf",
- "trigger_perfetto",
- ],
target: {
android: {
shared_libs: [
@@ -15629,3 +15623,13 @@
sub_dir: "perfetto",
src: "persistent_cfg.pbtxt",
}
+
+phony {
+ name: "perfetto-extras",
+ required: [
+ "libperfetto_android_internal",
+ "mm_events",
+ "traced_perf",
+ "trigger_perfetto",
+ ],
+}
diff --git a/Android.bp.extras b/Android.bp.extras
index 2ce8e95..3aab5af 100644
--- a/Android.bp.extras
+++ b/Android.bp.extras
@@ -205,3 +205,13 @@
sub_dir: "perfetto",
src: "persistent_cfg.pbtxt",
}
+
+phony {
+ name: "perfetto-extras",
+ required: [
+ "libperfetto_android_internal",
+ "mm_events",
+ "traced_perf",
+ "trigger_perfetto",
+ ],
+}
diff --git a/tools/gen_android_bp b/tools/gen_android_bp
index 561657d..ba5320c 100755
--- a/tools/gen_android_bp
+++ b/tools/gen_android_bp
@@ -245,10 +245,6 @@
('test_suites', {'general-tests'}),
('test_config', 'PerfettoIntegrationTests.xml'),
],
- 'traced_probes': [('required', {
- 'libperfetto_android_internal', 'trigger_perfetto', 'traced_perf',
- 'mm_events'
- }),],
'libperfetto_android_internal': [('static_libs', {'libhealthhalutils'}),],
'trace_processor_shell': [
('strip', {