Skip to content

Commit aab2b79

Browse files
committed
sdk: presubmit fixups for the C SDK shrink stack
Run tools/format-sources, tools/gen_bazel, tools/gen_android_bp on the C-SDK-shrink stack output: - tools/gn format applied to the BUILD.gn files touched by the refactor (one trailing-newline / wrap fixup each in include/perfetto/ext/tracing/{core,ipc}/BUILD.gn, protos/perfetto/trace/BUILD.gn, src/protozero/filtering/BUILD.gn, src/tracing/BUILD.gn). - Android.bp regenerated to reflect the new sibling targets (base_minimal, client_api_minimal, tracing_minimal, core_minimal, service_minimal, the trace zero/cpp/lite library splits, etc.). - BUILD (Bazel) regenerated for the same. tools/run_presubmit is clean after this commit.
1 parent bf23806 commit aab2b79

7 files changed

Lines changed: 2576 additions & 3153 deletions

File tree

Android.bp

Lines changed: 1906 additions & 2479 deletions
Large diffs are not rendered by default.

BUILD

Lines changed: 657 additions & 665 deletions
Large diffs are not rendered by default.

include/perfetto/ext/tracing/core/BUILD.gn

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ source_set("core_minimal") {
4646
source_set("core") {
4747
public_deps = [
4848
":core_minimal",
49+
4950
# Full proto / include surface that consumers (trace_processor,
5051
# perfetto_cmd, etc.) expect transitively from this header set.
5152
"../../../../../protos/perfetto/common:cpp",

include/perfetto/ext/tracing/ipc/BUILD.gn

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
source_set("ipc") {
1616
public_deps = [
1717
"../../base",
18+
1819
# Pull the slim core variant so the C SDK closure (which reaches
1920
# this target via the system_backend -> tracing/ipc:common ->
2021
# ext/tracing/ipc chain) doesn't transitively pull

protos/perfetto/trace/BUILD.gn

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -76,19 +76,19 @@ minimal_proto_sources = [
7676
]
7777

7878
non_minimal_core_proto_sources = [
79+
"extension_descriptor.proto",
7980
"remote_clock_sync.proto",
80-
"trace_packet_defaults.proto",
81-
"trace_packet.proto",
8281
"trace.proto",
83-
"extension_descriptor.proto",
82+
"trace_packet.proto",
83+
"trace_packet_defaults.proto",
8484
]
8585

8686
non_minimal_extras_proto_sources = [
87+
"evdev.proto",
88+
"memory_graph.proto",
8789
"test_event.proto",
8890
"test_extensions.proto",
89-
"memory_graph.proto",
9091
"ui_state.proto",
91-
"evdev.proto",
9292
]
9393

9494
# Per-domain trace proto sub-deps that trace_packet.proto's cppgen output
@@ -117,6 +117,7 @@ non_minimal_per_domain_proto_deps = [
117117

118118
perfetto_proto_library("minimal_@TYPE@") {
119119
sources = minimal_proto_sources
120+
120121
# Only common/builtin_clock.proto is imported (by clock_snapshot.proto);
121122
# depending on the slim config aggregator avoids leaking the full
122123
# config closure into trace:zero_minimal -> //src/shared_lib.
@@ -127,6 +128,7 @@ perfetto_proto_library("non_minimal_core_@TYPE@") {
127128
sources = non_minimal_core_proto_sources
128129
deps = [
129130
":minimal_@TYPE@",
131+
130132
# Only trace_config (minimal) is imported transitively from this
131133
# target's sources; depending on the slim config aggregator keeps
132134
# the per-data-source config sub-deps out of the C SDK closure
@@ -150,8 +152,7 @@ perfetto_proto_library("non_minimal_extras_@TYPE@") {
150152
# per-domain fields can resolve without pulling per-domain deps into the
151153
# zero-only :non_minimal_core_@TYPE@ that the C SDK closure depends on.
152154
perfetto_proto_library("non_minimal_full_cpp_only_@TYPE@") {
153-
sources =
154-
non_minimal_core_proto_sources + non_minimal_extras_proto_sources
155+
sources = non_minimal_core_proto_sources + non_minimal_extras_proto_sources
155156
deps = non_minimal_per_domain_proto_deps + [
156157
"../config:@TYPE@",
157158
"interned_data:@TYPE@",
@@ -165,8 +166,7 @@ perfetto_proto_library("non_minimal_full_cpp_only_@TYPE@") {
165166
}
166167

167168
perfetto_proto_library("lite_only_@TYPE@") {
168-
sources =
169-
non_minimal_core_proto_sources + non_minimal_extras_proto_sources
169+
sources = non_minimal_core_proto_sources + non_minimal_extras_proto_sources
170170
deps = non_minimal_per_domain_proto_deps + [
171171
"../config:@TYPE@",
172172
"interned_data:@TYPE@",

src/protozero/filtering/BUILD.gn

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ source_set("message_filter_config") {
4242
":message_filter",
4343
":string_filter",
4444
"../../../gn:default_deps",
45+
4546
# Only TraceConfig / TracePerfettoConfig types are used; the
4647
# per-data-source config sub-deps that come with the full :cpp
4748
# group aren't needed here, and depending on :minimal_cpp keeps

src/tracing/BUILD.gn

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ source_set("client_api_without_backends_minimal") {
9595
public_deps = [
9696
"../../gn:default_deps",
9797
"../../include/perfetto/tracing:tracing_minimal",
98+
9899
# The .h surfaces of these proto deps are reachable from the
99100
# console_interceptor.cc / track_event_*.cc sources in the
100101
# :client_api_without_backends wrapper that depends on this target,

0 commit comments

Comments
 (0)