Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
fb220f5
amalgamated C SDK: drop unused per-domain trace pbzero headers
dreveman May 9, 2026
99d5231
amalgamated C SDK: drop per-domain config + common protos behind lazy…
dreveman May 9, 2026
7f49fd7
amalgamated C SDK: drop chrome/etw/stress_test config protos behind l…
dreveman May 9, 2026
06f0117
amalgamated C SDK: drop unused top-level trace protos
dreveman May 9, 2026
e59b76e
amalgamated C SDK: drop sys_stats_counters from common protos
dreveman May 9, 2026
c84145e
amalgamated C SDK: drop C++ implementation files unused by the C ABI
dreveman May 9, 2026
559bc74
sdk: split protos/perfetto/common into minimal + non_minimal
dreveman May 15, 2026
7f4af22
sdk: split protos/perfetto/config into minimal + non_minimal
dreveman May 15, 2026
e904222
sdk: split protos/perfetto/trace/interned_data into minimal + lite_only
dreveman May 15, 2026
a8d9fa9
sdk: split protos/perfetto/trace into core + extras + lite_only
dreveman May 15, 2026
852fb9d
sdk: split src/base into :base_minimal core + :base full
dreveman May 15, 2026
6f39c88
sdk: split src/tracing client_api into _minimal core + extras
dreveman May 15, 2026
ccf1114
sdk: add :tracing_minimal sibling in include/perfetto/tracing
dreveman May 15, 2026
3b0227e
sdk: trace BUILD.gn: reverse non_minimal core/extras dep edge
dreveman May 15, 2026
6febe74
sdk: switch C SDK closure to _minimal deps and remove the GN arg
dreveman May 15, 2026
68645ec
sdk: restructure trace cpp generation to drop per-domain leak
dreveman May 15, 2026
8ae7723
sdk: add :core_minimal siblings + plumb minimal across src/tracing
dreveman May 15, 2026
bf23806
sdk: close remaining C SDK leak paths through service + ipc layers
dreveman May 15, 2026
aab2b79
sdk: presubmit fixups for the C SDK shrink stack
dreveman May 15, 2026
c16bf2c
sdk: split interned_data cpp generation into its own full-deps library
dreveman May 15, 2026
b77dd24
sdk: fix bazel build by retargeting trace non_minimal proto group
dreveman May 15, 2026
92fa97b
sdk: rename interned_data minimal_@TYPE@ back to canonical @TYPE@
dreveman May 15, 2026
ec79b67
sdk: route proto descriptor wrappers through non-overlapping libs
dreveman May 16, 2026
fdc7c7f
sdk: fix bazel trace_zero cc_library to reference real proto targets
dreveman May 16, 2026
197ff33
sdk: move ftrace_descriptor + gpu_counter_descriptor into common:minimal
dreveman May 16, 2026
4a5e4aa
sdk: convert empty source_set wrappers to groups for Bazel
dreveman May 16, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4,600 changes: 1,877 additions & 2,723 deletions Android.bp

Large diffs are not rendered by default.

1,247 changes: 530 additions & 717 deletions BUILD

Large diffs are not rendered by default.

12 changes: 10 additions & 2 deletions BUILD.extras
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,18 @@ perfetto_go_proto_library(
)

perfetto_go_proto_library(
name = "protos_perfetto_trace_non_minimal_protos_go_proto",
name = "protos_perfetto_trace_non_minimal_core_protos_go_proto",
visibility = PERFETTO_CONFIG.go_proto_library_visibility,
deps = [
":protos_perfetto_trace_non_minimal_protos",
":protos_perfetto_trace_non_minimal_core_protos",
],
)

perfetto_go_proto_library(
name = "protos_perfetto_trace_non_minimal_extras_protos_go_proto",
visibility = PERFETTO_CONFIG.go_proto_library_visibility,
deps = [
":protos_perfetto_trace_non_minimal_extras_protos",
],
)

Expand Down
56 changes: 37 additions & 19 deletions include/perfetto/ext/tracing/core/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -12,29 +12,47 @@
# See the License for the specific language governing permissions and
# limitations under the License.

source_set("core") {
_core_headers = [
"basic_types.h",
"client_identity.h",
"commit_data_request.h",
"consumer.h",
"observable_events.h",
"priority_boost_config.h",
"producer.h",
"shared_memory.h",
"shared_memory_abi.h",
"shared_memory_arbiter.h",
"slice.h",
"trace_packet.h",
"trace_stats.h",
"trace_writer.h",
"tracing_service.h",
]

# C-SDK-closure variant of :core. Same headers, but routes through the
# minimal proto/core aggregators so the C SDK doesn't pull in
# common:non_minimal_cpp and the per-data-source config sub-deps.
source_set("core_minimal") {
public_deps = [
"../../../../../protos/perfetto/common:cpp",
"../../../../../protos/perfetto/common:minimal_cpp",
"../../../../../protos/perfetto/config/priority_boost:cpp",
"../../../tracing/core",
"../../../tracing/core:core_minimal",
"../../base",
]
sources = [
"basic_types.h",
"client_identity.h",
"commit_data_request.h",
"consumer.h",
"observable_events.h",
"priority_boost_config.h",
"producer.h",
"shared_memory.h",
"shared_memory_abi.h",
"shared_memory_arbiter.h",
"slice.h",
"trace_packet.h",
"trace_stats.h",
"trace_writer.h",
"tracing_service.h",
sources = _core_headers
}

# Thin wrapper: the .h sources live in :core_minimal; this target just
# adds the full-closure proto / include surface that consumers
# (trace_processor, perfetto_cmd, etc.) expect transitively from this
# header set. Modeled as `group` rather than `source_set` so gen_bazel
# doesn't emit an empty filegroup.
group("core") {
public_deps = [
":core_minimal",
"../../../../../protos/perfetto/common:cpp",
"../../../tracing/core",
]
}

Expand Down
7 changes: 6 additions & 1 deletion include/perfetto/ext/tracing/ipc/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,12 @@
source_set("ipc") {
public_deps = [
"../../base",
"../core",

# Pull the slim core variant so the C SDK closure (which reaches
# this target via the system_backend -> tracing/ipc:common ->
# ext/tracing/ipc chain) doesn't transitively pull
# ext/tracing/core:core's full proto deps.
"../core:core_minimal",
]
sources = [
"consumer_ipc_client.h",
Expand Down
116 changes: 68 additions & 48 deletions include/perfetto/tracing/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -12,63 +12,83 @@
# See the License for the specific language governing permissions and
# limitations under the License.

source_set("tracing") {
_tracing_headers = [
"backend_type.h",
"buffer_exhausted_policy.h",
"console_interceptor.h",
"data_source.h",
"debug_annotation.h",
"default_socket.h",
"event_context.h",
"interceptor.h",
"internal/basic_types.h",
"internal/checked_scope.h",
"internal/data_source_internal.h",
"internal/data_source_type.h",
"internal/fnv1a.h",
"internal/in_process_tracing_backend.h",
"internal/interceptor_trace_writer.h",
"internal/system_tracing_backend.h",
"internal/tracing_backend_fake.h",
"internal/tracing_muxer.h",
"internal/tracing_tls.h",
"internal/track_event_data_source.h",
"internal/track_event_internal.h",
"internal/track_event_interned_fields.h",
"internal/track_event_legacy.h",
"internal/track_event_macros.h",
"internal/write_track_event_args.h",
"locked_handle.h",
"platform.h",
"string_helpers.h",
"trace_writer_base.h",
"traced_proto.h",
"traced_value.h",
"traced_value_forward.h",
"tracing.h",
"tracing_backend.h",
"tracing_policy.h",
"track.h",
"track_event.h",
"track_event_args.h",
"track_event_category_registry.h",
"track_event_interned_data_index.h",
"track_event_legacy.h",
"track_event_state_tracker.h",
]

# C-SDK-closure variant of :tracing. Same headers, but routes the
# proto deps through the minimal proto aggregators (zero_minimal /
# cpp_minimal) so the C SDK doesn't transitively pull in the
# per-domain trace/config protos via this target's public_deps.
source_set("tracing_minimal") {
public_deps = [
"../../../protos/perfetto/common:cpp",
"../../../protos/perfetto/common:zero",
"../../../protos/perfetto/config:cpp",
"../../../protos/perfetto/common:minimal_cpp",
"../../../protos/perfetto/common:minimal_zero",
"../../../protos/perfetto/config:minimal_cpp",
"../../../protos/perfetto/config/track_event:cpp",
"../../../protos/perfetto/trace:zero",
"../../../protos/perfetto/trace:zero_minimal",
"../../../protos/perfetto/trace/interned_data:zero",
"../../../protos/perfetto/trace/track_event:cpp",
"../../../protos/perfetto/trace/track_event:zero",
"../base",
"../protozero",
"core:forward_decls",
]
sources = _tracing_headers
}

sources = [
"backend_type.h",
"buffer_exhausted_policy.h",
"console_interceptor.h",
"data_source.h",
"debug_annotation.h",
"default_socket.h",
"event_context.h",
"interceptor.h",
"internal/basic_types.h",
"internal/checked_scope.h",
"internal/data_source_internal.h",
"internal/data_source_type.h",
"internal/fnv1a.h",
"internal/in_process_tracing_backend.h",
"internal/interceptor_trace_writer.h",
"internal/system_tracing_backend.h",
"internal/tracing_backend_fake.h",
"internal/tracing_muxer.h",
"internal/tracing_tls.h",
"internal/track_event_data_source.h",
"internal/track_event_internal.h",
"internal/track_event_interned_fields.h",
"internal/track_event_legacy.h",
"internal/track_event_macros.h",
"internal/write_track_event_args.h",
"locked_handle.h",
"platform.h",
"string_helpers.h",
"trace_writer_base.h",
"traced_proto.h",
"traced_value.h",
"traced_value_forward.h",
"tracing.h",
"tracing_backend.h",
"tracing_policy.h",
"track.h",
"track_event.h",
"track_event_args.h",
"track_event_category_registry.h",
"track_event_interned_data_index.h",
"track_event_legacy.h",
"track_event_state_tracker.h",
# Thin wrapper: the .h sources live in :tracing_minimal; this target
# just adds the full-closure proto deps for non-C-SDK consumers.
# Modeled as `group` rather than `source_set` so gen_bazel doesn't
# emit an empty perfetto_filegroup (which Bazel's cc_library srcs
# check rejects).
group("tracing") {
public_deps = [
":tracing_minimal",
"../../../protos/perfetto/common:cpp",
"../../../protos/perfetto/common:zero",
"../../../protos/perfetto/config:cpp",
"../../../protos/perfetto/trace:zero",
]
}
37 changes: 27 additions & 10 deletions include/perfetto/tracing/core/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,38 @@
# See the License for the specific language governing permissions and
# limitations under the License.

source_set("core") {
_core_headers = [
"chrome_config.h",
"data_source_config.h",
"data_source_descriptor.h",
"flush_flags.h",
"trace_config.h",
"tracing_service_capabilities.h",
"tracing_service_state.h",
]

# C-SDK-closure variant of :core. Same headers, but routes the proto
# public_deps through the minimal aggregators so the C SDK doesn't pull
# the full common:cpp / config:cpp closures (and their per-data-source
# sub-deps) into //src/shared_lib's transitive set.
source_set("core_minimal") {
public_deps = [
":forward_decls",
"../../../../protos/perfetto/common:minimal_cpp",
"../../../../protos/perfetto/config:minimal_cpp",
]
sources = _core_headers
}

# Thin wrapper: the .h sources live in :core_minimal; this target just
# adds the full-closure proto deps. Modeled as `group` rather than
# `source_set` so gen_bazel doesn't emit an empty filegroup.
group("core") {
public_deps = [
":core_minimal",
"../../../../protos/perfetto/common:cpp",
"../../../../protos/perfetto/config:cpp",
]
sources = [
"chrome_config.h",
"data_source_config.h",
"data_source_descriptor.h",
"flush_flags.h",
"trace_config.h",
"tracing_service_capabilities.h",
"tracing_service_state.h",
]
}

# This is a separate target so other targets in include/**/BUILD.gn can pull
Expand Down
Loading
Loading