[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 <vegorov@google.com> Reviewed-by: Ben Konyi <bkonyi@google.com>
This commit is contained in:
committed by
Commit Queue
parent
e4175c667b
commit
07c9599ead
@@ -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"),
|
||||
|
||||
|
||||
@@ -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/"
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
+2
-2
@@ -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
|
||||
|
||||
+2
-2
@@ -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
|
||||
|
||||
+2
-2
@@ -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
|
||||
|
||||
+2
-2
@@ -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
|
||||
|
||||
+2
-2
@@ -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
|
||||
|
||||
+2
-2
@@ -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
|
||||
|
||||
+2
-2
@@ -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
|
||||
|
||||
+2
-2
@@ -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
|
||||
|
||||
+2
-2
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
+2
-2
@@ -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
|
||||
|
||||
+2
-2
@@ -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
|
||||
|
||||
+2
-2
@@ -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
|
||||
|
||||
+2
-2
@@ -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
|
||||
|
||||
+2
-2
@@ -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
|
||||
|
||||
+2
-2
@@ -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
|
||||
|
||||
+2
-2
@@ -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
|
||||
|
||||
+2
-2
@@ -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
|
||||
|
||||
+2
-2
@@ -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
|
||||
|
||||
+2
-2
@@ -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
|
||||
|
||||
+2
-2
@@ -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
|
||||
|
||||
+2
-2
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
+2
-2
@@ -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
|
||||
|
||||
+2
-2
@@ -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
|
||||
|
||||
+2
-2
@@ -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
|
||||
|
||||
@@ -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';
|
||||
|
||||
+1
-1
@@ -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",
|
||||
|
||||
@@ -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",
|
||||
]
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ Future<void> 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<String> compilerFlagsForFile(String filepath) {
|
||||
// and the host architecture is fixed.
|
||||
|
||||
final flags = <String>[
|
||||
'-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',
|
||||
|
||||
+7
-106
@@ -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) {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
# The protozero compiler generates empty .pbzero.cc files for compatibility
|
||||
# reasons (crbug.com/998165). We can ignore them.
|
||||
*.pbzero.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 {
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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/
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
# Perfetto source is cloned into src.
|
||||
src
|
||||
|
||||
# These files are always empty and are not used.
|
||||
protos/**/*.pbzero.cc
|
||||
Vendored
+91
@@ -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" ]
|
||||
}
|
||||
Vendored
+26
@@ -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
|
||||
```
|
||||
+3
-3
@@ -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_
|
||||
+3
-3
@@ -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_
|
||||
+3
-3
@@ -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_
|
||||
+3
-3
@@ -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_
|
||||
+3
-3
@@ -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_
|
||||
+3
-3
@@ -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_
|
||||
+3
-3
@@ -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_
|
||||
+3
-3
@@ -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_
|
||||
+3
-3
@@ -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_
|
||||
+3
-3
@@ -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_
|
||||
+3
-3
@@ -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_
|
||||
+3
-3
@@ -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_
|
||||
+8
-8
@@ -17,8 +17,8 @@ Future<void> 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<void> 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<void> copyGeneratedFiles({
|
||||
@@ -109,7 +109,7 @@ void createFileThatExportsAllGeneratedDartCode() {
|
||||
}
|
||||
|
||||
main(List<String> 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<String> 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'),
|
||||
runtime/vm/protos/tools/protoc_gen_dart_wrapper → third_party/perfetto/tools/protoc_gen_dart_wrapper
Vendored
+1
-1
@@ -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
|
||||
Reference in New Issue
Block a user