From 07c9599ead52a2eea7164552e9525e3860a3aed5 Mon Sep 17 00:00:00 2001 From: Slava Egorov Date: Mon, 13 Oct 2025 02:09:31 -0700 Subject: [PATCH] [vm] Tweak location of Perfetto protos This CL tries to address version skew issues which occur in internal monorepo which we created by checking in *.pbzero.h files into runtime/vm/protos/*. These files refer to protozero internal headers, which in the internal monorepo come from a shared Perfetto dependency which does not necessarily match the version we pinned in our DEPS and used to generated these files. This version skew caused problems for the Perfetto team, see https://github.com/google/perfetto/pull/3195 To resolve this change layout of our repo to allow us to depend on the shared Perfetto entirely - including its version of *.pbzero.h headers. We change include paths in the VM source to #include "third_party/perfetto/protos/..." which match location of these headers in the internal monorepo. To make the code compile in the normal SDK checkout we shift location of Perfetto and checked in code: * Perfetto source moves from third_party/perfetto to third_party/perfetto/src. * Generated code moves from runtime/vm/protos into third_party/perfetto/protos. Note: experiments show that *.pbzero.h files tree-shake very well and you pay only for things that you use. That means depending on *.pbzero.h files generated from full message definitions rather than our manually tree-shaken versions does not actually increase the size of the VM binaries. We could switch our external build to do the same but this would make protoc a build time dependency, which seems excessive. TEST=ci Change-Id: I724b9d9304be83302a5d83c2337154b36a6a6964 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/454260 Commit-Queue: Slava Egorov Reviewed-by: Ben Konyi --- DEPS | 2 +- build/secondary/build_overrides/build.gni | 1 + .../perfetto/common/builtin_clock.pb.dart | 4 +- .../perfetto/common/builtin_clock.pbenum.dart | 4 +- .../perfetto/common/builtin_clock.pbjson.dart | 4 +- .../common/builtin_clock.pbserver.dart | 4 +- .../perfetto/trace/clock_snapshot.pb.dart | 4 +- .../perfetto/trace/clock_snapshot.pbjson.dart | 4 +- .../trace/clock_snapshot.pbserver.dart | 4 +- .../trace/interned_data/interned_data.pb.dart | 4 +- .../interned_data/interned_data.pbjson.dart | 4 +- .../interned_data/interned_data.pbserver.dart | 4 +- .../trace/profiling/profile_common.pb.dart | 4 +- .../profiling/profile_common.pbjson.dart | 4 +- .../profiling/profile_common.pbserver.dart | 4 +- .../trace/profiling/profile_packet.pb.dart | 4 +- .../profiling/profile_packet.pbjson.dart | 4 +- .../profiling/profile_packet.pbserver.dart | 4 +- .../src/protos/perfetto/trace/trace.pb.dart | 4 +- .../protos/perfetto/trace/trace.pbjson.dart | 4 +- .../protos/perfetto/trace/trace.pbserver.dart | 4 +- .../perfetto/trace/trace_packet.pb.dart | 4 +- .../perfetto/trace/trace_packet.pbenum.dart | 4 +- .../perfetto/trace/trace_packet.pbjson.dart | 4 +- .../perfetto/trace/trace_packet.pbserver.dart | 4 +- .../track_event/debug_annotation.pb.dart | 4 +- .../track_event/debug_annotation.pbjson.dart | 4 +- .../debug_annotation.pbserver.dart | 4 +- .../track_event/process_descriptor.pb.dart | 4 +- .../process_descriptor.pbjson.dart | 4 +- .../process_descriptor.pbserver.dart | 4 +- .../track_event/thread_descriptor.pb.dart | 4 +- .../track_event/thread_descriptor.pbjson.dart | 4 +- .../thread_descriptor.pbserver.dart | 4 +- .../track_event/track_descriptor.pb.dart | 4 +- .../track_event/track_descriptor.pbjson.dart | 4 +- .../track_descriptor.pbserver.dart | 4 +- .../trace/track_event/track_event.pb.dart | 4 +- .../trace/track_event/track_event.pbenum.dart | 4 +- .../trace/track_event/track_event.pbjson.dart | 4 +- .../track_event/track_event.pbserver.dart | 4 +- .../lib/vm_service_protos.dart | 4 +- runtime/BUILD.gn | 2 +- runtime/bin/BUILD.gn | 4 +- runtime/tools/run_clang_tidy.dart | 7 +- runtime/vm/BUILD.gn | 113 ++---------------- runtime/vm/perfetto_utils.h | 10 +- runtime/vm/profiler_service.cc | 16 +-- runtime/vm/profiler_service.h | 4 +- runtime/vm/protos/.gitignore | 3 - runtime/vm/timeline.cc | 18 +-- runtime/vm/timeline.h | 2 +- third_party/.gitignore | 3 + third_party/perfetto/.gitignore | 5 + third_party/perfetto/BUILD.gn | 91 ++++++++++++++ third_party/perfetto/README.md | 26 ++++ .../perfetto/common/builtin_clock.pbzero.h | 6 +- .../perfetto/common/builtin_clock.proto | 0 .../perfetto/trace/clock_snapshot.pbzero.h | 6 +- .../perfetto/trace/clock_snapshot.proto | 0 .../interned_data/interned_data.pbzero.h | 6 +- .../trace/interned_data/interned_data.proto | 0 .../trace/profiling/profile_common.pbzero.h | 6 +- .../trace/profiling/profile_common.proto | 0 .../trace/profiling/profile_packet.pbzero.h | 6 +- .../trace/profiling/profile_packet.proto | 0 .../protos/perfetto/trace/trace.pbzero.h | 6 +- .../protos/perfetto/trace/trace.proto | 0 .../perfetto/trace/trace_packet.pbzero.h | 6 +- .../protos/perfetto/trace/trace_packet.proto | 0 .../track_event/debug_annotation.pbzero.h | 6 +- .../trace/track_event/debug_annotation.proto | 0 .../track_event/process_descriptor.pbzero.h | 6 +- .../track_event/process_descriptor.proto | 0 .../track_event/thread_descriptor.pbzero.h | 6 +- .../trace/track_event/thread_descriptor.proto | 0 .../track_event/track_descriptor.pbzero.h | 6 +- .../trace/track_event/track_descriptor.proto | 0 .../trace/track_event/track_event.pbzero.h | 6 +- .../trace/track_event/track_event.proto | 0 .../tools/compile_perfetto_protos.dart | 16 +-- .../perfetto}/tools/protoc_gen_dart_wrapper | 2 +- .../tools/protoc_gen_dart_wrapper.bat | 0 83 files changed, 292 insertions(+), 265 deletions(-) delete mode 100644 runtime/vm/protos/.gitignore create mode 100644 third_party/perfetto/.gitignore create mode 100644 third_party/perfetto/BUILD.gn create mode 100644 third_party/perfetto/README.md rename {runtime/vm => third_party/perfetto}/protos/perfetto/common/builtin_clock.pbzero.h (89%) rename {runtime/vm => third_party/perfetto}/protos/perfetto/common/builtin_clock.proto (100%) rename {runtime/vm => third_party/perfetto}/protos/perfetto/trace/clock_snapshot.pbzero.h (97%) rename {runtime/vm => third_party/perfetto}/protos/perfetto/trace/clock_snapshot.proto (100%) rename {runtime/vm => third_party/perfetto}/protos/perfetto/trace/interned_data/interned_data.pbzero.h (98%) rename {runtime/vm => third_party/perfetto}/protos/perfetto/trace/interned_data/interned_data.proto (100%) rename {runtime/vm => third_party/perfetto}/protos/perfetto/trace/profiling/profile_common.pbzero.h (98%) rename {runtime/vm => third_party/perfetto}/protos/perfetto/trace/profiling/profile_common.proto (100%) rename {runtime/vm => third_party/perfetto}/protos/perfetto/trace/profiling/profile_packet.pbzero.h (97%) rename {runtime/vm => third_party/perfetto}/protos/perfetto/trace/profiling/profile_packet.proto (100%) rename {runtime/vm => third_party/perfetto}/protos/perfetto/trace/trace.pbzero.h (93%) rename {runtime/vm => third_party/perfetto}/protos/perfetto/trace/trace.proto (100%) rename {runtime/vm => third_party/perfetto}/protos/perfetto/trace/trace_packet.pbzero.h (98%) rename {runtime/vm => third_party/perfetto}/protos/perfetto/trace/trace_packet.proto (100%) rename {runtime/vm => third_party/perfetto}/protos/perfetto/trace/track_event/debug_annotation.pbzero.h (98%) rename {runtime/vm => third_party/perfetto}/protos/perfetto/trace/track_event/debug_annotation.proto (100%) rename {runtime/vm => third_party/perfetto}/protos/perfetto/trace/track_event/process_descriptor.pbzero.h (96%) rename {runtime/vm => third_party/perfetto}/protos/perfetto/trace/track_event/process_descriptor.proto (100%) rename {runtime/vm => third_party/perfetto}/protos/perfetto/trace/track_event/thread_descriptor.pbzero.h (96%) rename {runtime/vm => third_party/perfetto}/protos/perfetto/trace/track_event/thread_descriptor.proto (100%) rename {runtime/vm => third_party/perfetto}/protos/perfetto/trace/track_event/track_descriptor.pbzero.h (97%) rename {runtime/vm => third_party/perfetto}/protos/perfetto/trace/track_event/track_descriptor.proto (100%) rename {runtime/vm => third_party/perfetto}/protos/perfetto/trace/track_event/track_event.pbzero.h (99%) rename {runtime/vm => third_party/perfetto}/protos/perfetto/trace/track_event/track_event.proto (100%) rename {runtime/vm/protos => third_party/perfetto}/tools/compile_perfetto_protos.dart (89%) rename {runtime/vm/protos => third_party/perfetto}/tools/protoc_gen_dart_wrapper (87%) rename {runtime/vm/protos => third_party/perfetto}/tools/protoc_gen_dart_wrapper.bat (100%) diff --git a/DEPS b/DEPS index 0bb73afe6b3..6d44e9f07f5 100644 --- a/DEPS +++ b/DEPS @@ -316,7 +316,7 @@ deps = { Var("chromium_git") + "/chromium/src/third_party/jinja2.git" + "@" + Var("jinja2_rev"), - Var("dart_root") + "/third_party/perfetto": + Var("dart_root") + "/third_party/perfetto/src": Var("android_git") + "/platform/external/perfetto" + "@" + Var("perfetto_rev"), diff --git a/build/secondary/build_overrides/build.gni b/build/secondary/build_overrides/build.gni index 166dcbd1e7b..77c05ef8868 100644 --- a/build/secondary/build_overrides/build.gni +++ b/build/secondary/build_overrides/build.gni @@ -6,3 +6,4 @@ # targets to distinguish embedder builds from Perfetto standalone builds, and # builds in the Android tree. perfetto_build_with_embedder = true +perfetto_root_path = "//third_party/perfetto/src/" diff --git a/pkg/vm_service_protos/lib/src/protos/perfetto/common/builtin_clock.pb.dart b/pkg/vm_service_protos/lib/src/protos/perfetto/common/builtin_clock.pb.dart index 1e77a4acd0a..0623393e6bd 100644 --- a/pkg/vm_service_protos/lib/src/protos/perfetto/common/builtin_clock.pb.dart +++ b/pkg/vm_service_protos/lib/src/protos/perfetto/common/builtin_clock.pb.dart @@ -4,8 +4,8 @@ // IMPORTANT: This file should only ever be modified by modifying the // corresponding .proto file and then running -// `dart runtime/vm/protos/tools/compile_perfetto_protos.dart` from the SDK root -// directory. +// `dart third_party/perfetto/tools/compile_perfetto_protos.dart` from the +// SDK root directory. // // Generated code. Do not modify. // source: protos/perfetto/common/builtin_clock.proto diff --git a/pkg/vm_service_protos/lib/src/protos/perfetto/common/builtin_clock.pbenum.dart b/pkg/vm_service_protos/lib/src/protos/perfetto/common/builtin_clock.pbenum.dart index 3263cf46f76..47712094ce5 100644 --- a/pkg/vm_service_protos/lib/src/protos/perfetto/common/builtin_clock.pbenum.dart +++ b/pkg/vm_service_protos/lib/src/protos/perfetto/common/builtin_clock.pbenum.dart @@ -4,8 +4,8 @@ // IMPORTANT: This file should only ever be modified by modifying the // corresponding .proto file and then running -// `dart runtime/vm/protos/tools/compile_perfetto_protos.dart` from the SDK root -// directory. +// `dart third_party/perfetto/tools/compile_perfetto_protos.dart` from the +// SDK root directory. // // Generated code. Do not modify. // source: protos/perfetto/common/builtin_clock.proto diff --git a/pkg/vm_service_protos/lib/src/protos/perfetto/common/builtin_clock.pbjson.dart b/pkg/vm_service_protos/lib/src/protos/perfetto/common/builtin_clock.pbjson.dart index f090dab1874..be263f8876d 100644 --- a/pkg/vm_service_protos/lib/src/protos/perfetto/common/builtin_clock.pbjson.dart +++ b/pkg/vm_service_protos/lib/src/protos/perfetto/common/builtin_clock.pbjson.dart @@ -4,8 +4,8 @@ // IMPORTANT: This file should only ever be modified by modifying the // corresponding .proto file and then running -// `dart runtime/vm/protos/tools/compile_perfetto_protos.dart` from the SDK root -// directory. +// `dart third_party/perfetto/tools/compile_perfetto_protos.dart` from the +// SDK root directory. // // Generated code. Do not modify. // source: protos/perfetto/common/builtin_clock.proto diff --git a/pkg/vm_service_protos/lib/src/protos/perfetto/common/builtin_clock.pbserver.dart b/pkg/vm_service_protos/lib/src/protos/perfetto/common/builtin_clock.pbserver.dart index be2032e82cd..b563b3ceb8f 100644 --- a/pkg/vm_service_protos/lib/src/protos/perfetto/common/builtin_clock.pbserver.dart +++ b/pkg/vm_service_protos/lib/src/protos/perfetto/common/builtin_clock.pbserver.dart @@ -4,8 +4,8 @@ // IMPORTANT: This file should only ever be modified by modifying the // corresponding .proto file and then running -// `dart runtime/vm/protos/tools/compile_perfetto_protos.dart` from the SDK root -// directory. +// `dart third_party/perfetto/tools/compile_perfetto_protos.dart` from the +// SDK root directory. // // Generated code. Do not modify. // source: protos/perfetto/common/builtin_clock.proto diff --git a/pkg/vm_service_protos/lib/src/protos/perfetto/trace/clock_snapshot.pb.dart b/pkg/vm_service_protos/lib/src/protos/perfetto/trace/clock_snapshot.pb.dart index a33091e0b4f..8cb45c27872 100644 --- a/pkg/vm_service_protos/lib/src/protos/perfetto/trace/clock_snapshot.pb.dart +++ b/pkg/vm_service_protos/lib/src/protos/perfetto/trace/clock_snapshot.pb.dart @@ -4,8 +4,8 @@ // IMPORTANT: This file should only ever be modified by modifying the // corresponding .proto file and then running -// `dart runtime/vm/protos/tools/compile_perfetto_protos.dart` from the SDK root -// directory. +// `dart third_party/perfetto/tools/compile_perfetto_protos.dart` from the +// SDK root directory. // // Generated code. Do not modify. // source: protos/perfetto/trace/clock_snapshot.proto diff --git a/pkg/vm_service_protos/lib/src/protos/perfetto/trace/clock_snapshot.pbjson.dart b/pkg/vm_service_protos/lib/src/protos/perfetto/trace/clock_snapshot.pbjson.dart index d65f31a5094..2511507b5ea 100644 --- a/pkg/vm_service_protos/lib/src/protos/perfetto/trace/clock_snapshot.pbjson.dart +++ b/pkg/vm_service_protos/lib/src/protos/perfetto/trace/clock_snapshot.pbjson.dart @@ -4,8 +4,8 @@ // IMPORTANT: This file should only ever be modified by modifying the // corresponding .proto file and then running -// `dart runtime/vm/protos/tools/compile_perfetto_protos.dart` from the SDK root -// directory. +// `dart third_party/perfetto/tools/compile_perfetto_protos.dart` from the +// SDK root directory. // // Generated code. Do not modify. // source: protos/perfetto/trace/clock_snapshot.proto diff --git a/pkg/vm_service_protos/lib/src/protos/perfetto/trace/clock_snapshot.pbserver.dart b/pkg/vm_service_protos/lib/src/protos/perfetto/trace/clock_snapshot.pbserver.dart index 1fb2e0ab4c8..d1cdf54ac48 100644 --- a/pkg/vm_service_protos/lib/src/protos/perfetto/trace/clock_snapshot.pbserver.dart +++ b/pkg/vm_service_protos/lib/src/protos/perfetto/trace/clock_snapshot.pbserver.dart @@ -4,8 +4,8 @@ // IMPORTANT: This file should only ever be modified by modifying the // corresponding .proto file and then running -// `dart runtime/vm/protos/tools/compile_perfetto_protos.dart` from the SDK root -// directory. +// `dart third_party/perfetto/tools/compile_perfetto_protos.dart` from the +// SDK root directory. // // Generated code. Do not modify. // source: protos/perfetto/trace/clock_snapshot.proto diff --git a/pkg/vm_service_protos/lib/src/protos/perfetto/trace/interned_data/interned_data.pb.dart b/pkg/vm_service_protos/lib/src/protos/perfetto/trace/interned_data/interned_data.pb.dart index 4b343185a59..ed86ccd267e 100644 --- a/pkg/vm_service_protos/lib/src/protos/perfetto/trace/interned_data/interned_data.pb.dart +++ b/pkg/vm_service_protos/lib/src/protos/perfetto/trace/interned_data/interned_data.pb.dart @@ -4,8 +4,8 @@ // IMPORTANT: This file should only ever be modified by modifying the // corresponding .proto file and then running -// `dart runtime/vm/protos/tools/compile_perfetto_protos.dart` from the SDK root -// directory. +// `dart third_party/perfetto/tools/compile_perfetto_protos.dart` from the +// SDK root directory. // // Generated code. Do not modify. // source: protos/perfetto/trace/interned_data/interned_data.proto diff --git a/pkg/vm_service_protos/lib/src/protos/perfetto/trace/interned_data/interned_data.pbjson.dart b/pkg/vm_service_protos/lib/src/protos/perfetto/trace/interned_data/interned_data.pbjson.dart index 1ac1448a5cf..71190b5d1ea 100644 --- a/pkg/vm_service_protos/lib/src/protos/perfetto/trace/interned_data/interned_data.pbjson.dart +++ b/pkg/vm_service_protos/lib/src/protos/perfetto/trace/interned_data/interned_data.pbjson.dart @@ -4,8 +4,8 @@ // IMPORTANT: This file should only ever be modified by modifying the // corresponding .proto file and then running -// `dart runtime/vm/protos/tools/compile_perfetto_protos.dart` from the SDK root -// directory. +// `dart third_party/perfetto/tools/compile_perfetto_protos.dart` from the +// SDK root directory. // // Generated code. Do not modify. // source: protos/perfetto/trace/interned_data/interned_data.proto diff --git a/pkg/vm_service_protos/lib/src/protos/perfetto/trace/interned_data/interned_data.pbserver.dart b/pkg/vm_service_protos/lib/src/protos/perfetto/trace/interned_data/interned_data.pbserver.dart index 4e5a69b1b8b..f363a3f75cb 100644 --- a/pkg/vm_service_protos/lib/src/protos/perfetto/trace/interned_data/interned_data.pbserver.dart +++ b/pkg/vm_service_protos/lib/src/protos/perfetto/trace/interned_data/interned_data.pbserver.dart @@ -4,8 +4,8 @@ // IMPORTANT: This file should only ever be modified by modifying the // corresponding .proto file and then running -// `dart runtime/vm/protos/tools/compile_perfetto_protos.dart` from the SDK root -// directory. +// `dart third_party/perfetto/tools/compile_perfetto_protos.dart` from the +// SDK root directory. // // Generated code. Do not modify. // source: protos/perfetto/trace/interned_data/interned_data.proto diff --git a/pkg/vm_service_protos/lib/src/protos/perfetto/trace/profiling/profile_common.pb.dart b/pkg/vm_service_protos/lib/src/protos/perfetto/trace/profiling/profile_common.pb.dart index 706adf66f2f..74fbcfd1213 100644 --- a/pkg/vm_service_protos/lib/src/protos/perfetto/trace/profiling/profile_common.pb.dart +++ b/pkg/vm_service_protos/lib/src/protos/perfetto/trace/profiling/profile_common.pb.dart @@ -4,8 +4,8 @@ // IMPORTANT: This file should only ever be modified by modifying the // corresponding .proto file and then running -// `dart runtime/vm/protos/tools/compile_perfetto_protos.dart` from the SDK root -// directory. +// `dart third_party/perfetto/tools/compile_perfetto_protos.dart` from the +// SDK root directory. // // Generated code. Do not modify. // source: protos/perfetto/trace/profiling/profile_common.proto diff --git a/pkg/vm_service_protos/lib/src/protos/perfetto/trace/profiling/profile_common.pbjson.dart b/pkg/vm_service_protos/lib/src/protos/perfetto/trace/profiling/profile_common.pbjson.dart index 3c74a5a7c14..25262f0f7a7 100644 --- a/pkg/vm_service_protos/lib/src/protos/perfetto/trace/profiling/profile_common.pbjson.dart +++ b/pkg/vm_service_protos/lib/src/protos/perfetto/trace/profiling/profile_common.pbjson.dart @@ -4,8 +4,8 @@ // IMPORTANT: This file should only ever be modified by modifying the // corresponding .proto file and then running -// `dart runtime/vm/protos/tools/compile_perfetto_protos.dart` from the SDK root -// directory. +// `dart third_party/perfetto/tools/compile_perfetto_protos.dart` from the +// SDK root directory. // // Generated code. Do not modify. // source: protos/perfetto/trace/profiling/profile_common.proto diff --git a/pkg/vm_service_protos/lib/src/protos/perfetto/trace/profiling/profile_common.pbserver.dart b/pkg/vm_service_protos/lib/src/protos/perfetto/trace/profiling/profile_common.pbserver.dart index a894908a3b0..a9f6713f9bb 100644 --- a/pkg/vm_service_protos/lib/src/protos/perfetto/trace/profiling/profile_common.pbserver.dart +++ b/pkg/vm_service_protos/lib/src/protos/perfetto/trace/profiling/profile_common.pbserver.dart @@ -4,8 +4,8 @@ // IMPORTANT: This file should only ever be modified by modifying the // corresponding .proto file and then running -// `dart runtime/vm/protos/tools/compile_perfetto_protos.dart` from the SDK root -// directory. +// `dart third_party/perfetto/tools/compile_perfetto_protos.dart` from the +// SDK root directory. // // Generated code. Do not modify. // source: protos/perfetto/trace/profiling/profile_common.proto diff --git a/pkg/vm_service_protos/lib/src/protos/perfetto/trace/profiling/profile_packet.pb.dart b/pkg/vm_service_protos/lib/src/protos/perfetto/trace/profiling/profile_packet.pb.dart index 1b31571f585..464f581dc28 100644 --- a/pkg/vm_service_protos/lib/src/protos/perfetto/trace/profiling/profile_packet.pb.dart +++ b/pkg/vm_service_protos/lib/src/protos/perfetto/trace/profiling/profile_packet.pb.dart @@ -4,8 +4,8 @@ // IMPORTANT: This file should only ever be modified by modifying the // corresponding .proto file and then running -// `dart runtime/vm/protos/tools/compile_perfetto_protos.dart` from the SDK root -// directory. +// `dart third_party/perfetto/tools/compile_perfetto_protos.dart` from the +// SDK root directory. // // Generated code. Do not modify. // source: protos/perfetto/trace/profiling/profile_packet.proto diff --git a/pkg/vm_service_protos/lib/src/protos/perfetto/trace/profiling/profile_packet.pbjson.dart b/pkg/vm_service_protos/lib/src/protos/perfetto/trace/profiling/profile_packet.pbjson.dart index 1fca7143da9..d97d95a9123 100644 --- a/pkg/vm_service_protos/lib/src/protos/perfetto/trace/profiling/profile_packet.pbjson.dart +++ b/pkg/vm_service_protos/lib/src/protos/perfetto/trace/profiling/profile_packet.pbjson.dart @@ -4,8 +4,8 @@ // IMPORTANT: This file should only ever be modified by modifying the // corresponding .proto file and then running -// `dart runtime/vm/protos/tools/compile_perfetto_protos.dart` from the SDK root -// directory. +// `dart third_party/perfetto/tools/compile_perfetto_protos.dart` from the +// SDK root directory. // // Generated code. Do not modify. // source: protos/perfetto/trace/profiling/profile_packet.proto diff --git a/pkg/vm_service_protos/lib/src/protos/perfetto/trace/profiling/profile_packet.pbserver.dart b/pkg/vm_service_protos/lib/src/protos/perfetto/trace/profiling/profile_packet.pbserver.dart index af7d4bfcf9c..019ab33ec4b 100644 --- a/pkg/vm_service_protos/lib/src/protos/perfetto/trace/profiling/profile_packet.pbserver.dart +++ b/pkg/vm_service_protos/lib/src/protos/perfetto/trace/profiling/profile_packet.pbserver.dart @@ -4,8 +4,8 @@ // IMPORTANT: This file should only ever be modified by modifying the // corresponding .proto file and then running -// `dart runtime/vm/protos/tools/compile_perfetto_protos.dart` from the SDK root -// directory. +// `dart third_party/perfetto/tools/compile_perfetto_protos.dart` from the +// SDK root directory. // // Generated code. Do not modify. // source: protos/perfetto/trace/profiling/profile_packet.proto diff --git a/pkg/vm_service_protos/lib/src/protos/perfetto/trace/trace.pb.dart b/pkg/vm_service_protos/lib/src/protos/perfetto/trace/trace.pb.dart index f9152f2bb7c..a7c390634dd 100644 --- a/pkg/vm_service_protos/lib/src/protos/perfetto/trace/trace.pb.dart +++ b/pkg/vm_service_protos/lib/src/protos/perfetto/trace/trace.pb.dart @@ -4,8 +4,8 @@ // IMPORTANT: This file should only ever be modified by modifying the // corresponding .proto file and then running -// `dart runtime/vm/protos/tools/compile_perfetto_protos.dart` from the SDK root -// directory. +// `dart third_party/perfetto/tools/compile_perfetto_protos.dart` from the +// SDK root directory. // // Generated code. Do not modify. // source: protos/perfetto/trace/trace.proto diff --git a/pkg/vm_service_protos/lib/src/protos/perfetto/trace/trace.pbjson.dart b/pkg/vm_service_protos/lib/src/protos/perfetto/trace/trace.pbjson.dart index 31dc2f324ae..c5d10e7d04e 100644 --- a/pkg/vm_service_protos/lib/src/protos/perfetto/trace/trace.pbjson.dart +++ b/pkg/vm_service_protos/lib/src/protos/perfetto/trace/trace.pbjson.dart @@ -4,8 +4,8 @@ // IMPORTANT: This file should only ever be modified by modifying the // corresponding .proto file and then running -// `dart runtime/vm/protos/tools/compile_perfetto_protos.dart` from the SDK root -// directory. +// `dart third_party/perfetto/tools/compile_perfetto_protos.dart` from the +// SDK root directory. // // Generated code. Do not modify. // source: protos/perfetto/trace/trace.proto diff --git a/pkg/vm_service_protos/lib/src/protos/perfetto/trace/trace.pbserver.dart b/pkg/vm_service_protos/lib/src/protos/perfetto/trace/trace.pbserver.dart index 64f074e7a6e..aeafa2b6cab 100644 --- a/pkg/vm_service_protos/lib/src/protos/perfetto/trace/trace.pbserver.dart +++ b/pkg/vm_service_protos/lib/src/protos/perfetto/trace/trace.pbserver.dart @@ -4,8 +4,8 @@ // IMPORTANT: This file should only ever be modified by modifying the // corresponding .proto file and then running -// `dart runtime/vm/protos/tools/compile_perfetto_protos.dart` from the SDK root -// directory. +// `dart third_party/perfetto/tools/compile_perfetto_protos.dart` from the +// SDK root directory. // // Generated code. Do not modify. // source: protos/perfetto/trace/trace.proto diff --git a/pkg/vm_service_protos/lib/src/protos/perfetto/trace/trace_packet.pb.dart b/pkg/vm_service_protos/lib/src/protos/perfetto/trace/trace_packet.pb.dart index 8b79536625f..8d953a8847c 100644 --- a/pkg/vm_service_protos/lib/src/protos/perfetto/trace/trace_packet.pb.dart +++ b/pkg/vm_service_protos/lib/src/protos/perfetto/trace/trace_packet.pb.dart @@ -4,8 +4,8 @@ // IMPORTANT: This file should only ever be modified by modifying the // corresponding .proto file and then running -// `dart runtime/vm/protos/tools/compile_perfetto_protos.dart` from the SDK root -// directory. +// `dart third_party/perfetto/tools/compile_perfetto_protos.dart` from the +// SDK root directory. // // Generated code. Do not modify. // source: protos/perfetto/trace/trace_packet.proto diff --git a/pkg/vm_service_protos/lib/src/protos/perfetto/trace/trace_packet.pbenum.dart b/pkg/vm_service_protos/lib/src/protos/perfetto/trace/trace_packet.pbenum.dart index a7c480b77d3..2ddf7f19a8e 100644 --- a/pkg/vm_service_protos/lib/src/protos/perfetto/trace/trace_packet.pbenum.dart +++ b/pkg/vm_service_protos/lib/src/protos/perfetto/trace/trace_packet.pbenum.dart @@ -4,8 +4,8 @@ // IMPORTANT: This file should only ever be modified by modifying the // corresponding .proto file and then running -// `dart runtime/vm/protos/tools/compile_perfetto_protos.dart` from the SDK root -// directory. +// `dart third_party/perfetto/tools/compile_perfetto_protos.dart` from the +// SDK root directory. // // Generated code. Do not modify. // source: protos/perfetto/trace/trace_packet.proto diff --git a/pkg/vm_service_protos/lib/src/protos/perfetto/trace/trace_packet.pbjson.dart b/pkg/vm_service_protos/lib/src/protos/perfetto/trace/trace_packet.pbjson.dart index 4ab2a938789..bdbbc55ead0 100644 --- a/pkg/vm_service_protos/lib/src/protos/perfetto/trace/trace_packet.pbjson.dart +++ b/pkg/vm_service_protos/lib/src/protos/perfetto/trace/trace_packet.pbjson.dart @@ -4,8 +4,8 @@ // IMPORTANT: This file should only ever be modified by modifying the // corresponding .proto file and then running -// `dart runtime/vm/protos/tools/compile_perfetto_protos.dart` from the SDK root -// directory. +// `dart third_party/perfetto/tools/compile_perfetto_protos.dart` from the +// SDK root directory. // // Generated code. Do not modify. // source: protos/perfetto/trace/trace_packet.proto diff --git a/pkg/vm_service_protos/lib/src/protos/perfetto/trace/trace_packet.pbserver.dart b/pkg/vm_service_protos/lib/src/protos/perfetto/trace/trace_packet.pbserver.dart index 6d80ceb88bd..d9e7960806b 100644 --- a/pkg/vm_service_protos/lib/src/protos/perfetto/trace/trace_packet.pbserver.dart +++ b/pkg/vm_service_protos/lib/src/protos/perfetto/trace/trace_packet.pbserver.dart @@ -4,8 +4,8 @@ // IMPORTANT: This file should only ever be modified by modifying the // corresponding .proto file and then running -// `dart runtime/vm/protos/tools/compile_perfetto_protos.dart` from the SDK root -// directory. +// `dart third_party/perfetto/tools/compile_perfetto_protos.dart` from the +// SDK root directory. // // Generated code. Do not modify. // source: protos/perfetto/trace/trace_packet.proto diff --git a/pkg/vm_service_protos/lib/src/protos/perfetto/trace/track_event/debug_annotation.pb.dart b/pkg/vm_service_protos/lib/src/protos/perfetto/trace/track_event/debug_annotation.pb.dart index e4f37412b3f..75c48665543 100644 --- a/pkg/vm_service_protos/lib/src/protos/perfetto/trace/track_event/debug_annotation.pb.dart +++ b/pkg/vm_service_protos/lib/src/protos/perfetto/trace/track_event/debug_annotation.pb.dart @@ -4,8 +4,8 @@ // IMPORTANT: This file should only ever be modified by modifying the // corresponding .proto file and then running -// `dart runtime/vm/protos/tools/compile_perfetto_protos.dart` from the SDK root -// directory. +// `dart third_party/perfetto/tools/compile_perfetto_protos.dart` from the +// SDK root directory. // // Generated code. Do not modify. // source: protos/perfetto/trace/track_event/debug_annotation.proto diff --git a/pkg/vm_service_protos/lib/src/protos/perfetto/trace/track_event/debug_annotation.pbjson.dart b/pkg/vm_service_protos/lib/src/protos/perfetto/trace/track_event/debug_annotation.pbjson.dart index 60ac7418151..98a4b9799ab 100644 --- a/pkg/vm_service_protos/lib/src/protos/perfetto/trace/track_event/debug_annotation.pbjson.dart +++ b/pkg/vm_service_protos/lib/src/protos/perfetto/trace/track_event/debug_annotation.pbjson.dart @@ -4,8 +4,8 @@ // IMPORTANT: This file should only ever be modified by modifying the // corresponding .proto file and then running -// `dart runtime/vm/protos/tools/compile_perfetto_protos.dart` from the SDK root -// directory. +// `dart third_party/perfetto/tools/compile_perfetto_protos.dart` from the +// SDK root directory. // // Generated code. Do not modify. // source: protos/perfetto/trace/track_event/debug_annotation.proto diff --git a/pkg/vm_service_protos/lib/src/protos/perfetto/trace/track_event/debug_annotation.pbserver.dart b/pkg/vm_service_protos/lib/src/protos/perfetto/trace/track_event/debug_annotation.pbserver.dart index addacd25483..589ca4faf36 100644 --- a/pkg/vm_service_protos/lib/src/protos/perfetto/trace/track_event/debug_annotation.pbserver.dart +++ b/pkg/vm_service_protos/lib/src/protos/perfetto/trace/track_event/debug_annotation.pbserver.dart @@ -4,8 +4,8 @@ // IMPORTANT: This file should only ever be modified by modifying the // corresponding .proto file and then running -// `dart runtime/vm/protos/tools/compile_perfetto_protos.dart` from the SDK root -// directory. +// `dart third_party/perfetto/tools/compile_perfetto_protos.dart` from the +// SDK root directory. // // Generated code. Do not modify. // source: protos/perfetto/trace/track_event/debug_annotation.proto diff --git a/pkg/vm_service_protos/lib/src/protos/perfetto/trace/track_event/process_descriptor.pb.dart b/pkg/vm_service_protos/lib/src/protos/perfetto/trace/track_event/process_descriptor.pb.dart index 53085d05ab8..aa5b823fd89 100644 --- a/pkg/vm_service_protos/lib/src/protos/perfetto/trace/track_event/process_descriptor.pb.dart +++ b/pkg/vm_service_protos/lib/src/protos/perfetto/trace/track_event/process_descriptor.pb.dart @@ -4,8 +4,8 @@ // IMPORTANT: This file should only ever be modified by modifying the // corresponding .proto file and then running -// `dart runtime/vm/protos/tools/compile_perfetto_protos.dart` from the SDK root -// directory. +// `dart third_party/perfetto/tools/compile_perfetto_protos.dart` from the +// SDK root directory. // // Generated code. Do not modify. // source: protos/perfetto/trace/track_event/process_descriptor.proto diff --git a/pkg/vm_service_protos/lib/src/protos/perfetto/trace/track_event/process_descriptor.pbjson.dart b/pkg/vm_service_protos/lib/src/protos/perfetto/trace/track_event/process_descriptor.pbjson.dart index 364b3c32dbd..a35a6b0e2c4 100644 --- a/pkg/vm_service_protos/lib/src/protos/perfetto/trace/track_event/process_descriptor.pbjson.dart +++ b/pkg/vm_service_protos/lib/src/protos/perfetto/trace/track_event/process_descriptor.pbjson.dart @@ -4,8 +4,8 @@ // IMPORTANT: This file should only ever be modified by modifying the // corresponding .proto file and then running -// `dart runtime/vm/protos/tools/compile_perfetto_protos.dart` from the SDK root -// directory. +// `dart third_party/perfetto/tools/compile_perfetto_protos.dart` from the +// SDK root directory. // // Generated code. Do not modify. // source: protos/perfetto/trace/track_event/process_descriptor.proto diff --git a/pkg/vm_service_protos/lib/src/protos/perfetto/trace/track_event/process_descriptor.pbserver.dart b/pkg/vm_service_protos/lib/src/protos/perfetto/trace/track_event/process_descriptor.pbserver.dart index 40c39d4229d..462fcb38f86 100644 --- a/pkg/vm_service_protos/lib/src/protos/perfetto/trace/track_event/process_descriptor.pbserver.dart +++ b/pkg/vm_service_protos/lib/src/protos/perfetto/trace/track_event/process_descriptor.pbserver.dart @@ -4,8 +4,8 @@ // IMPORTANT: This file should only ever be modified by modifying the // corresponding .proto file and then running -// `dart runtime/vm/protos/tools/compile_perfetto_protos.dart` from the SDK root -// directory. +// `dart third_party/perfetto/tools/compile_perfetto_protos.dart` from the +// SDK root directory. // // Generated code. Do not modify. // source: protos/perfetto/trace/track_event/process_descriptor.proto diff --git a/pkg/vm_service_protos/lib/src/protos/perfetto/trace/track_event/thread_descriptor.pb.dart b/pkg/vm_service_protos/lib/src/protos/perfetto/trace/track_event/thread_descriptor.pb.dart index 509ed3cd8a8..8a8588a7ebd 100644 --- a/pkg/vm_service_protos/lib/src/protos/perfetto/trace/track_event/thread_descriptor.pb.dart +++ b/pkg/vm_service_protos/lib/src/protos/perfetto/trace/track_event/thread_descriptor.pb.dart @@ -4,8 +4,8 @@ // IMPORTANT: This file should only ever be modified by modifying the // corresponding .proto file and then running -// `dart runtime/vm/protos/tools/compile_perfetto_protos.dart` from the SDK root -// directory. +// `dart third_party/perfetto/tools/compile_perfetto_protos.dart` from the +// SDK root directory. // // Generated code. Do not modify. // source: protos/perfetto/trace/track_event/thread_descriptor.proto diff --git a/pkg/vm_service_protos/lib/src/protos/perfetto/trace/track_event/thread_descriptor.pbjson.dart b/pkg/vm_service_protos/lib/src/protos/perfetto/trace/track_event/thread_descriptor.pbjson.dart index afe6fac3e51..8e7ada854d5 100644 --- a/pkg/vm_service_protos/lib/src/protos/perfetto/trace/track_event/thread_descriptor.pbjson.dart +++ b/pkg/vm_service_protos/lib/src/protos/perfetto/trace/track_event/thread_descriptor.pbjson.dart @@ -4,8 +4,8 @@ // IMPORTANT: This file should only ever be modified by modifying the // corresponding .proto file and then running -// `dart runtime/vm/protos/tools/compile_perfetto_protos.dart` from the SDK root -// directory. +// `dart third_party/perfetto/tools/compile_perfetto_protos.dart` from the +// SDK root directory. // // Generated code. Do not modify. // source: protos/perfetto/trace/track_event/thread_descriptor.proto diff --git a/pkg/vm_service_protos/lib/src/protos/perfetto/trace/track_event/thread_descriptor.pbserver.dart b/pkg/vm_service_protos/lib/src/protos/perfetto/trace/track_event/thread_descriptor.pbserver.dart index 6a215853ebe..1a9546d4edf 100644 --- a/pkg/vm_service_protos/lib/src/protos/perfetto/trace/track_event/thread_descriptor.pbserver.dart +++ b/pkg/vm_service_protos/lib/src/protos/perfetto/trace/track_event/thread_descriptor.pbserver.dart @@ -4,8 +4,8 @@ // IMPORTANT: This file should only ever be modified by modifying the // corresponding .proto file and then running -// `dart runtime/vm/protos/tools/compile_perfetto_protos.dart` from the SDK root -// directory. +// `dart third_party/perfetto/tools/compile_perfetto_protos.dart` from the +// SDK root directory. // // Generated code. Do not modify. // source: protos/perfetto/trace/track_event/thread_descriptor.proto diff --git a/pkg/vm_service_protos/lib/src/protos/perfetto/trace/track_event/track_descriptor.pb.dart b/pkg/vm_service_protos/lib/src/protos/perfetto/trace/track_event/track_descriptor.pb.dart index d3f87e69042..55bccab134f 100644 --- a/pkg/vm_service_protos/lib/src/protos/perfetto/trace/track_event/track_descriptor.pb.dart +++ b/pkg/vm_service_protos/lib/src/protos/perfetto/trace/track_event/track_descriptor.pb.dart @@ -4,8 +4,8 @@ // IMPORTANT: This file should only ever be modified by modifying the // corresponding .proto file and then running -// `dart runtime/vm/protos/tools/compile_perfetto_protos.dart` from the SDK root -// directory. +// `dart third_party/perfetto/tools/compile_perfetto_protos.dart` from the +// SDK root directory. // // Generated code. Do not modify. // source: protos/perfetto/trace/track_event/track_descriptor.proto diff --git a/pkg/vm_service_protos/lib/src/protos/perfetto/trace/track_event/track_descriptor.pbjson.dart b/pkg/vm_service_protos/lib/src/protos/perfetto/trace/track_event/track_descriptor.pbjson.dart index d1609aafdf8..cd942ba3b48 100644 --- a/pkg/vm_service_protos/lib/src/protos/perfetto/trace/track_event/track_descriptor.pbjson.dart +++ b/pkg/vm_service_protos/lib/src/protos/perfetto/trace/track_event/track_descriptor.pbjson.dart @@ -4,8 +4,8 @@ // IMPORTANT: This file should only ever be modified by modifying the // corresponding .proto file and then running -// `dart runtime/vm/protos/tools/compile_perfetto_protos.dart` from the SDK root -// directory. +// `dart third_party/perfetto/tools/compile_perfetto_protos.dart` from the +// SDK root directory. // // Generated code. Do not modify. // source: protos/perfetto/trace/track_event/track_descriptor.proto diff --git a/pkg/vm_service_protos/lib/src/protos/perfetto/trace/track_event/track_descriptor.pbserver.dart b/pkg/vm_service_protos/lib/src/protos/perfetto/trace/track_event/track_descriptor.pbserver.dart index 4258b14f40c..94e9c3e58f2 100644 --- a/pkg/vm_service_protos/lib/src/protos/perfetto/trace/track_event/track_descriptor.pbserver.dart +++ b/pkg/vm_service_protos/lib/src/protos/perfetto/trace/track_event/track_descriptor.pbserver.dart @@ -4,8 +4,8 @@ // IMPORTANT: This file should only ever be modified by modifying the // corresponding .proto file and then running -// `dart runtime/vm/protos/tools/compile_perfetto_protos.dart` from the SDK root -// directory. +// `dart third_party/perfetto/tools/compile_perfetto_protos.dart` from the +// SDK root directory. // // Generated code. Do not modify. // source: protos/perfetto/trace/track_event/track_descriptor.proto diff --git a/pkg/vm_service_protos/lib/src/protos/perfetto/trace/track_event/track_event.pb.dart b/pkg/vm_service_protos/lib/src/protos/perfetto/trace/track_event/track_event.pb.dart index f420f5ce008..ca133431317 100644 --- a/pkg/vm_service_protos/lib/src/protos/perfetto/trace/track_event/track_event.pb.dart +++ b/pkg/vm_service_protos/lib/src/protos/perfetto/trace/track_event/track_event.pb.dart @@ -4,8 +4,8 @@ // IMPORTANT: This file should only ever be modified by modifying the // corresponding .proto file and then running -// `dart runtime/vm/protos/tools/compile_perfetto_protos.dart` from the SDK root -// directory. +// `dart third_party/perfetto/tools/compile_perfetto_protos.dart` from the +// SDK root directory. // // Generated code. Do not modify. // source: protos/perfetto/trace/track_event/track_event.proto diff --git a/pkg/vm_service_protos/lib/src/protos/perfetto/trace/track_event/track_event.pbenum.dart b/pkg/vm_service_protos/lib/src/protos/perfetto/trace/track_event/track_event.pbenum.dart index 0f434ebd88d..264b3cbc4ef 100644 --- a/pkg/vm_service_protos/lib/src/protos/perfetto/trace/track_event/track_event.pbenum.dart +++ b/pkg/vm_service_protos/lib/src/protos/perfetto/trace/track_event/track_event.pbenum.dart @@ -4,8 +4,8 @@ // IMPORTANT: This file should only ever be modified by modifying the // corresponding .proto file and then running -// `dart runtime/vm/protos/tools/compile_perfetto_protos.dart` from the SDK root -// directory. +// `dart third_party/perfetto/tools/compile_perfetto_protos.dart` from the +// SDK root directory. // // Generated code. Do not modify. // source: protos/perfetto/trace/track_event/track_event.proto diff --git a/pkg/vm_service_protos/lib/src/protos/perfetto/trace/track_event/track_event.pbjson.dart b/pkg/vm_service_protos/lib/src/protos/perfetto/trace/track_event/track_event.pbjson.dart index 74bca176ffd..daf0f9e3712 100644 --- a/pkg/vm_service_protos/lib/src/protos/perfetto/trace/track_event/track_event.pbjson.dart +++ b/pkg/vm_service_protos/lib/src/protos/perfetto/trace/track_event/track_event.pbjson.dart @@ -4,8 +4,8 @@ // IMPORTANT: This file should only ever be modified by modifying the // corresponding .proto file and then running -// `dart runtime/vm/protos/tools/compile_perfetto_protos.dart` from the SDK root -// directory. +// `dart third_party/perfetto/tools/compile_perfetto_protos.dart` from the +// SDK root directory. // // Generated code. Do not modify. // source: protos/perfetto/trace/track_event/track_event.proto diff --git a/pkg/vm_service_protos/lib/src/protos/perfetto/trace/track_event/track_event.pbserver.dart b/pkg/vm_service_protos/lib/src/protos/perfetto/trace/track_event/track_event.pbserver.dart index 07106a79632..602c345ba82 100644 --- a/pkg/vm_service_protos/lib/src/protos/perfetto/trace/track_event/track_event.pbserver.dart +++ b/pkg/vm_service_protos/lib/src/protos/perfetto/trace/track_event/track_event.pbserver.dart @@ -4,8 +4,8 @@ // IMPORTANT: This file should only ever be modified by modifying the // corresponding .proto file and then running -// `dart runtime/vm/protos/tools/compile_perfetto_protos.dart` from the SDK root -// directory. +// `dart third_party/perfetto/tools/compile_perfetto_protos.dart` from the +// SDK root directory. // // Generated code. Do not modify. // source: protos/perfetto/trace/track_event/track_event.proto diff --git a/pkg/vm_service_protos/lib/vm_service_protos.dart b/pkg/vm_service_protos/lib/vm_service_protos.dart index 6dc1348fc71..66b102c3944 100644 --- a/pkg/vm_service_protos/lib/vm_service_protos.dart +++ b/pkg/vm_service_protos/lib/vm_service_protos.dart @@ -4,8 +4,8 @@ // IMPORTANT: This file should only ever be modified by modifying the // corresponding .proto file and then running -// `dart runtime/vm/protos/tools/compile_perfetto_protos.dart` from the SDK root -// directory. +// `dart third_party/perfetto/tools/compile_perfetto_protos.dart` from the +// SDK root directory. export 'src/protos/perfetto/common/builtin_clock.pb.dart'; export 'src/protos/perfetto/common/builtin_clock.pbenum.dart'; diff --git a/runtime/BUILD.gn b/runtime/BUILD.gn index dfa1dbc836d..7d2bce8b77f 100644 --- a/runtime/BUILD.gn +++ b/runtime/BUILD.gn @@ -361,7 +361,7 @@ library_for_all_configs("libdart") { target_type = dart_component_kind extra_nonproduct_deps = [] if (dart_support_perfetto) { - extra_nonproduct_deps += [ "vm:libprotozero" ] + extra_nonproduct_deps += [ "//third_party/perfetto:libprotozero" ] } extra_deps = [ ":generate_version_cc_file", diff --git a/runtime/bin/BUILD.gn b/runtime/bin/BUILD.gn index 136bc0624a9..caf4eface21 100644 --- a/runtime/bin/BUILD.gn +++ b/runtime/bin/BUILD.gn @@ -1162,8 +1162,8 @@ source_set("run_vm_tests_set") { } deps = [ - "../vm:libprotozero", # for timeline_test "//third_party/boringssl", # for secure_socket_utils_test + "//third_party/perfetto:libprotozero", # for timeline_test ] if (is_fuchsia) { @@ -1230,8 +1230,8 @@ executable("run_vm_tests") { ":run_vm_tests_set", ":standalone_dart_io", "..:libdart_precompiler_testing", - "../vm:libprotozero", # for timeline_test "//third_party/boringssl", # for secure_socket_utils_test + "//third_party/perfetto:libprotozero", # for timeline_test "//third_party/zlib", ] diff --git a/runtime/tools/run_clang_tidy.dart b/runtime/tools/run_clang_tidy.dart index 5335ec26c2b..b3cf7d17cdb 100644 --- a/runtime/tools/run_clang_tidy.dart +++ b/runtime/tools/run_clang_tidy.dart @@ -17,7 +17,7 @@ Future generatePerfettoBuildFlags() async { final processResult = await Process.run('./tools/build.py', [ '-mdebug', '-ax64', - 'third_party/perfetto/gn:gen_buildflags', + 'third_party/perfetto/src/gn:gen_buildflags', ]); final int exitCode = processResult.exitCode; @@ -44,14 +44,15 @@ List compilerFlagsForFile(String filepath) { // and the host architecture is fixed. final flags = [ + '-I.', '-Iruntime', '-Ithird_party', '-Iruntime/include', if (filepath.contains('samples/embedder')) '-Iruntime/engine', '-Ithird_party/boringssl/src/include', - '-Ithird_party/perfetto/include', + '-Ithird_party/perfetto/src/include', '-Ithird_party/zlib', - '-Iout/DebugX64/gen/third_party/perfetto/build_config', + '-Iout/DebugX64/gen/third_party/perfetto/src/build_config', '-DTARGET_ARCH_$arch', '-DTESTING', '-std=c++20', diff --git a/runtime/vm/BUILD.gn b/runtime/vm/BUILD.gn index b8b1f52b5ae..167deb7a71f 100644 --- a/runtime/vm/BUILD.gn +++ b/runtime/vm/BUILD.gn @@ -3,7 +3,6 @@ # BSD-style license that can be found in the LICENSE file. import("//build_overrides/build.gni") -import("//third_party/protobuf/proto_library.gni") import("../../build/executable_suffix.gni") import("../../sdk/lib/async/async_sources.gni") import("../../sdk/lib/collection/collection_sources.gni") @@ -68,113 +67,12 @@ config("libdart_vm_config") { } } -# This is a modified copy of Perfetto's template of the same name defined in -# //third_party/perfetto/gn/proto_library.gni. -# This is equivalent to the proto_library template (generation of .h/.cc from -# .proto files) but enables generation using the protozero plugin. -# The generated files will have the .pbzero.{cc,h} suffix, as opposed to the -# .pb.{cc,h} of the official proto library. -template("protozero_library") { - proto_library(target_name) { - if (!defined(perfetto_root_path)) { - perfetto_root_path = "//third_party/perfetto/" - } - - generate_cc = false - generate_python = false - generator_plugin_label = - perfetto_root_path + "src/protozero/protoc_plugin:protozero_plugin" - generator_plugin_suffix = ".pbzero" - - if (defined(invoker.deps)) { - deps = invoker.deps - } else { - deps = [] - } - - forward_variables_from(invoker, - [ - "defines", - "generator_plugin_options", - "include_dirs", - "proto_in_dir", - "proto_out_dir", - "sources", - "testonly", - "visibility", - "generate_descriptor", - "propagate_imports_configs", - "import_dirs", - ]) - } -} - -_perfetto_proto_definition_sources = [ - "protos/perfetto/common/builtin_clock.proto", - "protos/perfetto/trace/clock_snapshot.proto", - "protos/perfetto/trace/interned_data/interned_data.proto", - "protos/perfetto/trace/profiling/profile_common.proto", - "protos/perfetto/trace/profiling/profile_packet.proto", - "protos/perfetto/trace/trace.proto", - "protos/perfetto/trace/trace_packet.proto", - "protos/perfetto/trace/track_event/debug_annotation.proto", - "protos/perfetto/trace/track_event/process_descriptor.proto", - "protos/perfetto/trace/track_event/thread_descriptor.proto", - "protos/perfetto/trace/track_event/track_descriptor.proto", - "protos/perfetto/trace/track_event/track_event.proto", -] - -# This target is not a dependency of any other GN target. It is required to make -# ./protos/tools/compile_perfetto_protos.dart work though. -protozero_library("perfetto_protos_protozero") { - proto_in_dir = "." - proto_out_dir = "//runtime/vm" - generator_plugin_options = "wrapper_namespace=pbzero" - sources = _perfetto_proto_definition_sources -} - -proto_library("perfetto_protos_dart") { - generate_cc = false - generate_python = false - generator_plugin_script = "protos/tools/protoc_gen_dart_wrapper" - generator_plugin_suffixes = [ ".pb.dart" ] - - proto_in_dir = "." - proto_out_dir = "//pkg/vm_service_protos/lib/src" - - sources = _perfetto_proto_definition_sources -} - -# This config needs to be propagated to all targets that depend on -# ":libprotozero". -config("libprotozero_config") { - if (!defined(perfetto_root_path)) { - perfetto_root_path = "//third_party/perfetto/" - } - - include_dirs = [ - "$perfetto_root_path/include", - "$root_gen_dir/$perfetto_root_path/build_config", - ] -} - -# This target includes Perfetto's protozero target, which we need to serialize -# proto messages. This target also propagates ":libprotozero_config". -source_set("libprotozero") { - if (!defined(perfetto_root_path)) { - perfetto_root_path = "//third_party/perfetto/" - } - - public_configs = [ ":libprotozero_config" ] - deps = [ "$perfetto_root_path/src/protozero" ] -} - library_for_all_configs("libdart_vm") { target_type = "source_set" extra_product_deps = [] extra_nonproduct_deps = [] if (dart_support_perfetto) { - extra_nonproduct_deps += [ ":libprotozero" ] + extra_nonproduct_deps += [ "//third_party/perfetto:libprotozero" ] } extra_deps = [ "//third_party/icu:icui18n", @@ -212,7 +110,10 @@ library_for_all_configs("libdart_vm") { if (!is_win) { sources += [ "ffi_trampolines_arm64.S" ] } - include_dirs = [ ".." ] + include_dirs = [ + "..", + "../..", + ] } library_for_all_configs_with_compiler("libdart_compiler") { @@ -223,7 +124,7 @@ library_for_all_configs_with_compiler("libdart_compiler") { extra_nonproduct_deps = [] if (dart_support_perfetto) { - extra_nonproduct_deps += [ ":libprotozero" ] + extra_nonproduct_deps += [ "//third_party/perfetto:libprotozero" ] } extra_deps = [] if (is_fuchsia) { @@ -235,7 +136,7 @@ library_for_all_configs("libdart_lib") { target_type = "source_set" extra_nonproduct_deps = [] if (dart_support_perfetto) { - extra_nonproduct_deps += [ ":libprotozero" ] + extra_nonproduct_deps += [ "//third_party/perfetto:libprotozero" ] } extra_deps = [] if (is_fuchsia) { diff --git a/runtime/vm/perfetto_utils.h b/runtime/vm/perfetto_utils.h index d9cbc8be912..de33d8f4106 100644 --- a/runtime/vm/perfetto_utils.h +++ b/runtime/vm/perfetto_utils.h @@ -13,14 +13,14 @@ #include "perfetto/ext/tracing/core/trace_packet.h" #include "perfetto/protozero/scattered_heap_buffer.h" +#include "third_party/perfetto/protos/perfetto/common/builtin_clock.pbzero.h" +#include "third_party/perfetto/protos/perfetto/trace/clock_snapshot.pbzero.h" +#include "third_party/perfetto/protos/perfetto/trace/trace_packet.pbzero.h" +#include "third_party/perfetto/protos/perfetto/trace/track_event/process_descriptor.pbzero.h" +#include "third_party/perfetto/protos/perfetto/trace/track_event/track_descriptor.pbzero.h" #include "vm/hash_map.h" #include "vm/json_stream.h" #include "vm/os.h" -#include "vm/protos/perfetto/common/builtin_clock.pbzero.h" -#include "vm/protos/perfetto/trace/clock_snapshot.pbzero.h" -#include "vm/protos/perfetto/trace/trace_packet.pbzero.h" -#include "vm/protos/perfetto/trace/track_event/process_descriptor.pbzero.h" -#include "vm/protos/perfetto/trace/track_event/track_descriptor.pbzero.h" namespace dart { diff --git a/runtime/vm/profiler_service.cc b/runtime/vm/profiler_service.cc index 1e8b5d8a180..7bc11546156 100644 --- a/runtime/vm/profiler_service.cc +++ b/runtime/vm/profiler_service.cc @@ -25,12 +25,12 @@ #if defined(SUPPORT_PERFETTO) && !defined(PRODUCT) #include "perfetto/ext/tracing/core/trace_packet.h" #include "perfetto/protozero/scattered_heap_buffer.h" +#include "third_party/perfetto/protos/perfetto/common/builtin_clock.pbzero.h" +#include "third_party/perfetto/protos/perfetto/trace/interned_data/interned_data.pbzero.h" +#include "third_party/perfetto/protos/perfetto/trace/profiling/profile_common.pbzero.h" +#include "third_party/perfetto/protos/perfetto/trace/profiling/profile_packet.pbzero.h" +#include "third_party/perfetto/protos/perfetto/trace/trace_packet.pbzero.h" #include "vm/perfetto_utils.h" -#include "vm/protos/perfetto/common/builtin_clock.pbzero.h" -#include "vm/protos/perfetto/trace/interned_data/interned_data.pbzero.h" -#include "vm/protos/perfetto/trace/profiling/profile_common.pbzero.h" -#include "vm/protos/perfetto/trace/profiling/profile_packet.pbzero.h" -#include "vm/protos/perfetto/trace/trace_packet.pbzero.h" #endif // defined(SUPPORT_PERFETTO) && !defined(PRODUCT) namespace dart { @@ -1952,8 +1952,10 @@ void Profile::PrintProfilePerfetto(JSONStream* js) { // When serializing a new profile, we set |SEQ_INCREMENTAL_STATE_CLEARED| on // the first packet to clear the interned data table and avoid conflicts with // any profiles that are combined with this one. - // See "runtime/vm/protos/perfetto/trace/interned_data/interned_data.proto" - // a detailed description of how the interned data table works. + // + // See perfetto/trace/interned_data/interned_data.proto in + // third_party/perfetto/protos a detailed description of how the interned + // data table works. packet->set_sequence_flags( perfetto::protos::pbzero::TracePacket_SequenceFlags:: SEQ_INCREMENTAL_STATE_CLEARED); diff --git a/runtime/vm/profiler_service.h b/runtime/vm/profiler_service.h index c9cab525a9a..d0da2c7cfea 100644 --- a/runtime/vm/profiler_service.h +++ b/runtime/vm/profiler_service.h @@ -18,8 +18,8 @@ #if defined(SUPPORT_PERFETTO) && !defined(PRODUCT) #include "perfetto/protozero/scattered_heap_buffer.h" -#include "vm/protos/perfetto/trace/profiling/profile_common.pbzero.h" -#include "vm/protos/perfetto/trace/trace_packet.pbzero.h" +#include "third_party/perfetto/protos/perfetto/trace/profiling/profile_common.pbzero.h" +#include "third_party/perfetto/protos/perfetto/trace/trace_packet.pbzero.h" #endif // defined(SUPPORT_PERFETTO) && !defined(PRODUCT) // CPU Profile model and service protocol bits. diff --git a/runtime/vm/protos/.gitignore b/runtime/vm/protos/.gitignore deleted file mode 100644 index 3ac7cc474a9..00000000000 --- a/runtime/vm/protos/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -# The protozero compiler generates empty .pbzero.cc files for compatibility -# reasons (crbug.com/998165). We can ignore them. -*.pbzero.cc diff --git a/runtime/vm/timeline.cc b/runtime/vm/timeline.cc index c734052637c..94ce84b17bb 100644 --- a/runtime/vm/timeline.cc +++ b/runtime/vm/timeline.cc @@ -33,16 +33,16 @@ #if defined(SUPPORT_PERFETTO) && !defined(PRODUCT) #include "perfetto/ext/tracing/core/trace_packet.h" +#include "third_party/perfetto/protos/perfetto/common/builtin_clock.pbzero.h" +#include "third_party/perfetto/protos/perfetto/trace/clock_snapshot.pbzero.h" +#include "third_party/perfetto/protos/perfetto/trace/interned_data/interned_data.pbzero.h" +#include "third_party/perfetto/protos/perfetto/trace/trace_packet.pbzero.h" +#include "third_party/perfetto/protos/perfetto/trace/track_event/debug_annotation.pbzero.h" +#include "third_party/perfetto/protos/perfetto/trace/track_event/process_descriptor.pbzero.h" +#include "third_party/perfetto/protos/perfetto/trace/track_event/thread_descriptor.pbzero.h" +#include "third_party/perfetto/protos/perfetto/trace/track_event/track_descriptor.pbzero.h" +#include "third_party/perfetto/protos/perfetto/trace/track_event/track_event.pbzero.h" #include "vm/perfetto_utils.h" -#include "vm/protos/perfetto/common/builtin_clock.pbzero.h" -#include "vm/protos/perfetto/trace/clock_snapshot.pbzero.h" -#include "vm/protos/perfetto/trace/interned_data/interned_data.pbzero.h" -#include "vm/protos/perfetto/trace/trace_packet.pbzero.h" -#include "vm/protos/perfetto/trace/track_event/debug_annotation.pbzero.h" -#include "vm/protos/perfetto/trace/track_event/process_descriptor.pbzero.h" -#include "vm/protos/perfetto/trace/track_event/thread_descriptor.pbzero.h" -#include "vm/protos/perfetto/trace/track_event/track_descriptor.pbzero.h" -#include "vm/protos/perfetto/trace/track_event/track_event.pbzero.h" #endif // defined(SUPPORT_PERFETTO) && !defined(PRODUCT) namespace dart { diff --git a/runtime/vm/timeline.h b/runtime/vm/timeline.h index f73ecb8303b..4c9031f6156 100644 --- a/runtime/vm/timeline.h +++ b/runtime/vm/timeline.h @@ -22,7 +22,7 @@ #if defined(SUPPORT_TIMELINE) && defined(SUPPORT_PERFETTO) && !defined(PRODUCT) #include "perfetto/protozero/scattered_heap_buffer.h" -#include "vm/protos/perfetto/trace/trace_packet.pbzero.h" +#include "third_party/perfetto/protos/perfetto/trace/trace_packet.pbzero.h" #endif // defined(SUPPORT_TIMELINE) && defined(SUPPORT_PERFETTO) && \ // !defined(PRODUCT) diff --git a/third_party/.gitignore b/third_party/.gitignore index ea0597da020..857ad185cb4 100644 --- a/third_party/.gitignore +++ b/third_party/.gitignore @@ -15,6 +15,9 @@ !update.sh !fallback_root_certificates +# Perfetto source is in subdirectory. +!perfetto + # First exclude pkg from the gitignore, then re-ignore all its contents. # See https://github.com/dart-lang/pub/issues/4300. !/pkg/ diff --git a/third_party/perfetto/.gitignore b/third_party/perfetto/.gitignore new file mode 100644 index 00000000000..7b5589031ac --- /dev/null +++ b/third_party/perfetto/.gitignore @@ -0,0 +1,5 @@ +# Perfetto source is cloned into src. +src + +# These files are always empty and are not used. +protos/**/*.pbzero.cc \ No newline at end of file diff --git a/third_party/perfetto/BUILD.gn b/third_party/perfetto/BUILD.gn new file mode 100644 index 00000000000..3e253ba1641 --- /dev/null +++ b/third_party/perfetto/BUILD.gn @@ -0,0 +1,91 @@ +import("//build_overrides/build.gni") +import("//third_party/protobuf/proto_library.gni") + +# This is a modified copy of Perfetto's template of the same name defined in +# //third_party/perfetto/gn/proto_library.gni. +# This is equivalent to the proto_library template (generation of .h/.cc from +# .proto files) but enables generation using the protozero plugin. +# The generated files will have the .pbzero.{cc,h} suffix, as opposed to the +# .pb.{cc,h} of the official proto library. +template("protozero_library") { + proto_library(target_name) { + generate_cc = false + generate_python = false + generator_plugin_label = + perfetto_root_path + "src/protozero/protoc_plugin:protozero_plugin" + generator_plugin_suffix = ".pbzero" + + if (defined(invoker.deps)) { + deps = invoker.deps + } else { + deps = [] + } + + forward_variables_from(invoker, + [ + "defines", + "generator_plugin_options", + "include_dirs", + "proto_in_dir", + "proto_out_dir", + "sources", + "testonly", + "visibility", + "generate_descriptor", + "propagate_imports_configs", + "import_dirs", + ]) + } +} + +_perfetto_proto_definition_sources = [ + "protos/perfetto/common/builtin_clock.proto", + "protos/perfetto/trace/clock_snapshot.proto", + "protos/perfetto/trace/interned_data/interned_data.proto", + "protos/perfetto/trace/profiling/profile_common.proto", + "protos/perfetto/trace/profiling/profile_packet.proto", + "protos/perfetto/trace/trace.proto", + "protos/perfetto/trace/trace_packet.proto", + "protos/perfetto/trace/track_event/debug_annotation.proto", + "protos/perfetto/trace/track_event/process_descriptor.proto", + "protos/perfetto/trace/track_event/thread_descriptor.proto", + "protos/perfetto/trace/track_event/track_descriptor.proto", + "protos/perfetto/trace/track_event/track_event.proto", +] + +# This target is not a dependency of any other GN target. It is required to make +# tools/compile_perfetto_protos.dart work though. +protozero_library("perfetto_protos_protozero") { + proto_in_dir = "." + proto_out_dir = "//third_party/perfetto" + generator_plugin_options = "wrapper_namespace=pbzero" + sources = _perfetto_proto_definition_sources +} + +proto_library("perfetto_protos_dart") { + generate_cc = false + generate_python = false + generator_plugin_script = "tools/protoc_gen_dart_wrapper" + generator_plugin_suffixes = [ ".pb.dart" ] + + proto_in_dir = "." + proto_out_dir = "//pkg/vm_service_protos/lib/src" + + sources = _perfetto_proto_definition_sources +} + +# This config needs to be propagated to all targets that depend on +# ":libprotozero". +config("libprotozero_config") { + include_dirs = [ + "$perfetto_root_path/include", + "$root_gen_dir/$perfetto_root_path/build_config", + ] +} + +# This target includes Perfetto's protozero target, which we need to serialize +# proto messages. This target also propagates ":libprotozero_config". +source_set("libprotozero") { + public_configs = [ ":libprotozero_config" ] + deps = [ "$perfetto_root_path/src/protozero" ] +} diff --git a/third_party/perfetto/README.md b/third_party/perfetto/README.md new file mode 100644 index 00000000000..b7d2ab2f22e --- /dev/null +++ b/third_party/perfetto/README.md @@ -0,0 +1,26 @@ +Perfetto sources are in `src/`. + +`protos/` contain manually tree-shaken protobuf message definitions used by the +VM as well as `*.pbzero.h` files generated from these definitions. + +Note: experiments show that three-shaking protobuf messages does not have +an impact on code size of the VM because protozero generates header only +code for serializing protobuf messages which tree-shakes very well. + +This is not the case for Dart code we ship in `pkg/vm_service_protos`: +using pristine message definitions (as given in Perfetto sources) would +require including large amount of generated Dart code into this package, +which will never be used by consumers like DevTools. This code does not +tree-shake by default because each message is strongly connected to all +of its submessages (though our compiler toolchains provide protobuf +aware tree-shaker to reduce the size of the code). + +Thus for now we choose to use manually tree-shaken protos. + +# Updating Perfetto + +After updating Perfetto regenerated `*.pbzero.h` files by running: + +``` +$ dart third_party/perfetto/compile_perfetto_protos.dart +``` diff --git a/runtime/vm/protos/perfetto/common/builtin_clock.pbzero.h b/third_party/perfetto/protos/perfetto/common/builtin_clock.pbzero.h similarity index 89% rename from runtime/vm/protos/perfetto/common/builtin_clock.pbzero.h rename to third_party/perfetto/protos/perfetto/common/builtin_clock.pbzero.h index 64d03652968..ec8d355c688 100644 --- a/runtime/vm/protos/perfetto/common/builtin_clock.pbzero.h +++ b/third_party/perfetto/protos/perfetto/common/builtin_clock.pbzero.h @@ -1,11 +1,11 @@ -// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file +// Copyright (c) 2025, the Dart project authors. Please see the AUTHORS file // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. // IMPORTANT: This file should only ever be modified by modifying the // corresponding .proto file and then running -// `dart runtime/vm/protos/tools/compile_perfetto_protos.dart` from the SDK root -// directory. +// `dart third_party/perfetto/tools/compile_perfetto_protos.dart` from the +// SDK root directory. // Autogenerated by the ProtoZero compiler plugin. DO NOT EDIT. #ifndef PERFETTO_PROTOS_PROTOS_PERFETTO_COMMON_BUILTIN_CLOCK_PROTO_H_ diff --git a/runtime/vm/protos/perfetto/common/builtin_clock.proto b/third_party/perfetto/protos/perfetto/common/builtin_clock.proto similarity index 100% rename from runtime/vm/protos/perfetto/common/builtin_clock.proto rename to third_party/perfetto/protos/perfetto/common/builtin_clock.proto diff --git a/runtime/vm/protos/perfetto/trace/clock_snapshot.pbzero.h b/third_party/perfetto/protos/perfetto/trace/clock_snapshot.pbzero.h similarity index 97% rename from runtime/vm/protos/perfetto/trace/clock_snapshot.pbzero.h rename to third_party/perfetto/protos/perfetto/trace/clock_snapshot.pbzero.h index 2f4731ed3af..095ebf5f224 100644 --- a/runtime/vm/protos/perfetto/trace/clock_snapshot.pbzero.h +++ b/third_party/perfetto/protos/perfetto/trace/clock_snapshot.pbzero.h @@ -1,11 +1,11 @@ -// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file +// Copyright (c) 2025, the Dart project authors. Please see the AUTHORS file // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. // IMPORTANT: This file should only ever be modified by modifying the // corresponding .proto file and then running -// `dart runtime/vm/protos/tools/compile_perfetto_protos.dart` from the SDK root -// directory. +// `dart third_party/perfetto/tools/compile_perfetto_protos.dart` from the +// SDK root directory. // Autogenerated by the ProtoZero compiler plugin. DO NOT EDIT. #ifndef PERFETTO_PROTOS_PROTOS_PERFETTO_TRACE_CLOCK_SNAPSHOT_PROTO_H_ diff --git a/runtime/vm/protos/perfetto/trace/clock_snapshot.proto b/third_party/perfetto/protos/perfetto/trace/clock_snapshot.proto similarity index 100% rename from runtime/vm/protos/perfetto/trace/clock_snapshot.proto rename to third_party/perfetto/protos/perfetto/trace/clock_snapshot.proto diff --git a/runtime/vm/protos/perfetto/trace/interned_data/interned_data.pbzero.h b/third_party/perfetto/protos/perfetto/trace/interned_data/interned_data.pbzero.h similarity index 98% rename from runtime/vm/protos/perfetto/trace/interned_data/interned_data.pbzero.h rename to third_party/perfetto/protos/perfetto/trace/interned_data/interned_data.pbzero.h index 1078dd53a69..191c7dbd73e 100644 --- a/runtime/vm/protos/perfetto/trace/interned_data/interned_data.pbzero.h +++ b/third_party/perfetto/protos/perfetto/trace/interned_data/interned_data.pbzero.h @@ -1,11 +1,11 @@ -// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file +// Copyright (c) 2025, the Dart project authors. Please see the AUTHORS file // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. // IMPORTANT: This file should only ever be modified by modifying the // corresponding .proto file and then running -// `dart runtime/vm/protos/tools/compile_perfetto_protos.dart` from the SDK root -// directory. +// `dart third_party/perfetto/tools/compile_perfetto_protos.dart` from the +// SDK root directory. // Autogenerated by the ProtoZero compiler plugin. DO NOT EDIT. #ifndef PERFETTO_PROTOS_PROTOS_PERFETTO_TRACE_INTERNED_DATA_INTERNED_DATA_PROTO_H_ diff --git a/runtime/vm/protos/perfetto/trace/interned_data/interned_data.proto b/third_party/perfetto/protos/perfetto/trace/interned_data/interned_data.proto similarity index 100% rename from runtime/vm/protos/perfetto/trace/interned_data/interned_data.proto rename to third_party/perfetto/protos/perfetto/trace/interned_data/interned_data.proto diff --git a/runtime/vm/protos/perfetto/trace/profiling/profile_common.pbzero.h b/third_party/perfetto/protos/perfetto/trace/profiling/profile_common.pbzero.h similarity index 98% rename from runtime/vm/protos/perfetto/trace/profiling/profile_common.pbzero.h rename to third_party/perfetto/protos/perfetto/trace/profiling/profile_common.pbzero.h index 39982ec6324..d935e99db91 100644 --- a/runtime/vm/protos/perfetto/trace/profiling/profile_common.pbzero.h +++ b/third_party/perfetto/protos/perfetto/trace/profiling/profile_common.pbzero.h @@ -1,11 +1,11 @@ -// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file +// Copyright (c) 2025, the Dart project authors. Please see the AUTHORS file // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. // IMPORTANT: This file should only ever be modified by modifying the // corresponding .proto file and then running -// `dart runtime/vm/protos/tools/compile_perfetto_protos.dart` from the SDK root -// directory. +// `dart third_party/perfetto/tools/compile_perfetto_protos.dart` from the +// SDK root directory. // Autogenerated by the ProtoZero compiler plugin. DO NOT EDIT. #ifndef PERFETTO_PROTOS_PROTOS_PERFETTO_TRACE_PROFILING_PROFILE_COMMON_PROTO_H_ diff --git a/runtime/vm/protos/perfetto/trace/profiling/profile_common.proto b/third_party/perfetto/protos/perfetto/trace/profiling/profile_common.proto similarity index 100% rename from runtime/vm/protos/perfetto/trace/profiling/profile_common.proto rename to third_party/perfetto/protos/perfetto/trace/profiling/profile_common.proto diff --git a/runtime/vm/protos/perfetto/trace/profiling/profile_packet.pbzero.h b/third_party/perfetto/protos/perfetto/trace/profiling/profile_packet.pbzero.h similarity index 97% rename from runtime/vm/protos/perfetto/trace/profiling/profile_packet.pbzero.h rename to third_party/perfetto/protos/perfetto/trace/profiling/profile_packet.pbzero.h index 1c9999b66fa..7372a74188b 100644 --- a/runtime/vm/protos/perfetto/trace/profiling/profile_packet.pbzero.h +++ b/third_party/perfetto/protos/perfetto/trace/profiling/profile_packet.pbzero.h @@ -1,11 +1,11 @@ -// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file +// Copyright (c) 2025, the Dart project authors. Please see the AUTHORS file // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. // IMPORTANT: This file should only ever be modified by modifying the // corresponding .proto file and then running -// `dart runtime/vm/protos/tools/compile_perfetto_protos.dart` from the SDK root -// directory. +// `dart third_party/perfetto/tools/compile_perfetto_protos.dart` from the +// SDK root directory. // Autogenerated by the ProtoZero compiler plugin. DO NOT EDIT. #ifndef PERFETTO_PROTOS_PROTOS_PERFETTO_TRACE_PROFILING_PROFILE_PACKET_PROTO_H_ diff --git a/runtime/vm/protos/perfetto/trace/profiling/profile_packet.proto b/third_party/perfetto/protos/perfetto/trace/profiling/profile_packet.proto similarity index 100% rename from runtime/vm/protos/perfetto/trace/profiling/profile_packet.proto rename to third_party/perfetto/protos/perfetto/trace/profiling/profile_packet.proto diff --git a/runtime/vm/protos/perfetto/trace/trace.pbzero.h b/third_party/perfetto/protos/perfetto/trace/trace.pbzero.h similarity index 93% rename from runtime/vm/protos/perfetto/trace/trace.pbzero.h rename to third_party/perfetto/protos/perfetto/trace/trace.pbzero.h index 183a5002c65..a8c84d764a8 100644 --- a/runtime/vm/protos/perfetto/trace/trace.pbzero.h +++ b/third_party/perfetto/protos/perfetto/trace/trace.pbzero.h @@ -1,11 +1,11 @@ -// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file +// Copyright (c) 2025, the Dart project authors. Please see the AUTHORS file // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. // IMPORTANT: This file should only ever be modified by modifying the // corresponding .proto file and then running -// `dart runtime/vm/protos/tools/compile_perfetto_protos.dart` from the SDK root -// directory. +// `dart third_party/perfetto/tools/compile_perfetto_protos.dart` from the +// SDK root directory. // Autogenerated by the ProtoZero compiler plugin. DO NOT EDIT. #ifndef PERFETTO_PROTOS_PROTOS_PERFETTO_TRACE_TRACE_PROTO_H_ diff --git a/runtime/vm/protos/perfetto/trace/trace.proto b/third_party/perfetto/protos/perfetto/trace/trace.proto similarity index 100% rename from runtime/vm/protos/perfetto/trace/trace.proto rename to third_party/perfetto/protos/perfetto/trace/trace.proto diff --git a/runtime/vm/protos/perfetto/trace/trace_packet.pbzero.h b/third_party/perfetto/protos/perfetto/trace/trace_packet.pbzero.h similarity index 98% rename from runtime/vm/protos/perfetto/trace/trace_packet.pbzero.h rename to third_party/perfetto/protos/perfetto/trace/trace_packet.pbzero.h index 7ba12394ba7..3002f098ee8 100644 --- a/runtime/vm/protos/perfetto/trace/trace_packet.pbzero.h +++ b/third_party/perfetto/protos/perfetto/trace/trace_packet.pbzero.h @@ -1,11 +1,11 @@ -// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file +// Copyright (c) 2025, the Dart project authors. Please see the AUTHORS file // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. // IMPORTANT: This file should only ever be modified by modifying the // corresponding .proto file and then running -// `dart runtime/vm/protos/tools/compile_perfetto_protos.dart` from the SDK root -// directory. +// `dart third_party/perfetto/tools/compile_perfetto_protos.dart` from the +// SDK root directory. // Autogenerated by the ProtoZero compiler plugin. DO NOT EDIT. #ifndef PERFETTO_PROTOS_PROTOS_PERFETTO_TRACE_TRACE_PACKET_PROTO_H_ diff --git a/runtime/vm/protos/perfetto/trace/trace_packet.proto b/third_party/perfetto/protos/perfetto/trace/trace_packet.proto similarity index 100% rename from runtime/vm/protos/perfetto/trace/trace_packet.proto rename to third_party/perfetto/protos/perfetto/trace/trace_packet.proto diff --git a/runtime/vm/protos/perfetto/trace/track_event/debug_annotation.pbzero.h b/third_party/perfetto/protos/perfetto/trace/track_event/debug_annotation.pbzero.h similarity index 98% rename from runtime/vm/protos/perfetto/trace/track_event/debug_annotation.pbzero.h rename to third_party/perfetto/protos/perfetto/trace/track_event/debug_annotation.pbzero.h index 13a8d983587..096235188b8 100644 --- a/runtime/vm/protos/perfetto/trace/track_event/debug_annotation.pbzero.h +++ b/third_party/perfetto/protos/perfetto/trace/track_event/debug_annotation.pbzero.h @@ -1,11 +1,11 @@ -// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file +// Copyright (c) 2025, the Dart project authors. Please see the AUTHORS file // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. // IMPORTANT: This file should only ever be modified by modifying the // corresponding .proto file and then running -// `dart runtime/vm/protos/tools/compile_perfetto_protos.dart` from the SDK root -// directory. +// `dart third_party/perfetto/tools/compile_perfetto_protos.dart` from the +// SDK root directory. // Autogenerated by the ProtoZero compiler plugin. DO NOT EDIT. #ifndef PERFETTO_PROTOS_PROTOS_PERFETTO_TRACE_TRACK_EVENT_DEBUG_ANNOTATION_PROTO_H_ diff --git a/runtime/vm/protos/perfetto/trace/track_event/debug_annotation.proto b/third_party/perfetto/protos/perfetto/trace/track_event/debug_annotation.proto similarity index 100% rename from runtime/vm/protos/perfetto/trace/track_event/debug_annotation.proto rename to third_party/perfetto/protos/perfetto/trace/track_event/debug_annotation.proto diff --git a/runtime/vm/protos/perfetto/trace/track_event/process_descriptor.pbzero.h b/third_party/perfetto/protos/perfetto/trace/track_event/process_descriptor.pbzero.h similarity index 96% rename from runtime/vm/protos/perfetto/trace/track_event/process_descriptor.pbzero.h rename to third_party/perfetto/protos/perfetto/trace/track_event/process_descriptor.pbzero.h index 56d4b24d36d..f34b1158db6 100644 --- a/runtime/vm/protos/perfetto/trace/track_event/process_descriptor.pbzero.h +++ b/third_party/perfetto/protos/perfetto/trace/track_event/process_descriptor.pbzero.h @@ -1,11 +1,11 @@ -// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file +// Copyright (c) 2025, the Dart project authors. Please see the AUTHORS file // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. // IMPORTANT: This file should only ever be modified by modifying the // corresponding .proto file and then running -// `dart runtime/vm/protos/tools/compile_perfetto_protos.dart` from the SDK root -// directory. +// `dart third_party/perfetto/tools/compile_perfetto_protos.dart` from the +// SDK root directory. // Autogenerated by the ProtoZero compiler plugin. DO NOT EDIT. #ifndef PERFETTO_PROTOS_PROTOS_PERFETTO_TRACE_TRACK_EVENT_PROCESS_DESCRIPTOR_PROTO_H_ diff --git a/runtime/vm/protos/perfetto/trace/track_event/process_descriptor.proto b/third_party/perfetto/protos/perfetto/trace/track_event/process_descriptor.proto similarity index 100% rename from runtime/vm/protos/perfetto/trace/track_event/process_descriptor.proto rename to third_party/perfetto/protos/perfetto/trace/track_event/process_descriptor.proto diff --git a/runtime/vm/protos/perfetto/trace/track_event/thread_descriptor.pbzero.h b/third_party/perfetto/protos/perfetto/trace/track_event/thread_descriptor.pbzero.h similarity index 96% rename from runtime/vm/protos/perfetto/trace/track_event/thread_descriptor.pbzero.h rename to third_party/perfetto/protos/perfetto/trace/track_event/thread_descriptor.pbzero.h index 8e4683ea7a1..27a1029ce66 100644 --- a/runtime/vm/protos/perfetto/trace/track_event/thread_descriptor.pbzero.h +++ b/third_party/perfetto/protos/perfetto/trace/track_event/thread_descriptor.pbzero.h @@ -1,11 +1,11 @@ -// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file +// Copyright (c) 2025, the Dart project authors. Please see the AUTHORS file // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. // IMPORTANT: This file should only ever be modified by modifying the // corresponding .proto file and then running -// `dart runtime/vm/protos/tools/compile_perfetto_protos.dart` from the SDK root -// directory. +// `dart third_party/perfetto/tools/compile_perfetto_protos.dart` from the +// SDK root directory. // Autogenerated by the ProtoZero compiler plugin. DO NOT EDIT. #ifndef PERFETTO_PROTOS_PROTOS_PERFETTO_TRACE_TRACK_EVENT_THREAD_DESCRIPTOR_PROTO_H_ diff --git a/runtime/vm/protos/perfetto/trace/track_event/thread_descriptor.proto b/third_party/perfetto/protos/perfetto/trace/track_event/thread_descriptor.proto similarity index 100% rename from runtime/vm/protos/perfetto/trace/track_event/thread_descriptor.proto rename to third_party/perfetto/protos/perfetto/trace/track_event/thread_descriptor.proto diff --git a/runtime/vm/protos/perfetto/trace/track_event/track_descriptor.pbzero.h b/third_party/perfetto/protos/perfetto/trace/track_event/track_descriptor.pbzero.h similarity index 97% rename from runtime/vm/protos/perfetto/trace/track_event/track_descriptor.pbzero.h rename to third_party/perfetto/protos/perfetto/trace/track_event/track_descriptor.pbzero.h index c5d33f35422..e2f994c113b 100644 --- a/runtime/vm/protos/perfetto/trace/track_event/track_descriptor.pbzero.h +++ b/third_party/perfetto/protos/perfetto/trace/track_event/track_descriptor.pbzero.h @@ -1,11 +1,11 @@ -// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file +// Copyright (c) 2025, the Dart project authors. Please see the AUTHORS file // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. // IMPORTANT: This file should only ever be modified by modifying the // corresponding .proto file and then running -// `dart runtime/vm/protos/tools/compile_perfetto_protos.dart` from the SDK root -// directory. +// `dart third_party/perfetto/tools/compile_perfetto_protos.dart` from the +// SDK root directory. // Autogenerated by the ProtoZero compiler plugin. DO NOT EDIT. #ifndef PERFETTO_PROTOS_PROTOS_PERFETTO_TRACE_TRACK_EVENT_TRACK_DESCRIPTOR_PROTO_H_ diff --git a/runtime/vm/protos/perfetto/trace/track_event/track_descriptor.proto b/third_party/perfetto/protos/perfetto/trace/track_event/track_descriptor.proto similarity index 100% rename from runtime/vm/protos/perfetto/trace/track_event/track_descriptor.proto rename to third_party/perfetto/protos/perfetto/trace/track_event/track_descriptor.proto diff --git a/runtime/vm/protos/perfetto/trace/track_event/track_event.pbzero.h b/third_party/perfetto/protos/perfetto/trace/track_event/track_event.pbzero.h similarity index 99% rename from runtime/vm/protos/perfetto/trace/track_event/track_event.pbzero.h rename to third_party/perfetto/protos/perfetto/trace/track_event/track_event.pbzero.h index 11f6e2cd684..83e30b3086c 100644 --- a/runtime/vm/protos/perfetto/trace/track_event/track_event.pbzero.h +++ b/third_party/perfetto/protos/perfetto/trace/track_event/track_event.pbzero.h @@ -1,11 +1,11 @@ -// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file +// Copyright (c) 2025, the Dart project authors. Please see the AUTHORS file // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. // IMPORTANT: This file should only ever be modified by modifying the // corresponding .proto file and then running -// `dart runtime/vm/protos/tools/compile_perfetto_protos.dart` from the SDK root -// directory. +// `dart third_party/perfetto/tools/compile_perfetto_protos.dart` from the +// SDK root directory. // Autogenerated by the ProtoZero compiler plugin. DO NOT EDIT. #ifndef PERFETTO_PROTOS_PROTOS_PERFETTO_TRACE_TRACK_EVENT_TRACK_EVENT_PROTO_H_ diff --git a/runtime/vm/protos/perfetto/trace/track_event/track_event.proto b/third_party/perfetto/protos/perfetto/trace/track_event/track_event.proto similarity index 100% rename from runtime/vm/protos/perfetto/trace/track_event/track_event.proto rename to third_party/perfetto/protos/perfetto/trace/track_event/track_event.proto diff --git a/runtime/vm/protos/tools/compile_perfetto_protos.dart b/third_party/perfetto/tools/compile_perfetto_protos.dart similarity index 89% rename from runtime/vm/protos/tools/compile_perfetto_protos.dart rename to third_party/perfetto/tools/compile_perfetto_protos.dart index 59e1aab810a..1d4d995bcde 100644 --- a/runtime/vm/protos/tools/compile_perfetto_protos.dart +++ b/third_party/perfetto/tools/compile_perfetto_protos.dart @@ -17,8 +17,8 @@ Future compilePerfettoProtos() async { final processResult = await Process.run('./tools/build.py', [ '-mdebug', '-a$hostArch', - 'runtime/vm:perfetto_protos_protozero', - 'runtime/vm:perfetto_protos_dart', + 'third_party/perfetto:perfetto_protos_protozero', + 'third_party/perfetto:perfetto_protos_dart', ]); final int exitCode = processResult.exitCode; @@ -34,14 +34,14 @@ Future compilePerfettoProtos() async { } const noticesToPrepend = r''' -// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file +// Copyright (c) 2025, the Dart project authors. Please see the AUTHORS file // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. // IMPORTANT: This file should only ever be modified by modifying the // corresponding .proto file and then running -// `dart runtime/vm/protos/tools/compile_perfetto_protos.dart` from the SDK root -// directory. +// `dart third_party/perfetto/tools/compile_perfetto_protos.dart` from the +// SDK root directory. '''; Future copyGeneratedFiles({ @@ -109,7 +109,7 @@ void createFileThatExportsAllGeneratedDartCode() { } main(List files) async { - if (!Directory('./runtime/vm').existsSync()) { + if (!Directory('./third_party/perfetto').existsSync()) { print('Error: this tool must be run from the root directory of the SDK.'); return; } @@ -119,8 +119,8 @@ main(List files) async { await compilePerfettoProtos(); await copyGeneratedFiles( - destination: Directory('./runtime/vm'), - source: Directory('$buildDir/gen/runtime/vm/protos'), + destination: Directory('third_party/perfetto'), + source: Directory('$buildDir/gen/third_party/perfetto/protos'), ); await copyGeneratedFiles( destination: Directory('./pkg/vm_service_protos/lib/src'), diff --git a/runtime/vm/protos/tools/protoc_gen_dart_wrapper b/third_party/perfetto/tools/protoc_gen_dart_wrapper similarity index 87% rename from runtime/vm/protos/tools/protoc_gen_dart_wrapper rename to third_party/perfetto/tools/protoc_gen_dart_wrapper index 04009fdb92b..edf95240233 100755 --- a/runtime/vm/protos/tools/protoc_gen_dart_wrapper +++ b/third_party/perfetto/tools/protoc_gen_dart_wrapper @@ -3,5 +3,5 @@ # This is a wrapper that runs # //third_party/pkg/protobuf/protoc_plugin/bin/protoc-gen-dart using dart from # //tools/sdks/dart-sdk instead of from PATH. -ROOT_BUILD_DIR=$(dirname "$0")/../../../.. +ROOT_BUILD_DIR=$(dirname "$0")/../../.. PATH=$ROOT_BUILD_DIR/tools/sdks/dart-sdk/bin:$PATH $ROOT_BUILD_DIR/third_party/pkg/protobuf/protoc_plugin/bin/protoc-gen-dart diff --git a/runtime/vm/protos/tools/protoc_gen_dart_wrapper.bat b/third_party/perfetto/tools/protoc_gen_dart_wrapper.bat similarity index 100% rename from runtime/vm/protos/tools/protoc_gen_dart_wrapper.bat rename to third_party/perfetto/tools/protoc_gen_dart_wrapper.bat