Skip to content

Commit d1bfa65

Browse files
mralephCommit Queue
authored andcommitted
[vm] Regenerate perfetto protos
I am working on changes to perfetto output: implemented interning of strings which significantly reduces the size of generated packets. As part of my changes I needed to add some fields back to proto definitions (which were manually tree-shaken to reduce the binary size). This means I will need to regenerate protos - but to simplify review I am first sending a CL which just regenerates proto code without any changes. This CL also updates the script to make it run on Mac. Whatever build issue was present before is no longer present and the tool just works. TEST=ci Change-Id: Ifa422cb4128d831b30a89478e58dfffa038d9488 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/416740 Reviewed-by: Derek Xu <[email protected]> Commit-Queue: Slava Egorov <[email protected]>
1 parent aab2d4d commit d1bfa65

File tree

51 files changed

+868
-632
lines changed

Some content is hidden

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

51 files changed

+868
-632
lines changed

pkg/vm_service_protos/lib/src/protos/perfetto/common/builtin_clock.pb.dart

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,15 @@
1010
// Generated code. Do not modify.
1111
// source: protos/perfetto/common/builtin_clock.proto
1212
//
13-
// @dart = 2.12
13+
// @dart = 3.3
1414

15-
// ignore_for_file: annotate_overrides, camel_case_types
15+
// ignore_for_file: annotate_overrides, camel_case_types, comment_references
1616
// ignore_for_file: constant_identifier_names, library_prefixes
1717
// ignore_for_file: non_constant_identifier_names, prefer_final_fields
1818
// ignore_for_file: unnecessary_import, unnecessary_this, unused_import
1919

2020
import 'dart:core' as $core;
2121

22+
export 'package:protobuf/protobuf.dart' show GeneratedMessageGenericExtensions;
23+
2224
export 'builtin_clock.pbenum.dart';

pkg/vm_service_protos/lib/src/protos/perfetto/common/builtin_clock.pbenum.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010
// Generated code. Do not modify.
1111
// source: protos/perfetto/common/builtin_clock.proto
1212
//
13-
// @dart = 2.12
13+
// @dart = 3.3
1414

15-
// ignore_for_file: annotate_overrides, camel_case_types
15+
// ignore_for_file: annotate_overrides, camel_case_types, comment_references
1616
// ignore_for_file: constant_identifier_names, library_prefixes
1717
// ignore_for_file: non_constant_identifier_names, prefer_final_fields
1818
// ignore_for_file: unnecessary_import, unnecessary_this, unused_import
@@ -33,7 +33,7 @@ class BuiltinClock extends $pb.ProtobufEnum {
3333
$pb.ProtobufEnum.initByValue(values);
3434
static BuiltinClock? valueOf($core.int value) => _byValue[value];
3535

36-
const BuiltinClock._($core.int v, $core.String n) : super(v, n);
36+
const BuiltinClock._(super.v, super.n);
3737
}
3838

3939
const _omitEnumNames = $core.bool.fromEnvironment('protobuf.omit_enum_names');

pkg/vm_service_protos/lib/src/protos/perfetto/common/builtin_clock.pbjson.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010
// Generated code. Do not modify.
1111
// source: protos/perfetto/common/builtin_clock.proto
1212
//
13-
// @dart = 2.12
13+
// @dart = 3.3
1414

15-
// ignore_for_file: annotate_overrides, camel_case_types
15+
// ignore_for_file: annotate_overrides, camel_case_types, comment_references
1616
// ignore_for_file: constant_identifier_names, library_prefixes
1717
// ignore_for_file: non_constant_identifier_names, prefer_final_fields
1818
// ignore_for_file: unnecessary_import, unnecessary_this, unused_import

pkg/vm_service_protos/lib/src/protos/perfetto/common/builtin_clock.pbserver.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010
// Generated code. Do not modify.
1111
// source: protos/perfetto/common/builtin_clock.proto
1212
//
13-
// @dart = 2.12
13+
// @dart = 3.3
1414

15-
// ignore_for_file: annotate_overrides, camel_case_types
15+
// ignore_for_file: annotate_overrides, camel_case_types, comment_references
1616
// ignore_for_file: constant_identifier_names
1717
// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes
1818
// ignore_for_file: non_constant_identifier_names, prefer_final_fields

pkg/vm_service_protos/lib/src/protos/perfetto/trace/clock_snapshot.pb.dart

Lines changed: 51 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010
// Generated code. Do not modify.
1111
// source: protos/perfetto/trace/clock_snapshot.proto
1212
//
13-
// @dart = 2.12
13+
// @dart = 3.3
1414

15-
// ignore_for_file: annotate_overrides, camel_case_types
15+
// ignore_for_file: annotate_overrides, camel_case_types, comment_references
1616
// ignore_for_file: constant_identifier_names, library_prefixes
1717
// ignore_for_file: non_constant_identifier_names, prefer_final_fields
1818
// ignore_for_file: unnecessary_import, unnecessary_this, unused_import
@@ -24,8 +24,22 @@ import 'package:protobuf/protobuf.dart' as $pb;
2424

2525
import '../common/builtin_clock.pbenum.dart' as $0;
2626

27+
export 'package:protobuf/protobuf.dart' show GeneratedMessageGenericExtensions;
28+
2729
class ClockSnapshot_Clock extends $pb.GeneratedMessage {
28-
factory ClockSnapshot_Clock() => create();
30+
factory ClockSnapshot_Clock({
31+
$core.int? clockId,
32+
$fixnum.Int64? timestamp,
33+
}) {
34+
final $result = create();
35+
if (clockId != null) {
36+
$result.clockId = clockId;
37+
}
38+
if (timestamp != null) {
39+
$result.timestamp = timestamp;
40+
}
41+
return $result;
42+
}
2943
ClockSnapshot_Clock._() : super();
3044
factory ClockSnapshot_Clock.fromBuffer($core.List<$core.int> i,
3145
[$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) =>
@@ -68,6 +82,15 @@ class ClockSnapshot_Clock extends $pb.GeneratedMessage {
6882
$pb.GeneratedMessage.$_defaultFor<ClockSnapshot_Clock>(create);
6983
static ClockSnapshot_Clock? _defaultInstance;
7084

85+
/// Clock IDs have the following semantic:
86+
/// [1, 63]: Builtin types, see BuiltinClock from
87+
/// ../common/builtin_clock.proto.
88+
/// [64, 127]: User-defined clocks. These clocks are sequence-scoped. They
89+
/// are only valid within the same |trusted_packet_sequence_id|
90+
/// (i.e. only for TracePacket(s) emitted by the same TraceWriter
91+
/// that emitted the clock snapshot).
92+
/// [128, MAX]: Reserved for future use. The idea is to allow global clock
93+
/// IDs and setting this ID to hash(full_clock_name) & ~127.
7194
@$pb.TagNumber(1)
7295
$core.int get clockId => $_getIZ(0);
7396
@$pb.TagNumber(1)
@@ -78,8 +101,10 @@ class ClockSnapshot_Clock extends $pb.GeneratedMessage {
78101
@$pb.TagNumber(1)
79102
$core.bool hasClockId() => $_has(0);
80103
@$pb.TagNumber(1)
81-
void clearClockId() => clearField(1);
104+
void clearClockId() => $_clearField(1);
82105

106+
/// Absolute timestamp. Unit is ns unless specified otherwise by the
107+
/// unit_multiplier_ns field below.
83108
@$pb.TagNumber(2)
84109
$fixnum.Int64 get timestamp => $_getI64(1);
85110
@$pb.TagNumber(2)
@@ -90,11 +115,24 @@ class ClockSnapshot_Clock extends $pb.GeneratedMessage {
90115
@$pb.TagNumber(2)
91116
$core.bool hasTimestamp() => $_has(1);
92117
@$pb.TagNumber(2)
93-
void clearTimestamp() => clearField(2);
118+
void clearTimestamp() => $_clearField(2);
94119
}
95120

121+
/// A snapshot of clock readings to allow for trace alignment.
96122
class ClockSnapshot extends $pb.GeneratedMessage {
97-
factory ClockSnapshot() => create();
123+
factory ClockSnapshot({
124+
$core.Iterable<ClockSnapshot_Clock>? clocks,
125+
$0.BuiltinClock? primaryTraceClock,
126+
}) {
127+
final $result = create();
128+
if (clocks != null) {
129+
$result.clocks.addAll(clocks);
130+
}
131+
if (primaryTraceClock != null) {
132+
$result.primaryTraceClock = primaryTraceClock;
133+
}
134+
return $result;
135+
}
98136
ClockSnapshot._() : super();
99137
factory ClockSnapshot.fromBuffer($core.List<$core.int> i,
100138
[$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) =>
@@ -142,19 +180,23 @@ class ClockSnapshot extends $pb.GeneratedMessage {
142180
static ClockSnapshot? _defaultInstance;
143181

144182
@$pb.TagNumber(1)
145-
$core.List<ClockSnapshot_Clock> get clocks => $_getList(0);
183+
$pb.PbList<ClockSnapshot_Clock> get clocks => $_getList(0);
146184

185+
/// The authoritative clock domain for the trace. Defaults to BOOTTIME, but can
186+
/// be overridden in TraceConfig's builtin_data_sources. Trace processor will
187+
/// attempt to translate packet/event timestamps from various data sources (and
188+
/// their chosen clock domains) to this domain during import.
147189
@$pb.TagNumber(2)
148190
$0.BuiltinClock get primaryTraceClock => $_getN(1);
149191
@$pb.TagNumber(2)
150192
set primaryTraceClock($0.BuiltinClock v) {
151-
setField(2, v);
193+
$_setField(2, v);
152194
}
153195

154196
@$pb.TagNumber(2)
155197
$core.bool hasPrimaryTraceClock() => $_has(1);
156198
@$pb.TagNumber(2)
157-
void clearPrimaryTraceClock() => clearField(2);
199+
void clearPrimaryTraceClock() => $_clearField(2);
158200
}
159201

160202
const _omitFieldNames = $core.bool.fromEnvironment('protobuf.omit_field_names');

pkg/vm_service_protos/lib/src/protos/perfetto/trace/clock_snapshot.pbjson.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010
// Generated code. Do not modify.
1111
// source: protos/perfetto/trace/clock_snapshot.proto
1212
//
13-
// @dart = 2.12
13+
// @dart = 3.3
1414

15-
// ignore_for_file: annotate_overrides, camel_case_types
15+
// ignore_for_file: annotate_overrides, camel_case_types, comment_references
1616
// ignore_for_file: constant_identifier_names, library_prefixes
1717
// ignore_for_file: non_constant_identifier_names, prefer_final_fields
1818
// ignore_for_file: unnecessary_import, unnecessary_this, unused_import

pkg/vm_service_protos/lib/src/protos/perfetto/trace/clock_snapshot.pbserver.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010
// Generated code. Do not modify.
1111
// source: protos/perfetto/trace/clock_snapshot.proto
1212
//
13-
// @dart = 2.12
13+
// @dart = 3.3
1414

15-
// ignore_for_file: annotate_overrides, camel_case_types
15+
// ignore_for_file: annotate_overrides, camel_case_types, comment_references
1616
// ignore_for_file: constant_identifier_names
1717
// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes
1818
// ignore_for_file: non_constant_identifier_names, prefer_final_fields

pkg/vm_service_protos/lib/src/protos/perfetto/trace/interned_data/interned_data.pb.dart

Lines changed: 48 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010
// Generated code. Do not modify.
1111
// source: protos/perfetto/trace/interned_data/interned_data.proto
1212
//
13-
// @dart = 2.12
13+
// @dart = 3.3
1414

15-
// ignore_for_file: annotate_overrides, camel_case_types
15+
// ignore_for_file: annotate_overrides, camel_case_types, comment_references
1616
// ignore_for_file: constant_identifier_names, library_prefixes
1717
// ignore_for_file: non_constant_identifier_names, prefer_final_fields
1818
// ignore_for_file: unnecessary_import, unnecessary_this, unused_import
@@ -23,8 +23,43 @@ import 'package:protobuf/protobuf.dart' as $pb;
2323

2424
import '../profiling/profile_common.pb.dart' as $2;
2525

26+
export 'package:protobuf/protobuf.dart' show GeneratedMessageGenericExtensions;
27+
28+
/// Message that contains new entries for the interning indices of a packet
29+
/// sequence.
30+
///
31+
/// The writer will usually emit new entries in the same TracePacket that first
32+
/// refers to them (since the last reset of interning state). They may also be
33+
/// emitted proactively in advance of referring to them in later packets.
34+
///
35+
/// Next reserved id: 8 (up to 15).
36+
/// Next id: 29.
2637
class InternedData extends $pb.GeneratedMessage {
27-
factory InternedData() => create();
38+
factory InternedData({
39+
$core.Iterable<$2.InternedString>? functionNames,
40+
$core.Iterable<$2.Frame>? frames,
41+
$core.Iterable<$2.Callstack>? callstacks,
42+
$core.Iterable<$2.InternedString>? mappingPaths,
43+
$core.Iterable<$2.Mapping>? mappings,
44+
}) {
45+
final $result = create();
46+
if (functionNames != null) {
47+
$result.functionNames.addAll(functionNames);
48+
}
49+
if (frames != null) {
50+
$result.frames.addAll(frames);
51+
}
52+
if (callstacks != null) {
53+
$result.callstacks.addAll(callstacks);
54+
}
55+
if (mappingPaths != null) {
56+
$result.mappingPaths.addAll(mappingPaths);
57+
}
58+
if (mappings != null) {
59+
$result.mappings.addAll(mappings);
60+
}
61+
return $result;
62+
}
2863
InternedData._() : super();
2964
factory InternedData.fromBuffer($core.List<$core.int> i,
3065
[$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) =>
@@ -76,20 +111,25 @@ class InternedData extends $pb.GeneratedMessage {
76111
$pb.GeneratedMessage.$_defaultFor<InternedData>(create);
77112
static InternedData? _defaultInstance;
78113

114+
/// Names of functions used in frames below.
79115
@$pb.TagNumber(5)
80-
$core.List<$2.InternedString> get functionNames => $_getList(0);
116+
$pb.PbList<$2.InternedString> get functionNames => $_getList(0);
81117

118+
/// Frames of callstacks of a program.
82119
@$pb.TagNumber(6)
83-
$core.List<$2.Frame> get frames => $_getList(1);
120+
$pb.PbList<$2.Frame> get frames => $_getList(1);
84121

122+
/// A callstack of a program.
85123
@$pb.TagNumber(7)
86-
$core.List<$2.Callstack> get callstacks => $_getList(2);
124+
$pb.PbList<$2.Callstack> get callstacks => $_getList(2);
87125

126+
/// Paths to executable files.
88127
@$pb.TagNumber(17)
89-
$core.List<$2.InternedString> get mappingPaths => $_getList(3);
128+
$pb.PbList<$2.InternedString> get mappingPaths => $_getList(3);
90129

130+
/// Executable files mapped into processes.
91131
@$pb.TagNumber(19)
92-
$core.List<$2.Mapping> get mappings => $_getList(4);
132+
$pb.PbList<$2.Mapping> get mappings => $_getList(4);
93133
}
94134

95135
const _omitFieldNames = $core.bool.fromEnvironment('protobuf.omit_field_names');

pkg/vm_service_protos/lib/src/protos/perfetto/trace/interned_data/interned_data.pbjson.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010
// Generated code. Do not modify.
1111
// source: protos/perfetto/trace/interned_data/interned_data.proto
1212
//
13-
// @dart = 2.12
13+
// @dart = 3.3
1414

15-
// ignore_for_file: annotate_overrides, camel_case_types
15+
// ignore_for_file: annotate_overrides, camel_case_types, comment_references
1616
// ignore_for_file: constant_identifier_names, library_prefixes
1717
// ignore_for_file: non_constant_identifier_names, prefer_final_fields
1818
// ignore_for_file: unnecessary_import, unnecessary_this, unused_import

pkg/vm_service_protos/lib/src/protos/perfetto/trace/interned_data/interned_data.pbserver.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010
// Generated code. Do not modify.
1111
// source: protos/perfetto/trace/interned_data/interned_data.proto
1212
//
13-
// @dart = 2.12
13+
// @dart = 3.3
1414

15-
// ignore_for_file: annotate_overrides, camel_case_types
15+
// ignore_for_file: annotate_overrides, camel_case_types, comment_references
1616
// ignore_for_file: constant_identifier_names
1717
// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes
1818
// ignore_for_file: non_constant_identifier_names, prefer_final_fields

0 commit comments

Comments
 (0)