Skip to content

Commit fbdbaaf

Browse files
committed
Merge remote-tracking branch 'origin/main' into cpu_per_uid_isolated_uid
2 parents 8f49a93 + 96c76d5 commit fbdbaaf

217 files changed

Lines changed: 18055 additions & 11073 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Android.bp

Lines changed: 83 additions & 15 deletions
Large diffs are not rendered by default.

BUILD

Lines changed: 100 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -320,6 +320,7 @@ perfetto_cc_binary(
320320
],
321321
deps = [
322322
":protos_perfetto_common_cpp",
323+
":protos_perfetto_common_passthrough_lite",
323324
":protos_perfetto_common_semantic_type_cpp",
324325
":protos_perfetto_common_semantic_type_lite",
325326
":protos_perfetto_common_semantic_type_zero",
@@ -360,6 +361,7 @@ perfetto_cc_binary(
360361
"src/tools/proto_merger/main.cc",
361362
],
362363
deps = [
364+
":protos_perfetto_common_passthrough_lite",
363365
":src_base_base",
364366
":src_base_version",
365367
] + PERFETTO_CONFIG.deps.protobuf_full,
@@ -432,7 +434,6 @@ perfetto_cc_library(
432434
":src_trace_processor_importers_ninja_ninja",
433435
":src_trace_processor_importers_perf_perf",
434436
":src_trace_processor_importers_perf_record",
435-
":src_trace_processor_importers_perf_text_perf_text",
436437
":src_trace_processor_importers_pprof_pprof",
437438
":src_trace_processor_importers_primes_primes",
438439
":src_trace_processor_importers_proto_full",
@@ -498,6 +499,7 @@ perfetto_cc_library(
498499
":src_trace_processor_plugins_metadata_metadata",
499500
":src_trace_processor_plugins_package_lookup_package_lookup",
500501
":src_trace_processor_plugins_perf_counter_perf_counter",
502+
":src_trace_processor_plugins_perf_text_perf_text",
501503
":src_trace_processor_plugins_perfetto_manifest_perfetto_manifest",
502504
":src_trace_processor_plugins_pprof_functions_pprof_functions",
503505
":src_trace_processor_plugins_slice_mipmap_operator_slice_mipmap_operator",
@@ -730,7 +732,6 @@ perfetto_cc_library(
730732
":src_trace_processor_importers_ninja_ninja",
731733
":src_trace_processor_importers_perf_perf",
732734
":src_trace_processor_importers_perf_record",
733-
":src_trace_processor_importers_perf_text_perf_text",
734735
":src_trace_processor_importers_pprof_pprof",
735736
":src_trace_processor_importers_primes_primes",
736737
":src_trace_processor_importers_proto_full",
@@ -796,6 +797,7 @@ perfetto_cc_library(
796797
":src_trace_processor_plugins_metadata_metadata",
797798
":src_trace_processor_plugins_package_lookup_package_lookup",
798799
":src_trace_processor_plugins_perf_counter_perf_counter",
800+
":src_trace_processor_plugins_perf_text_perf_text",
799801
":src_trace_processor_plugins_perfetto_manifest_perfetto_manifest",
800802
":src_trace_processor_plugins_pprof_functions_pprof_functions",
801803
":src_trace_processor_plugins_slice_mipmap_operator_slice_mipmap_operator",
@@ -2648,6 +2650,8 @@ perfetto_filegroup(
26482650
"src/trace_processor/importers/common/slice_tracker.h",
26492651
"src/trace_processor/importers/common/slice_translation_table.cc",
26502652
"src/trace_processor/importers/common/slice_translation_table.h",
2653+
"src/trace_processor/importers/common/sparse_counter_tracker.cc",
2654+
"src/trace_processor/importers/common/sparse_counter_tracker.h",
26512655
"src/trace_processor/importers/common/stack_profile_tracker.cc",
26522656
"src/trace_processor/importers/common/stack_profile_tracker.h",
26532657
"src/trace_processor/importers/common/state_tracker.cc",
@@ -2658,6 +2662,10 @@ perfetto_filegroup(
26582662
"src/trace_processor/importers/common/system_info_tracker.h",
26592663
"src/trace_processor/importers/common/thread_state_tracker.cc",
26602664
"src/trace_processor/importers/common/thread_state_tracker.h",
2665+
"src/trace_processor/importers/common/trace_diagnostics_tracker.cc",
2666+
"src/trace_processor/importers/common/trace_diagnostics_tracker.h",
2667+
"src/trace_processor/importers/common/trace_diagnostics_tracker_helper.cc",
2668+
"src/trace_processor/importers/common/trace_diagnostics_tracker_helper.h",
26612669
"src/trace_processor/importers/common/trace_file_tracker.cc",
26622670
"src/trace_processor/importers/common/trace_file_tracker.h",
26632671
"src/trace_processor/importers/common/track_compressor.cc",
@@ -2953,20 +2961,6 @@ perfetto_filegroup(
29532961
],
29542962
)
29552963

2956-
# GN target: //src/trace_processor/importers/perf_text:perf_text
2957-
perfetto_filegroup(
2958-
name = "src_trace_processor_importers_perf_text_perf_text",
2959-
srcs = [
2960-
"src/trace_processor/importers/perf_text/perf_text_event.h",
2961-
"src/trace_processor/importers/perf_text/perf_text_sample_line_parser.cc",
2962-
"src/trace_processor/importers/perf_text/perf_text_sample_line_parser.h",
2963-
"src/trace_processor/importers/perf_text/perf_text_trace_parser.cc",
2964-
"src/trace_processor/importers/perf_text/perf_text_trace_parser.h",
2965-
"src/trace_processor/importers/perf_text/perf_text_trace_tokenizer.cc",
2966-
"src/trace_processor/importers/perf_text/perf_text_trace_tokenizer.h",
2967-
],
2968-
)
2969-
29702964
# GN target: //src/trace_processor/importers/pprof:pprof
29712965
perfetto_filegroup(
29722966
name = "src_trace_processor_importers_pprof_pprof",
@@ -3215,6 +3209,8 @@ perfetto_filegroup(
32153209
"src/trace_processor/importers/proto/chrome_system_probes_module.h",
32163210
"src/trace_processor/importers/proto/chrome_system_probes_parser.cc",
32173211
"src/trace_processor/importers/proto/chrome_system_probes_parser.h",
3212+
"src/trace_processor/importers/proto/concurrent_sessions_module.cc",
3213+
"src/trace_processor/importers/proto/concurrent_sessions_module.h",
32183214
"src/trace_processor/importers/proto/default_modules.cc",
32193215
"src/trace_processor/importers/proto/default_modules.h",
32203216
"src/trace_processor/importers/proto/incremental_state.cc",
@@ -4802,6 +4798,22 @@ perfetto_filegroup(
48024798
],
48034799
)
48044800

4801+
# GN target: //src/trace_processor/plugins/perf_text:perf_text
4802+
perfetto_filegroup(
4803+
name = "src_trace_processor_plugins_perf_text_perf_text",
4804+
srcs = [
4805+
"src/trace_processor/plugins/perf_text/perf_text.cc",
4806+
"src/trace_processor/plugins/perf_text/perf_text.h",
4807+
"src/trace_processor/plugins/perf_text/perf_text_event.h",
4808+
"src/trace_processor/plugins/perf_text/perf_text_sample_line_parser.cc",
4809+
"src/trace_processor/plugins/perf_text/perf_text_sample_line_parser.h",
4810+
"src/trace_processor/plugins/perf_text/perf_text_trace_parser.cc",
4811+
"src/trace_processor/plugins/perf_text/perf_text_trace_parser.h",
4812+
"src/trace_processor/plugins/perf_text/perf_text_trace_tokenizer.cc",
4813+
"src/trace_processor/plugins/perf_text/perf_text_trace_tokenizer.h",
4814+
],
4815+
)
4816+
48054817
# GN target: //src/trace_processor/plugins/perfetto_manifest:perfetto_manifest
48064818
perfetto_filegroup(
48074819
name = "src_trace_processor_plugins_perfetto_manifest_perfetto_manifest",
@@ -7543,6 +7555,54 @@ perfetto_dart_proto_library(
75437555
],
75447556
)
75457557

7558+
# GN target: [//protos/perfetto/common:passthrough_source_set]
7559+
perfetto_proto_library(
7560+
name = "passthrough_proto",
7561+
deps = [
7562+
":protos_perfetto_common_passthrough_protos",
7563+
],
7564+
)
7565+
7566+
# GN target: [//protos/perfetto/common:passthrough_source_set]
7567+
perfetto_cc_proto_library(
7568+
name = "passthrough_cc_proto",
7569+
deps = [
7570+
":passthrough_proto",
7571+
],
7572+
)
7573+
7574+
# GN target: [//protos/perfetto/common:passthrough_source_set]
7575+
perfetto_java_proto_library(
7576+
name = "passthrough_java_proto",
7577+
deps = [
7578+
":passthrough_proto",
7579+
],
7580+
)
7581+
7582+
# GN target: [//protos/perfetto/common:passthrough_source_set]
7583+
perfetto_java_lite_proto_library(
7584+
name = "passthrough_java_proto_lite",
7585+
deps = [
7586+
":passthrough_proto",
7587+
],
7588+
)
7589+
7590+
# GN target: [//protos/perfetto/common:passthrough_source_set]
7591+
perfetto_py_proto_library(
7592+
name = "passthrough_py_pb2",
7593+
deps = [
7594+
":passthrough_proto",
7595+
],
7596+
)
7597+
7598+
# GN target: [//protos/perfetto/common:passthrough_source_set]
7599+
perfetto_dart_proto_library(
7600+
name = "passthrough_dart_proto",
7601+
deps = [
7602+
":passthrough_proto",
7603+
],
7604+
)
7605+
75467606
perfetto_cc_library(
75477607
name = "trace_zero",
75487608
hdrs = [
@@ -7642,6 +7702,27 @@ perfetto_cc_protocpp_library(
76427702
],
76437703
)
76447704

7705+
# GN target: //protos/perfetto/common:passthrough_lite
7706+
perfetto_cc_proto_library(
7707+
name = "protos_perfetto_common_passthrough_lite",
7708+
deps = [
7709+
":protos_perfetto_common_passthrough_protos",
7710+
],
7711+
)
7712+
7713+
# GN target: //protos/perfetto/common:passthrough_source_set
7714+
perfetto_proto_library(
7715+
name = "protos_perfetto_common_passthrough_protos",
7716+
srcs = [
7717+
"protos/perfetto/common/passthrough.proto",
7718+
],
7719+
visibility = [
7720+
PERFETTO_CONFIG.proto_library_visibility,
7721+
],
7722+
deps = [
7723+
] + PERFETTO_CONFIG.deps.protobuf_descriptor_proto,
7724+
)
7725+
76457726
# GN target: //protos/perfetto/common:source_set
76467727
perfetto_proto_library(
76477728
name = "protos_perfetto_common_protos",
@@ -9279,6 +9360,7 @@ perfetto_cc_protozero_library(
92799360
perfetto_proto_library(
92809361
name = "protos_perfetto_trace_perfetto_protos",
92819362
srcs = [
9363+
"protos/perfetto/trace/perfetto/concurrent_session_event.proto",
92829364
"protos/perfetto/trace/perfetto/perfetto_metatrace.proto",
92839365
"protos/perfetto/trace/perfetto/trace_provenance.proto",
92849366
"protos/perfetto/trace/perfetto/tracing_service_event.proto",
@@ -11222,7 +11304,6 @@ perfetto_cc_library(
1122211304
":src_trace_processor_importers_ninja_ninja",
1122311305
":src_trace_processor_importers_perf_perf",
1122411306
":src_trace_processor_importers_perf_record",
11225-
":src_trace_processor_importers_perf_text_perf_text",
1122611307
":src_trace_processor_importers_pprof_pprof",
1122711308
":src_trace_processor_importers_primes_primes",
1122811309
":src_trace_processor_importers_proto_full",
@@ -11288,6 +11369,7 @@ perfetto_cc_library(
1128811369
":src_trace_processor_plugins_metadata_metadata",
1128911370
":src_trace_processor_plugins_package_lookup_package_lookup",
1129011371
":src_trace_processor_plugins_perf_counter_perf_counter",
11372+
":src_trace_processor_plugins_perf_text_perf_text",
1129111373
":src_trace_processor_plugins_perfetto_manifest_perfetto_manifest",
1129211374
":src_trace_processor_plugins_pprof_functions_pprof_functions",
1129311375
":src_trace_processor_plugins_slice_mipmap_operator_slice_mipmap_operator",
@@ -11550,7 +11632,6 @@ perfetto_cc_binary(
1155011632
":src_trace_processor_importers_ninja_ninja",
1155111633
":src_trace_processor_importers_perf_perf",
1155211634
":src_trace_processor_importers_perf_record",
11553-
":src_trace_processor_importers_perf_text_perf_text",
1155411635
":src_trace_processor_importers_pprof_pprof",
1155511636
":src_trace_processor_importers_primes_primes",
1155611637
":src_trace_processor_importers_proto_full",
@@ -11616,6 +11697,7 @@ perfetto_cc_binary(
1161611697
":src_trace_processor_plugins_metadata_metadata",
1161711698
":src_trace_processor_plugins_package_lookup_package_lookup",
1161811699
":src_trace_processor_plugins_perf_counter_perf_counter",
11700+
":src_trace_processor_plugins_perf_text_perf_text",
1161911701
":src_trace_processor_plugins_perfetto_manifest_perfetto_manifest",
1162011702
":src_trace_processor_plugins_pprof_functions_pprof_functions",
1162111703
":src_trace_processor_plugins_slice_mipmap_operator_slice_mipmap_operator",

BUILD.gn

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ if (enable_perfetto_integration_tests) {
129129
"test:integrationtest_main",
130130
]
131131
deps += perfetto_integrationtests_targets
132+
data_deps = perfetto_integrationtests_data_targets
132133
}
133134
all_targets += [
134135
":perfetto_integrationtests",

CHANGELOG

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,17 @@
11
Unreleased:
22
Tracing service and probes:
3+
* Added optional recording of the state changes of other concurrent
4+
tracing sessions, as ConcurrentSessionEvent packets. Opt-in via
5+
TraceConfig.BuiltinDataSource.enable_concurrent_session_events. Trace
6+
Processor and the UI show them as one state track per session.
37
* Added Zstd as a trace compression option alongside deflate, selected via
48
the new TraceConfig.compression field (which supersedes compression_type).
59
* The procfs scraper (process_stats data source) now writes an explicit
610
Thread message for a process' main thread, instead of leaving it implied
711
by the process entry. This fixes missing main thread names when a trace
812
is recorded using procfs alone.
13+
* Replaced TraceConfig.notes and `perfetto --add-note` with
14+
TraceConfig.trace_attributes and `--add-attribute`.
915
Trace Processor:
1016
* Added a client-server mode to `trace_processor_shell`: start a server
1117
over a unix socket (`server unix`) or WebSocket (`server http`) and
@@ -17,6 +23,8 @@ Unreleased:
1723
See https://perfetto.dev/docs/analysis/merging-traces.
1824
* Added `trace_processor_shell util merge`: packs traces and an optional
1925
manifest into a merged-trace archive and sanity-checks the result.
26+
* Trace attributes can now also come from the trace config.
27+
* perfetto_manifest files can annotate an archive via `attributes`.
2028
UI:
2129
* Opening multiple trace files is now supported by default: the "Open
2230
multiple trace files" sidebar item (or multi-selecting / dropping

docs/analysis/merging-traces.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,14 @@ or, at a higher level, the `_metadata_by_trace` view in the
225225
to a single `TraceProcessor` instance.
226226
- Archives containing archives cannot be merged recursively; merge the leaf
227227
files directly.
228+
- **Hidden files are ignored**: any archive entry whose name has a path
229+
component starting with a `.` is skipped and never parsed as a trace. This
230+
covers the metadata that archiving tools add automatically — most notably the
231+
AppleDouble resource-fork files (`._foo`) and `.DS_Store` entries that macOS
232+
`tar` and Finder-created ZIPs sprinkle next to the real files. As a result a
233+
`.tar`/`.zip` built on macOS loads without a spurious "unknown trace type"
234+
error. If you deliberately want a dot-prefixed file to be parsed, rename it so
235+
no path component starts with a `.`.
228236

229237
## Next steps
230238

docs/case-studies/android-boot-tracing.md

Lines changed: 0 additions & 79 deletions
This file was deleted.

0 commit comments

Comments
 (0)