blob: b69b9f02aa663b2d6268c8e66f0b95c164e6ecbd [file] [log] [blame]
Hector Dearman55ef3e02018-04-11 17:28:55 +01001// AUTOGENERATED - DO NOT EDIT
2// ---------------------------
3// This file has been generated by
4// AOSP://external/perfetto/tools/gen_merged_protos
5// merging the perfetto config protos.
6// This fused proto is intended to be copied in:
7// - Android tree, for statsd.
8// - Google internal repos.
9
10syntax = "proto2";
11
12package perfetto.protos;
13
Primiano Tucci64df2ca2019-01-03 22:26:47 +000014// Begin of protos/perfetto/common/android_log_constants.proto
15
16// Values from NDK's android/log.h.
17enum AndroidLogId {
18 LID_DEFAULT = 0; // MAIN.
19 LID_RADIO = 1;
20 LID_EVENTS = 2;
21 LID_SYSTEM = 3;
22 LID_CRASH = 4;
23 LID_STATS = 5;
24 LID_SECURITY = 6;
25 LID_KERNEL = 7;
26}
27
28enum AndroidLogPriority {
29 PRIO_UNSPECIFIED = 0;
30 PRIO_UNUSED = 1; // _DEFAULT, but should never be seen in logs.
31 PRIO_VERBOSE = 2;
32 PRIO_DEBUG = 3;
33 PRIO_INFO = 4;
34 PRIO_WARN = 5;
35 PRIO_ERROR = 6;
36 PRIO_FATAL = 7;
37}
38
39// End of protos/perfetto/common/android_log_constants.proto
40
Primiano Tucci82a8bfd2018-09-19 11:33:04 +010041// Begin of protos/perfetto/common/sys_stats_counters.proto
42
43// When editing entries here remember also to update "sys_stats_counters.h" with
44// the corresponding string definitions for the actual /proc files parser.
45
46// Counter definitions for Linux's /proc/meminfo.
47enum MeminfoCounters {
48 MEMINFO_UNSPECIFIED = 0;
49 MEMINFO_MEM_TOTAL = 1;
50 MEMINFO_MEM_FREE = 2;
51 MEMINFO_MEM_AVAILABLE = 3;
52 MEMINFO_BUFFERS = 4;
53 MEMINFO_CACHED = 5;
54 MEMINFO_SWAP_CACHED = 6;
55 MEMINFO_ACTIVE = 7;
56 MEMINFO_INACTIVE = 8;
57 MEMINFO_ACTIVE_ANON = 9;
58 MEMINFO_INACTIVE_ANON = 10;
59 MEMINFO_ACTIVE_FILE = 11;
60 MEMINFO_INACTIVE_FILE = 12;
61 MEMINFO_UNEVICTABLE = 13;
62 MEMINFO_MLOCKED = 14;
63 MEMINFO_SWAP_TOTAL = 15;
64 MEMINFO_SWAP_FREE = 16;
65 MEMINFO_DIRTY = 17;
66 MEMINFO_WRITEBACK = 18;
67 MEMINFO_ANON_PAGES = 19;
68 MEMINFO_MAPPED = 20;
69 MEMINFO_SHMEM = 21;
70 MEMINFO_SLAB = 22;
71 MEMINFO_SLAB_RECLAIMABLE = 23;
72 MEMINFO_SLAB_UNRECLAIMABLE = 24;
73 MEMINFO_KERNEL_STACK = 25;
74 MEMINFO_PAGE_TABLES = 26;
75 MEMINFO_COMMIT_LIMIT = 27;
76 MEMINFO_COMMITED_AS = 28;
77 MEMINFO_VMALLOC_TOTAL = 29;
78 MEMINFO_VMALLOC_USED = 30;
79 MEMINFO_VMALLOC_CHUNK = 31;
80 MEMINFO_CMA_TOTAL = 32;
81 MEMINFO_CMA_FREE = 33;
82}
83
84// Counter definitions for Linux's /proc/vmstat.
85enum VmstatCounters {
86 VMSTAT_UNSPECIFIED = 0;
87 VMSTAT_NR_FREE_PAGES = 1;
88 VMSTAT_NR_ALLOC_BATCH = 2;
89 VMSTAT_NR_INACTIVE_ANON = 3;
90 VMSTAT_NR_ACTIVE_ANON = 4;
91 VMSTAT_NR_INACTIVE_FILE = 5;
92 VMSTAT_NR_ACTIVE_FILE = 6;
93 VMSTAT_NR_UNEVICTABLE = 7;
94 VMSTAT_NR_MLOCK = 8;
95 VMSTAT_NR_ANON_PAGES = 9;
96 VMSTAT_NR_MAPPED = 10;
97 VMSTAT_NR_FILE_PAGES = 11;
98 VMSTAT_NR_DIRTY = 12;
99 VMSTAT_NR_WRITEBACK = 13;
100 VMSTAT_NR_SLAB_RECLAIMABLE = 14;
101 VMSTAT_NR_SLAB_UNRECLAIMABLE = 15;
102 VMSTAT_NR_PAGE_TABLE_PAGES = 16;
103 VMSTAT_NR_KERNEL_STACK = 17;
104 VMSTAT_NR_OVERHEAD = 18;
105 VMSTAT_NR_UNSTABLE = 19;
106 VMSTAT_NR_BOUNCE = 20;
107 VMSTAT_NR_VMSCAN_WRITE = 21;
108 VMSTAT_NR_VMSCAN_IMMEDIATE_RECLAIM = 22;
109 VMSTAT_NR_WRITEBACK_TEMP = 23;
110 VMSTAT_NR_ISOLATED_ANON = 24;
111 VMSTAT_NR_ISOLATED_FILE = 25;
112 VMSTAT_NR_SHMEM = 26;
113 VMSTAT_NR_DIRTIED = 27;
114 VMSTAT_NR_WRITTEN = 28;
115 VMSTAT_NR_PAGES_SCANNED = 29;
116 VMSTAT_WORKINGSET_REFAULT = 30;
117 VMSTAT_WORKINGSET_ACTIVATE = 31;
118 VMSTAT_WORKINGSET_NODERECLAIM = 32;
119 VMSTAT_NR_ANON_TRANSPARENT_HUGEPAGES = 33;
120 VMSTAT_NR_FREE_CMA = 34;
121 VMSTAT_NR_SWAPCACHE = 35;
122 VMSTAT_NR_DIRTY_THRESHOLD = 36;
123 VMSTAT_NR_DIRTY_BACKGROUND_THRESHOLD = 37;
124 VMSTAT_PGPGIN = 38;
125 VMSTAT_PGPGOUT = 39;
126 VMSTAT_PGPGOUTCLEAN = 40;
127 VMSTAT_PSWPIN = 41;
128 VMSTAT_PSWPOUT = 42;
129 VMSTAT_PGALLOC_DMA = 43;
130 VMSTAT_PGALLOC_NORMAL = 44;
131 VMSTAT_PGALLOC_MOVABLE = 45;
132 VMSTAT_PGFREE = 46;
133 VMSTAT_PGACTIVATE = 47;
134 VMSTAT_PGDEACTIVATE = 48;
135 VMSTAT_PGFAULT = 49;
136 VMSTAT_PGMAJFAULT = 50;
137 VMSTAT_PGREFILL_DMA = 51;
138 VMSTAT_PGREFILL_NORMAL = 52;
139 VMSTAT_PGREFILL_MOVABLE = 53;
140 VMSTAT_PGSTEAL_KSWAPD_DMA = 54;
141 VMSTAT_PGSTEAL_KSWAPD_NORMAL = 55;
142 VMSTAT_PGSTEAL_KSWAPD_MOVABLE = 56;
143 VMSTAT_PGSTEAL_DIRECT_DMA = 57;
144 VMSTAT_PGSTEAL_DIRECT_NORMAL = 58;
145 VMSTAT_PGSTEAL_DIRECT_MOVABLE = 59;
146 VMSTAT_PGSCAN_KSWAPD_DMA = 60;
147 VMSTAT_PGSCAN_KSWAPD_NORMAL = 61;
148 VMSTAT_PGSCAN_KSWAPD_MOVABLE = 62;
149 VMSTAT_PGSCAN_DIRECT_DMA = 63;
150 VMSTAT_PGSCAN_DIRECT_NORMAL = 64;
151 VMSTAT_PGSCAN_DIRECT_MOVABLE = 65;
152 VMSTAT_PGSCAN_DIRECT_THROTTLE = 66;
153 VMSTAT_PGINODESTEAL = 67;
154 VMSTAT_SLABS_SCANNED = 68;
155 VMSTAT_KSWAPD_INODESTEAL = 69;
156 VMSTAT_KSWAPD_LOW_WMARK_HIT_QUICKLY = 70;
157 VMSTAT_KSWAPD_HIGH_WMARK_HIT_QUICKLY = 71;
158 VMSTAT_PAGEOUTRUN = 72;
159 VMSTAT_ALLOCSTALL = 73;
160 VMSTAT_PGROTATED = 74;
161 VMSTAT_DROP_PAGECACHE = 75;
162 VMSTAT_DROP_SLAB = 76;
163 VMSTAT_PGMIGRATE_SUCCESS = 77;
164 VMSTAT_PGMIGRATE_FAIL = 78;
165 VMSTAT_COMPACT_MIGRATE_SCANNED = 79;
166 VMSTAT_COMPACT_FREE_SCANNED = 80;
167 VMSTAT_COMPACT_ISOLATED = 81;
168 VMSTAT_COMPACT_STALL = 82;
169 VMSTAT_COMPACT_FAIL = 83;
170 VMSTAT_COMPACT_SUCCESS = 84;
171 VMSTAT_COMPACT_DAEMON_WAKE = 85;
172 VMSTAT_UNEVICTABLE_PGS_CULLED = 86;
173 VMSTAT_UNEVICTABLE_PGS_SCANNED = 87;
174 VMSTAT_UNEVICTABLE_PGS_RESCUED = 88;
175 VMSTAT_UNEVICTABLE_PGS_MLOCKED = 89;
176 VMSTAT_UNEVICTABLE_PGS_MUNLOCKED = 90;
177 VMSTAT_UNEVICTABLE_PGS_CLEARED = 91;
178 VMSTAT_UNEVICTABLE_PGS_STRANDED = 92;
Primiano Tucci1eb966d2019-06-06 15:40:09 +0100179 VMSTAT_NR_ZSPAGES = 93;
180 VMSTAT_NR_ION_HEAP = 94;
181 VMSTAT_NR_GPU_HEAP = 95;
Primiano Tucci82a8bfd2018-09-19 11:33:04 +0100182}
183// End of protos/perfetto/common/sys_stats_counters.proto
184
Ryan Savitski41ce4592019-05-02 14:43:59 +0100185// Begin of protos/perfetto/common/trace_stats.proto
186
187// Statistics for the internals of the tracing service.
188//
189// Next id: 10.
190message TraceStats {
191 // From TraceBuffer::Stats.
192 //
Eric Secklera5161642019-08-02 14:03:32 +0100193 // Next id: 20.
Ryan Savitski41ce4592019-05-02 14:43:59 +0100194 message BufferStats {
195 // Size of the circular buffer in bytes.
196 optional uint64 buffer_size = 12;
197
198 // Num. bytes written into the circular buffer, including chunk headers.
199 optional uint64 bytes_written = 1;
200
201 // Num. bytes overwritten before they have been read (i.e. loss of data).
202 optional uint64 bytes_overwritten = 13;
203
204 // Total size of chunks that were fully read from the circular buffer by the
205 // consumer. This may not be equal to |bytes_written| either in the middle
206 // of tracing, or if |chunks_overwritten| is non-zero. Note that this is the
207 // size of the chunks read from the buffer, including chunk headers, which
208 // will be different from the total size of packets returned to the
209 // consumer.
210 //
211 // The current utilization of the trace buffer (mid-tracing) can be obtained
212 // by subtracting |bytes_read| and |bytes_overwritten| from |bytes_written|,
213 // adding the difference of |padding_bytes_written| and
214 // |padding_bytes_cleared|, and comparing this sum to the |buffer_size|.
215 // Note that this represents the total size of buffered data in the buffer,
216 // yet this data may be spread non-contiguously through the buffer and may
217 // be overridden before the utilization reaches 100%.
218 optional uint64 bytes_read = 14;
219
220 // Num. bytes that were allocated as padding between chunks in the circular
221 // buffer.
222 optional uint64 padding_bytes_written = 15;
223
224 // Num. of padding bytes that were removed from the circular buffer when
225 // they were overwritten.
226 //
227 // The difference between |padding_bytes_written| and
228 // |padding_bytes_cleared| denotes the total size of padding currently
229 // present in the buffer.
230 optional uint64 padding_bytes_cleared = 16;
231
232 // Num. chunks (!= packets) written into the buffer.
233 optional uint64 chunks_written = 2;
234
235 // Num. chunks (!= packets) rewritten into the buffer. This means we rewrote
236 // the same chunk with additional packets appended to the end.
237 optional uint64 chunks_rewritten = 10;
238
239 // Num. chunks overwritten before they have been read (i.e. loss of data).
240 optional uint64 chunks_overwritten = 3;
241
242 // Num. chunks discarded (i.e. loss of data). Can be > 0 only when a buffer
243 // is configured with FillPolicy == DISCARD.
244 optional uint64 chunks_discarded = 18;
245
246 // Num. chunks (!= packets) that were fully read from the circular buffer by
247 // the consumer. This may not be equal to |chunks_written| either in the
248 // middle of tracing, or if |chunks_overwritten| is non-zero.
249 optional uint64 chunks_read = 17;
250
251 // Num. chunks that were committed out of order.
252 optional uint64 chunks_committed_out_of_order = 11;
253
254 // Num. times the ring buffer wrapped around.
255 optional uint64 write_wrap_count = 4;
256
257 // Num. out-of-band (OOB) patches that succeeded.
258 optional uint64 patches_succeeded = 5;
259
260 // Num. OOB patches that failed (e.g., the chunk to patch was gone).
261 optional uint64 patches_failed = 6;
262
263 // Num. readaheads (for large multi-chunk packet reads) that ended up in a
264 // successful packet read.
265 optional uint64 readaheads_succeeded = 7;
266
267 // Num. readaheads aborted because of missing chunks in the sequence stream.
268 // Note that a small number > 0 is totally expected: occasionally, when
269 // issuing a read, the very last packet in a sequence might be incomplete
270 // (because the producer is still writing it while we read). The read will
271 // stop at that point, for that sequence, increasing this counter.
272 optional uint64 readaheads_failed = 8;
273
274 // Num. of violations of the SharedMemoryABI found while writing or reading
275 // the buffer. This is an indication of either a bug in the producer(s) or
276 // malicious producer(s).
277 optional uint64 abi_violations = 9;
Eric Secklera5161642019-08-02 14:03:32 +0100278
279 // The fields below have been introduced in Android R.
280
281 // Num. of times the service detected packet loss on a trace writer
282 // sequence. This is usually caused by exhaustion of available chunks in the
283 // writer process's SMB. Note that this relies on the client's TraceWriter
284 // indicating this loss to the service -- packets lost for other reasons are
285 // not reflected in this stat.
286 optional uint64 trace_writer_packet_loss = 19;
Ryan Savitski41ce4592019-05-02 14:43:59 +0100287 }
288
289 // Stats for the TraceBuffer(s) of the current trace session.
290 repeated BufferStats buffer_stats = 1;
291
292 // Num. producers connected (whether they are involved in the current tracing
293 // session or not).
294 optional uint32 producers_connected = 2;
295
296 // Num. producers ever seen for all trace sessions since startup (it's a good
297 // proxy for inferring num. producers crashed / killed).
298 optional uint64 producers_seen = 3;
299
300 // Num. data sources registered for all trace sessions.
301 optional uint32 data_sources_registered = 4;
302
303 // Num. data sources ever seen for all trace sessions since startup.
304 optional uint64 data_sources_seen = 5;
305
306 // Num. concurrently active tracing sessions.
307 optional uint32 tracing_sessions = 6;
308
309 // Num. buffers for all tracing session (not just the current one). This will
310 // be >= buffer_stats.size(), because the latter is only about the current
311 // session.
312 optional uint32 total_buffers = 7;
313
314 // The fields below have been introduced in Android Q.
315
316 // Num. chunks that were discarded by the service before attempting to commit
317 // them to a buffer, e.g. because the producer specified an invalid buffer ID.
318 optional uint64 chunks_discarded = 8;
319
320 // Num. patches that were discarded by the service before attempting to apply
321 // them to a buffer, e.g. because the producer specified an invalid buffer ID.
322 optional uint64 patches_discarded = 9;
Florian Mayerf2d45692019-07-25 16:03:48 +0100323
324 // Packets that failed validation of the TrustedPacket. If this is > 0, there
325 // is a bug in the producer.
326 optional uint64 invalid_packets = 10;
Ryan Savitski41ce4592019-05-02 14:43:59 +0100327}
328
329// End of protos/perfetto/common/trace_stats.proto
330
Primiano Tucci64df2ca2019-01-03 22:26:47 +0000331// Begin of protos/perfetto/trace/android/android_log.proto
332
333message AndroidLogPacket {
334 message LogEvent {
335 // The log buffer (e.g. MAIN, SYSTEM, RADIO) the event comes from.
336 optional AndroidLogId log_id = 1;
337
338 // PID (TGID), TID and UID of the task that emitted the event.
339 optional int32 pid = 2;
340 optional int32 tid = 3;
341 optional int32 uid = 4;
342
343 // Timestamp [ns]. The clock source is CLOCK_REALTIME, unlike many other
344 // Perfetto trace events that instead use CLOCK_BOOTTIME. The trace
345 // processor will take care of realigning clocks using the ClockSnapshot(s).
346 optional uint64 timestamp = 5;
347
348 // When log_id == LID_EVENTS, |tag| corresponds to the event name defined in
349 // the second column of /system/etc/event-log-tags. For all other events,
350 // |tag| is the app-specified argument passed to __android_log_write().
351 optional string tag = 6;
352
353 // Empty when log_id == LID_EVENTS.
354 optional AndroidLogPriority prio = 7;
355
356 // Empty when log_id == LID_EVENTS.
357 optional string message = 8;
358
359 message Arg {
360 optional string name = 1;
361 oneof value {
362 int64 int_value = 2;
363 float float_value = 3;
364 string string_value = 4;
365 }
366 }
367 // Only populated when log_id == LID_EVENTS.
368 repeated Arg args = 9;
369 }
370
371 repeated LogEvent events = 1;
372
373 // Stats are emitted only upon Flush() and are monotonic (i.e. they are
374 // absolute counters since the beginning of the lifetime of the tracing
375 // session and NOT relative to the previous Stats snapshot).
376 message Stats {
377 // Total number of log events seen, including errors and skipped entries
378 // (num of events stored in the trace = total - failed - skipped).
379 optional uint64 num_total = 1;
380
381 // Parser failures.
382 optional uint64 num_failed = 2;
383
384 // Messages skipped due to filters.
385 optional uint64 num_skipped = 3;
386 }
387 optional Stats stats = 2;
388}
389
390// End of protos/perfetto/trace/android/android_log.proto
391
Mikael Pessa625a0912019-07-24 15:28:16 -0700392// Begin of protos/perfetto/trace/android/graphics_frame_event.proto
393
394// Generated by Android's SurfaceFlinger.
395message GraphicsFrameEvent {
396 enum BufferEventType {
397 UNSPECIFIED = 0;
398 DEQUEUE = 1;
399 QUEUE = 2;
400 POST = 3;
401 ACQUIRE_FENCE = 4;
402 LATCH = 5;
403 HWC_COMPOSITION_QUEUED = 6; // HWC will compose this buffer
404 FALLBACK_COMPOSITION = 7; // renderEngine composition
405 PRESENT_FENCE = 8;
406 RELEASE_FENCE = 9;
407 MODIFY = 10;
408 }
409
410 message BufferEvent {
411 optional uint32 frame_number = 1;
412 optional BufferEventType type = 2;
413 optional string layer_name = 3;
414 // If no duration is set, the event is an instant event.
415 optional uint64 duration_ns = 4;
416 // Unique buffer identifier.
417 optional uint32 buffer_id = 5;
418 }
419
420 optional BufferEvent buffer_event = 1;
421}
422
423// End of protos/perfetto/trace/android/graphics_frame_event.proto
424
Florian Mayer12f0f8e2019-04-02 12:31:13 +0100425// Begin of protos/perfetto/trace/android/packages_list.proto
426
427message PackagesList {
Florian Mayere7647412019-04-04 11:00:51 +0100428 message PackageInfo {
Florian Mayer12f0f8e2019-04-02 12:31:13 +0100429 optional string name = 1;
430 optional uint64 uid = 2;
431 optional bool debuggable = 3;
432 optional bool profileable_from_shell = 4;
433 optional int64 version_code = 5;
434 }
435
Florian Mayere7647412019-04-04 11:00:51 +0100436 repeated PackageInfo packages = 1;
Florian Mayer12f0f8e2019-04-02 12:31:13 +0100437
Florian Mayer03918af2019-04-04 10:44:26 +0100438 // At least one error occurred parsing the packages.list.
Florian Mayere7647412019-04-04 11:00:51 +0100439 optional bool parse_error = 2;
440
441 // Failed to open / read packages.list.
442 optional bool read_error = 3;
Florian Mayer12f0f8e2019-04-02 12:31:13 +0100443}
444
445// End of protos/perfetto/trace/android/packages_list.proto
446
Mikhail Khokhlov5b60af52019-05-15 10:09:34 +0100447// Begin of protos/perfetto/trace/chrome/chrome_benchmark_metadata.proto
448
449// This message is not intended to be written by the chrome on the device.
450// It's emitted on the host by the telemetry benchmark infrastructure (it's a
451// part of the trace that's written by the telemetry tracing agent).
452message ChromeBenchmarkMetadata {
453 // Time when the benchmark execution started (host unixtime in microseconds).
454 optional int64 benchmark_start_time_us = 1;
455
456 // Time when this particular story was run (host unixtime in microseconds).
457 optional int64 story_run_time_us = 2;
458
459 // Name of benchmark.
460 optional string benchmark_name = 3;
461
462 // Description of benchmark.
463 optional string benchmark_description = 4;
464
465 // Optional label.
466 optional string label = 5;
467
468 // Name of story.
469 optional string story_name = 6;
470
471 // List of story tags.
472 repeated string story_tags = 7;
473
474 // Index of the story run (>0 if the same story was run several times).
475 optional int32 story_run_index = 8;
476
477 // Whether this run failed.
478 optional bool had_failures = 9;
479}
480
481// End of protos/perfetto/trace/chrome/chrome_benchmark_metadata.proto
482
Siddhartha S1239fb32019-06-06 11:17:13 -0700483// Begin of protos/perfetto/trace/chrome/chrome_metadata.proto
484
485// Metadata for chrome traces.
486message ChromeMetadataPacket {
487 optional BackgroundTracingMetadata background_tracing_metadata = 1;
488}
489
490// Metadata related to background tracing scenarios, states and triggers.
491message BackgroundTracingMetadata {
492 // Information about a trigger rule defined in the experiment config.
493 message TriggerRule {
494 enum TriggerType {
495 TRIGGER_UNSPECIFIED = 0;
496
497 // Traces are triggered by specific range of values of an UMA histogram.
498 MONITOR_AND_DUMP_WHEN_SPECIFIC_HISTOGRAM_AND_VALUE = 1;
499
500 // Traces are triggered by specific named events in chromium codebase,
501 // like "second-update-failure".
502 MONITOR_AND_DUMP_WHEN_TRIGGER_NAMED = 2;
503 }
504 optional TriggerType trigger_type = 1;
505
506 // Configuration of histogram trigger.
507 message HistogramRule {
508 // UMA histogram name hash, same as HistogramEventProto.name_hash.
509 optional fixed64 histogram_name_hash = 1;
510
511 // Range of values of the histogram that activates trigger.
512 optional int64 histogram_min_trigger = 2;
513 optional int64 histogram_max_trigger = 3;
514 }
515 optional HistogramRule histogram_rule = 2;
516
517 // Configuration of named trigger.
518 message NamedRule {
519 enum EventType {
520 UNSPECIFIED = 0;
521 SESSION_RESTORE = 1;
522 NAVIGATION = 2;
523 STARTUP = 3;
524
525 TEST_RULE = 1000;
526 }
527 optional EventType event_type = 1;
528 }
529 optional NamedRule named_rule = 3;
530 }
531
532 // Specifies the rule that caused the trace to be uploaded.
533 optional TriggerRule triggered_rule = 1;
534
535 // List of all active triggers in current session, when trace was triggered.
536 repeated TriggerRule active_rules = 2;
537}
538
539// End of protos/perfetto/trace/chrome/chrome_metadata.proto
540
Hector Dearmane92c6742018-11-22 21:42:39 +0000541// Begin of protos/perfetto/trace/clock_snapshot.proto
Hector Dearman55ef3e02018-04-11 17:28:55 +0100542
Hector Dearmane92c6742018-11-22 21:42:39 +0000543// A snapshot of clock readings to allow for trace alignment.
544message ClockSnapshot {
545 message Clock {
Primiano Tucci3e7ca4f2019-08-09 20:49:26 +0200546 enum BuiltinClocks {
Hector Dearmane92c6742018-11-22 21:42:39 +0000547 UNKNOWN = 0;
548 REALTIME = 1;
549 REALTIME_COARSE = 2;
550 MONOTONIC = 3;
551 MONOTONIC_COARSE = 4;
552 MONOTONIC_RAW = 5;
553 BOOTTIME = 6;
554 PROCESS_CPUTIME = 7;
555 THREAD_CPUTIME = 8;
Primiano Tucci3e7ca4f2019-08-09 20:49:26 +0200556 BUILTIN_CLOCK_MAX_ID = 63;
Hector Dearmane92c6742018-11-22 21:42:39 +0000557 }
Primiano Tucci3e7ca4f2019-08-09 20:49:26 +0200558
559 // Clock IDs have the following semantic:
560 // [1, 63]: Builtin types, see BuiltinClocks above.
561 // [64, 127]: User-defined clocks. These clocks are sequence-scoped. They
562 // are only valid within the same |trusted_packet_sequence_id|
563 // (i.e. only for TracePacket(s) emitted by the same TraceWriter
564 // that emitted the clock snapshot).
565 // [128, MAX]: Reserved for future use. The idea is to allow global clock
566 // IDs and setting this ID to hash(full_clock_name) & ~127.
567 optional uint32 clock_id = 1;
568
569 // Unit is ns unless specified otherwise by the resolution_* fields below.
Hector Dearmane92c6742018-11-22 21:42:39 +0000570 optional uint64 timestamp = 2;
Primiano Tucci3e7ca4f2019-08-09 20:49:26 +0200571
572 // TODO(eseckler): the fields below and sequence-scoped clock IDs are not
573 // supported yet by the trace processor.
574
575 // When true the timestamp should be interpreted as a delta from the last
576 // TracePacket's timestamp emitted by the same packet_sequence_id.
577 // The first packet timestamp after a ClockSnapshot is relative to the last
578 // ClockSnapshot seen on the packet sequence.
579 // optional bool is_incremental = 3;
580
581 // Allows to specify a custom unit different than the default (ns)
582 // for this clock domain. A multiplier of 1000 means that a timestamp = 3
583 // should be interpreted as 3000 ns = 3 us.
584 // optional uint64 unit_multiplier_ns = 4;
Hector Dearman55ef3e02018-04-11 17:28:55 +0100585 }
Hector Dearmane92c6742018-11-22 21:42:39 +0000586 repeated Clock clocks = 1;
Hector Dearman55ef3e02018-04-11 17:28:55 +0100587}
588
Hector Dearmane92c6742018-11-22 21:42:39 +0000589// End of protos/perfetto/trace/clock_snapshot.proto
Hector Dearman55ef3e02018-04-11 17:28:55 +0100590
Florian Mayerbeba7262018-04-17 19:05:43 +0100591// Begin of protos/perfetto/trace/filesystem/inode_file_map.proto
592
593// Represents the mapping between inode numbers in a block device and their path
594// on the filesystem
595message InodeFileMap {
596 // Representation of Entry
597 message Entry {
598 optional uint64 inode_number = 1;
599
600 // The path to the file, e.g. "etc/file.xml"
601 // List of strings for multiple hardlinks
602 repeated string paths = 2;
603
604 // The file type
605 enum Type {
606 UNKNOWN = 0;
607 FILE = 1;
608 DIRECTORY = 2;
609 }
610 optional Type type = 3;
611 }
612
613 optional uint64 block_device_id = 1;
614
615 // The mount points of the block device, e.g. ["system"].
616 repeated string mount_points = 2;
617
618 // The list of all the entries from the block device
619 repeated Entry entries = 3;
620}
621
622// End of protos/perfetto/trace/filesystem/inode_file_map.proto
623
Hector Dearmane0e57802018-11-21 16:09:56 +0000624// Begin of protos/perfetto/trace/ftrace/binder.proto
Hector Dearman55ef3e02018-04-11 17:28:55 +0100625
626message BinderTransactionFtraceEvent {
627 optional int32 debug_id = 1;
628 optional int32 target_node = 2;
629 optional int32 to_proc = 3;
630 optional int32 to_thread = 4;
631 optional int32 reply = 5;
632 optional uint32 code = 6;
633 optional uint32 flags = 7;
634}
Hector Dearman55ef3e02018-04-11 17:28:55 +0100635message BinderTransactionReceivedFtraceEvent {
636 optional int32 debug_id = 1;
637}
Hector Dearmane0e57802018-11-21 16:09:56 +0000638message BinderSetPriorityFtraceEvent {
639 optional int32 proc = 1;
640 optional int32 thread = 2;
641 optional uint32 old_prio = 3;
642 optional uint32 new_prio = 4;
643 optional uint32 desired_prio = 5;
644}
645message BinderLockFtraceEvent {
646 optional string tag = 1;
647}
648message BinderLockedFtraceEvent {
649 optional string tag = 1;
650}
Hector Dearman55ef3e02018-04-11 17:28:55 +0100651message BinderUnlockFtraceEvent {
652 optional string tag = 1;
653}
Hector Dearmane0e57802018-11-21 16:09:56 +0000654message BinderTransactionAllocBufFtraceEvent {
655 optional uint64 data_size = 1;
656 optional int32 debug_id = 2;
657 optional uint64 offsets_size = 3;
Hector Dearman55ef3e02018-04-11 17:28:55 +0100658}
659
Hector Dearmane0e57802018-11-21 16:09:56 +0000660// End of protos/perfetto/trace/ftrace/binder.proto
Hector Dearman55ef3e02018-04-11 17:28:55 +0100661
Hector Dearmane0e57802018-11-21 16:09:56 +0000662// Begin of protos/perfetto/trace/ftrace/block.proto
Hector Dearman55ef3e02018-04-11 17:28:55 +0100663
664message BlockRqIssueFtraceEvent {
665 optional uint64 dev = 1;
666 optional uint64 sector = 2;
667 optional uint32 nr_sector = 3;
668 optional uint32 bytes = 4;
669 optional string rwbs = 5;
670 optional string comm = 6;
671 optional string cmd = 7;
672}
Hector Dearmane0e57802018-11-21 16:09:56 +0000673message BlockBioBackmergeFtraceEvent {
674 optional uint64 dev = 1;
675 optional uint64 sector = 2;
676 optional uint32 nr_sector = 3;
677 optional string rwbs = 4;
678 optional string comm = 5;
679}
680message BlockBioBounceFtraceEvent {
681 optional uint64 dev = 1;
682 optional uint64 sector = 2;
683 optional uint32 nr_sector = 3;
684 optional string rwbs = 4;
685 optional string comm = 5;
686}
687message BlockBioCompleteFtraceEvent {
688 optional uint64 dev = 1;
689 optional uint64 sector = 2;
690 optional uint32 nr_sector = 3;
691 optional int32 error = 4;
692 optional string rwbs = 5;
693}
694message BlockBioFrontmergeFtraceEvent {
695 optional uint64 dev = 1;
696 optional uint64 sector = 2;
697 optional uint32 nr_sector = 3;
698 optional string rwbs = 4;
699 optional string comm = 5;
700}
701message BlockBioQueueFtraceEvent {
702 optional uint64 dev = 1;
703 optional uint64 sector = 2;
704 optional uint32 nr_sector = 3;
705 optional string rwbs = 4;
706 optional string comm = 5;
707}
708message BlockBioRemapFtraceEvent {
709 optional uint64 dev = 1;
710 optional uint64 sector = 2;
711 optional uint32 nr_sector = 3;
712 optional uint64 old_dev = 4;
713 optional uint64 old_sector = 5;
714 optional string rwbs = 6;
715}
716message BlockDirtyBufferFtraceEvent {
717 optional uint64 dev = 1;
718 optional uint64 sector = 2;
719 optional uint64 size = 3;
720}
721message BlockGetrqFtraceEvent {
722 optional uint64 dev = 1;
723 optional uint64 sector = 2;
724 optional uint32 nr_sector = 3;
725 optional string rwbs = 4;
726 optional string comm = 5;
727}
728message BlockPlugFtraceEvent {
729 optional string comm = 1;
730}
731message BlockRqAbortFtraceEvent {
732 optional uint64 dev = 1;
733 optional uint64 sector = 2;
734 optional uint32 nr_sector = 3;
735 optional int32 errors = 4;
736 optional string rwbs = 5;
737 optional string cmd = 6;
738}
739message BlockRqCompleteFtraceEvent {
740 optional uint64 dev = 1;
741 optional uint64 sector = 2;
742 optional uint32 nr_sector = 3;
743 optional int32 errors = 4;
744 optional string rwbs = 5;
745 optional string cmd = 6;
746}
747message BlockRqInsertFtraceEvent {
748 optional uint64 dev = 1;
749 optional uint64 sector = 2;
750 optional uint32 nr_sector = 3;
751 optional uint32 bytes = 4;
752 optional string rwbs = 5;
753 optional string comm = 6;
754 optional string cmd = 7;
755}
756message BlockRqRemapFtraceEvent {
757 optional uint64 dev = 1;
758 optional uint64 sector = 2;
759 optional uint32 nr_sector = 3;
760 optional uint64 old_dev = 4;
761 optional uint64 old_sector = 5;
762 optional uint32 nr_bios = 6;
763 optional string rwbs = 7;
764}
765message BlockRqRequeueFtraceEvent {
766 optional uint64 dev = 1;
767 optional uint64 sector = 2;
768 optional uint32 nr_sector = 3;
769 optional int32 errors = 4;
770 optional string rwbs = 5;
771 optional string cmd = 6;
772}
773message BlockSleeprqFtraceEvent {
774 optional uint64 dev = 1;
775 optional uint64 sector = 2;
776 optional uint32 nr_sector = 3;
777 optional string rwbs = 4;
778 optional string comm = 5;
779}
780message BlockSplitFtraceEvent {
781 optional uint64 dev = 1;
782 optional uint64 sector = 2;
783 optional uint64 new_sector = 3;
784 optional string rwbs = 4;
785 optional string comm = 5;
786}
787message BlockTouchBufferFtraceEvent {
788 optional uint64 dev = 1;
789 optional uint64 sector = 2;
790 optional uint64 size = 3;
791}
792message BlockUnplugFtraceEvent {
793 optional int32 nr_rq = 1;
794 optional string comm = 2;
Hector Dearman55ef3e02018-04-11 17:28:55 +0100795}
796
Hector Dearmane0e57802018-11-21 16:09:56 +0000797// End of protos/perfetto/trace/ftrace/block.proto
Hector Dearman55ef3e02018-04-11 17:28:55 +0100798
Hector Dearmane0e57802018-11-21 16:09:56 +0000799// Begin of protos/perfetto/trace/ftrace/clk.proto
Hector Dearman55ef3e02018-04-11 17:28:55 +0100800
Hector Dearmane0e57802018-11-21 16:09:56 +0000801message ClkEnableFtraceEvent {
Hector Dearman55ef3e02018-04-11 17:28:55 +0100802 optional string name = 1;
Hector Dearmane0e57802018-11-21 16:09:56 +0000803}
804message ClkDisableFtraceEvent {
805 optional string name = 1;
806}
807message ClkSetRateFtraceEvent {
808 optional string name = 1;
809 optional uint64 rate = 2;
Hector Dearman55ef3e02018-04-11 17:28:55 +0100810}
811
Hector Dearmane0e57802018-11-21 16:09:56 +0000812// End of protos/perfetto/trace/ftrace/clk.proto
Hector Dearman55ef3e02018-04-11 17:28:55 +0100813
Hector Dearmane0e57802018-11-21 16:09:56 +0000814// Begin of protos/perfetto/trace/ftrace/ext4.proto
Hector Dearman55ef3e02018-04-11 17:28:55 +0100815
816message Ext4DaWriteBeginFtraceEvent {
817 optional uint64 dev = 1;
818 optional uint64 ino = 2;
819 optional int64 pos = 3;
820 optional uint32 len = 4;
821 optional uint32 flags = 5;
822}
Hector Dearman55ef3e02018-04-11 17:28:55 +0100823message Ext4DaWriteEndFtraceEvent {
824 optional uint64 dev = 1;
825 optional uint64 ino = 2;
826 optional int64 pos = 3;
827 optional uint32 len = 4;
828 optional uint32 copied = 5;
829}
Hector Dearmane0e57802018-11-21 16:09:56 +0000830message Ext4SyncFileEnterFtraceEvent {
831 optional uint64 dev = 1;
832 optional uint64 ino = 2;
833 optional uint64 parent = 3;
834 optional int32 datasync = 4;
835}
836message Ext4SyncFileExitFtraceEvent {
837 optional uint64 dev = 1;
838 optional uint64 ino = 2;
839 optional int32 ret = 3;
840}
841message Ext4AllocDaBlocksFtraceEvent {
842 optional uint64 dev = 1;
843 optional uint64 ino = 2;
844 optional uint32 data_blocks = 3;
845 optional uint32 meta_blocks = 4;
846}
847message Ext4AllocateBlocksFtraceEvent {
848 optional uint64 dev = 1;
849 optional uint64 ino = 2;
850 optional uint64 block = 3;
851 optional uint32 len = 4;
852 optional uint32 logical = 5;
853 optional uint32 lleft = 6;
854 optional uint32 lright = 7;
855 optional uint64 goal = 8;
856 optional uint64 pleft = 9;
857 optional uint64 pright = 10;
858 optional uint32 flags = 11;
859}
860message Ext4AllocateInodeFtraceEvent {
861 optional uint64 dev = 1;
862 optional uint64 ino = 2;
863 optional uint64 dir = 3;
864 optional uint32 mode = 4;
865}
866message Ext4BeginOrderedTruncateFtraceEvent {
867 optional uint64 dev = 1;
868 optional uint64 ino = 2;
869 optional int64 new_size = 3;
870}
871message Ext4CollapseRangeFtraceEvent {
872 optional uint64 dev = 1;
873 optional uint64 ino = 2;
874 optional int64 offset = 3;
875 optional int64 len = 4;
876}
877message Ext4DaReleaseSpaceFtraceEvent {
878 optional uint64 dev = 1;
879 optional uint64 ino = 2;
880 optional uint64 i_blocks = 3;
881 optional int32 freed_blocks = 4;
882 optional int32 reserved_data_blocks = 5;
883 optional int32 reserved_meta_blocks = 6;
884 optional int32 allocated_meta_blocks = 7;
885 optional uint32 mode = 8;
886}
887message Ext4DaReserveSpaceFtraceEvent {
888 optional uint64 dev = 1;
889 optional uint64 ino = 2;
890 optional uint64 i_blocks = 3;
891 optional int32 reserved_data_blocks = 4;
892 optional int32 reserved_meta_blocks = 5;
893 optional uint32 mode = 6;
894 optional int32 md_needed = 7;
895}
896message Ext4DaUpdateReserveSpaceFtraceEvent {
897 optional uint64 dev = 1;
898 optional uint64 ino = 2;
899 optional uint64 i_blocks = 3;
900 optional int32 used_blocks = 4;
901 optional int32 reserved_data_blocks = 5;
902 optional int32 reserved_meta_blocks = 6;
903 optional int32 allocated_meta_blocks = 7;
904 optional int32 quota_claim = 8;
905 optional uint32 mode = 9;
906}
907message Ext4DaWritePagesFtraceEvent {
908 optional uint64 dev = 1;
909 optional uint64 ino = 2;
910 optional uint64 first_page = 3;
911 optional int64 nr_to_write = 4;
912 optional int32 sync_mode = 5;
913 optional uint64 b_blocknr = 6;
914 optional uint32 b_size = 7;
915 optional uint32 b_state = 8;
916 optional int32 io_done = 9;
917 optional int32 pages_written = 10;
918}
919message Ext4DaWritePagesExtentFtraceEvent {
920 optional uint64 dev = 1;
921 optional uint64 ino = 2;
922 optional uint64 lblk = 3;
923 optional uint32 len = 4;
924 optional uint32 flags = 5;
925}
926message Ext4DirectIOEnterFtraceEvent {
927 optional uint64 dev = 1;
928 optional uint64 ino = 2;
929 optional int64 pos = 3;
930 optional uint64 len = 4;
931 optional int32 rw = 5;
932}
933message Ext4DirectIOExitFtraceEvent {
934 optional uint64 dev = 1;
935 optional uint64 ino = 2;
936 optional int64 pos = 3;
937 optional uint64 len = 4;
938 optional int32 rw = 5;
939 optional int32 ret = 6;
940}
941message Ext4DiscardBlocksFtraceEvent {
942 optional uint64 dev = 1;
943 optional uint64 blk = 2;
944 optional uint64 count = 3;
945}
946message Ext4DiscardPreallocationsFtraceEvent {
947 optional uint64 dev = 1;
948 optional uint64 ino = 2;
949}
950message Ext4DropInodeFtraceEvent {
951 optional uint64 dev = 1;
952 optional uint64 ino = 2;
953 optional int32 drop = 3;
954}
955message Ext4EsCacheExtentFtraceEvent {
956 optional uint64 dev = 1;
957 optional uint64 ino = 2;
958 optional uint32 lblk = 3;
959 optional uint32 len = 4;
960 optional uint64 pblk = 5;
961 optional uint32 status = 6;
962}
963message Ext4EsFindDelayedExtentRangeEnterFtraceEvent {
964 optional uint64 dev = 1;
965 optional uint64 ino = 2;
966 optional uint32 lblk = 3;
967}
968message Ext4EsFindDelayedExtentRangeExitFtraceEvent {
969 optional uint64 dev = 1;
970 optional uint64 ino = 2;
971 optional uint32 lblk = 3;
972 optional uint32 len = 4;
973 optional uint64 pblk = 5;
974 optional uint64 status = 6;
975}
976message Ext4EsInsertExtentFtraceEvent {
977 optional uint64 dev = 1;
978 optional uint64 ino = 2;
979 optional uint32 lblk = 3;
980 optional uint32 len = 4;
981 optional uint64 pblk = 5;
982 optional uint64 status = 6;
983}
Hector Dearman55ef3e02018-04-11 17:28:55 +0100984message Ext4EsLookupExtentEnterFtraceEvent {
985 optional uint64 dev = 1;
986 optional uint64 ino = 2;
987 optional uint32 lblk = 3;
988}
Hector Dearman55ef3e02018-04-11 17:28:55 +0100989message Ext4EsLookupExtentExitFtraceEvent {
990 optional uint64 dev = 1;
991 optional uint64 ino = 2;
992 optional uint32 lblk = 3;
993 optional uint32 len = 4;
994 optional uint64 pblk = 5;
Florian Mayer7c9e3b22018-04-26 11:55:15 +0100995 optional uint64 status = 6;
Hector Dearman55ef3e02018-04-11 17:28:55 +0100996 optional int32 found = 7;
997}
Hector Dearmane0e57802018-11-21 16:09:56 +0000998message Ext4EsRemoveExtentFtraceEvent {
999 optional uint64 dev = 1;
1000 optional uint64 ino = 2;
1001 optional int64 lblk = 3;
1002 optional int64 len = 4;
1003}
1004message Ext4EsShrinkFtraceEvent {
1005 optional uint64 dev = 1;
1006 optional int32 nr_shrunk = 2;
1007 optional uint64 scan_time = 3;
1008 optional int32 nr_skipped = 4;
1009 optional int32 retried = 5;
1010}
1011message Ext4EsShrinkCountFtraceEvent {
1012 optional uint64 dev = 1;
1013 optional int32 nr_to_scan = 2;
1014 optional int32 cache_cnt = 3;
1015}
1016message Ext4EsShrinkScanEnterFtraceEvent {
1017 optional uint64 dev = 1;
1018 optional int32 nr_to_scan = 2;
1019 optional int32 cache_cnt = 3;
1020}
1021message Ext4EsShrinkScanExitFtraceEvent {
1022 optional uint64 dev = 1;
1023 optional int32 nr_shrunk = 2;
1024 optional int32 cache_cnt = 3;
1025}
1026message Ext4EvictInodeFtraceEvent {
1027 optional uint64 dev = 1;
1028 optional uint64 ino = 2;
1029 optional int32 nlink = 3;
1030}
1031message Ext4ExtConvertToInitializedEnterFtraceEvent {
1032 optional uint64 dev = 1;
1033 optional uint64 ino = 2;
1034 optional uint32 m_lblk = 3;
1035 optional uint32 m_len = 4;
1036 optional uint32 u_lblk = 5;
1037 optional uint32 u_len = 6;
1038 optional uint64 u_pblk = 7;
1039}
1040message Ext4ExtConvertToInitializedFastpathFtraceEvent {
1041 optional uint64 dev = 1;
1042 optional uint64 ino = 2;
1043 optional uint32 m_lblk = 3;
1044 optional uint32 m_len = 4;
1045 optional uint32 u_lblk = 5;
1046 optional uint32 u_len = 6;
1047 optional uint64 u_pblk = 7;
1048 optional uint32 i_lblk = 8;
1049 optional uint32 i_len = 9;
1050 optional uint64 i_pblk = 10;
1051}
1052message Ext4ExtHandleUnwrittenExtentsFtraceEvent {
1053 optional uint64 dev = 1;
1054 optional uint64 ino = 2;
1055 optional int32 flags = 3;
1056 optional uint32 lblk = 4;
1057 optional uint64 pblk = 5;
1058 optional uint32 len = 6;
1059 optional uint32 allocated = 7;
1060 optional uint64 newblk = 8;
1061}
1062message Ext4ExtInCacheFtraceEvent {
1063 optional uint64 dev = 1;
1064 optional uint64 ino = 2;
1065 optional uint32 lblk = 3;
1066 optional int32 ret = 4;
1067}
1068message Ext4ExtLoadExtentFtraceEvent {
1069 optional uint64 dev = 1;
1070 optional uint64 ino = 2;
1071 optional uint64 pblk = 3;
1072 optional uint32 lblk = 4;
1073}
1074message Ext4ExtMapBlocksEnterFtraceEvent {
1075 optional uint64 dev = 1;
1076 optional uint64 ino = 2;
1077 optional uint32 lblk = 3;
1078 optional uint32 len = 4;
1079 optional uint32 flags = 5;
1080}
1081message Ext4ExtMapBlocksExitFtraceEvent {
1082 optional uint64 dev = 1;
1083 optional uint64 ino = 2;
1084 optional uint32 flags = 3;
1085 optional uint64 pblk = 4;
1086 optional uint32 lblk = 5;
1087 optional uint32 len = 6;
1088 optional uint32 mflags = 7;
1089 optional int32 ret = 8;
1090}
1091message Ext4ExtPutInCacheFtraceEvent {
1092 optional uint64 dev = 1;
1093 optional uint64 ino = 2;
1094 optional uint32 lblk = 3;
1095 optional uint32 len = 4;
1096 optional uint64 start = 5;
1097}
1098message Ext4ExtRemoveSpaceFtraceEvent {
1099 optional uint64 dev = 1;
1100 optional uint64 ino = 2;
1101 optional uint32 start = 3;
1102 optional uint32 end = 4;
1103 optional int32 depth = 5;
1104}
1105message Ext4ExtRemoveSpaceDoneFtraceEvent {
1106 optional uint64 dev = 1;
1107 optional uint64 ino = 2;
1108 optional uint32 start = 3;
1109 optional uint32 end = 4;
1110 optional int32 depth = 5;
1111 optional int64 partial = 6;
1112 optional uint32 eh_entries = 7;
1113}
1114message Ext4ExtRmIdxFtraceEvent {
1115 optional uint64 dev = 1;
1116 optional uint64 ino = 2;
1117 optional uint64 pblk = 3;
1118}
1119message Ext4ExtRmLeafFtraceEvent {
1120 optional uint64 dev = 1;
1121 optional uint64 ino = 2;
1122 optional int64 partial = 3;
1123 optional uint32 start = 4;
1124 optional uint32 ee_lblk = 5;
1125 optional uint64 ee_pblk = 6;
1126 optional int32 ee_len = 7;
1127}
1128message Ext4ExtShowExtentFtraceEvent {
1129 optional uint64 dev = 1;
1130 optional uint64 ino = 2;
1131 optional uint64 pblk = 3;
1132 optional uint32 lblk = 4;
1133 optional uint32 len = 5;
1134}
1135message Ext4FallocateEnterFtraceEvent {
1136 optional uint64 dev = 1;
1137 optional uint64 ino = 2;
1138 optional int64 offset = 3;
1139 optional int64 len = 4;
1140 optional int32 mode = 5;
1141 optional int64 pos = 6;
1142}
1143message Ext4FallocateExitFtraceEvent {
1144 optional uint64 dev = 1;
1145 optional uint64 ino = 2;
1146 optional int64 pos = 3;
1147 optional uint32 blocks = 4;
1148 optional int32 ret = 5;
1149}
1150message Ext4FindDelallocRangeFtraceEvent {
1151 optional uint64 dev = 1;
1152 optional uint64 ino = 2;
1153 optional uint32 from = 3;
1154 optional uint32 to = 4;
1155 optional int32 reverse = 5;
1156 optional int32 found = 6;
1157 optional uint32 found_blk = 7;
1158}
1159message Ext4ForgetFtraceEvent {
1160 optional uint64 dev = 1;
1161 optional uint64 ino = 2;
1162 optional uint64 block = 3;
1163 optional int32 is_metadata = 4;
1164 optional uint32 mode = 5;
1165}
1166message Ext4FreeBlocksFtraceEvent {
1167 optional uint64 dev = 1;
1168 optional uint64 ino = 2;
1169 optional uint64 block = 3;
1170 optional uint64 count = 4;
1171 optional int32 flags = 5;
1172 optional uint32 mode = 6;
1173}
1174message Ext4FreeInodeFtraceEvent {
1175 optional uint64 dev = 1;
1176 optional uint64 ino = 2;
1177 optional uint32 uid = 3;
1178 optional uint32 gid = 4;
1179 optional uint64 blocks = 5;
1180 optional uint32 mode = 6;
1181}
1182message Ext4GetImpliedClusterAllocExitFtraceEvent {
1183 optional uint64 dev = 1;
1184 optional uint32 flags = 2;
1185 optional uint32 lblk = 3;
1186 optional uint64 pblk = 4;
1187 optional uint32 len = 5;
1188 optional int32 ret = 6;
1189}
1190message Ext4GetReservedClusterAllocFtraceEvent {
1191 optional uint64 dev = 1;
1192 optional uint64 ino = 2;
1193 optional uint32 lblk = 3;
1194 optional uint32 len = 4;
1195}
1196message Ext4IndMapBlocksEnterFtraceEvent {
1197 optional uint64 dev = 1;
1198 optional uint64 ino = 2;
1199 optional uint32 lblk = 3;
1200 optional uint32 len = 4;
1201 optional uint32 flags = 5;
1202}
1203message Ext4IndMapBlocksExitFtraceEvent {
1204 optional uint64 dev = 1;
1205 optional uint64 ino = 2;
1206 optional uint32 flags = 3;
1207 optional uint64 pblk = 4;
1208 optional uint32 lblk = 5;
1209 optional uint32 len = 6;
1210 optional uint32 mflags = 7;
1211 optional int32 ret = 8;
1212}
1213message Ext4InsertRangeFtraceEvent {
1214 optional uint64 dev = 1;
1215 optional uint64 ino = 2;
1216 optional int64 offset = 3;
1217 optional int64 len = 4;
1218}
1219message Ext4InvalidatepageFtraceEvent {
1220 optional uint64 dev = 1;
1221 optional uint64 ino = 2;
1222 optional uint64 index = 3;
1223 optional uint64 offset = 4;
1224 optional uint32 length = 5;
1225}
1226message Ext4JournalStartFtraceEvent {
1227 optional uint64 dev = 1;
1228 optional uint64 ip = 2;
1229 optional int32 blocks = 3;
1230 optional int32 rsv_blocks = 4;
1231 optional int32 nblocks = 5;
1232}
1233message Ext4JournalStartReservedFtraceEvent {
1234 optional uint64 dev = 1;
1235 optional uint64 ip = 2;
1236 optional int32 blocks = 3;
1237}
1238message Ext4JournalledInvalidatepageFtraceEvent {
1239 optional uint64 dev = 1;
1240 optional uint64 ino = 2;
1241 optional uint64 index = 3;
1242 optional uint64 offset = 4;
1243 optional uint32 length = 5;
1244}
1245message Ext4JournalledWriteEndFtraceEvent {
1246 optional uint64 dev = 1;
1247 optional uint64 ino = 2;
1248 optional int64 pos = 3;
1249 optional uint32 len = 4;
1250 optional uint32 copied = 5;
1251}
Hector Dearman55ef3e02018-04-11 17:28:55 +01001252message Ext4LoadInodeFtraceEvent {
1253 optional uint64 dev = 1;
1254 optional uint64 ino = 2;
1255}
Hector Dearmane0e57802018-11-21 16:09:56 +00001256message Ext4LoadInodeBitmapFtraceEvent {
1257 optional uint64 dev = 1;
1258 optional uint32 group = 2;
1259}
1260message Ext4MarkInodeDirtyFtraceEvent {
1261 optional uint64 dev = 1;
1262 optional uint64 ino = 2;
1263 optional uint64 ip = 3;
1264}
1265message Ext4MbBitmapLoadFtraceEvent {
1266 optional uint64 dev = 1;
1267 optional uint32 group = 2;
1268}
1269message Ext4MbBuddyBitmapLoadFtraceEvent {
1270 optional uint64 dev = 1;
1271 optional uint32 group = 2;
1272}
1273message Ext4MbDiscardPreallocationsFtraceEvent {
1274 optional uint64 dev = 1;
1275 optional int32 needed = 2;
1276}
1277message Ext4MbNewGroupPaFtraceEvent {
1278 optional uint64 dev = 1;
1279 optional uint64 ino = 2;
1280 optional uint64 pa_pstart = 3;
1281 optional uint64 pa_lstart = 4;
1282 optional uint32 pa_len = 5;
1283}
1284message Ext4MbNewInodePaFtraceEvent {
1285 optional uint64 dev = 1;
1286 optional uint64 ino = 2;
1287 optional uint64 pa_pstart = 3;
1288 optional uint64 pa_lstart = 4;
1289 optional uint32 pa_len = 5;
1290}
1291message Ext4MbReleaseGroupPaFtraceEvent {
1292 optional uint64 dev = 1;
1293 optional uint64 pa_pstart = 2;
1294 optional uint32 pa_len = 3;
1295}
1296message Ext4MbReleaseInodePaFtraceEvent {
1297 optional uint64 dev = 1;
1298 optional uint64 ino = 2;
1299 optional uint64 block = 3;
1300 optional uint32 count = 4;
1301}
1302message Ext4MballocAllocFtraceEvent {
1303 optional uint64 dev = 1;
1304 optional uint64 ino = 2;
1305 optional uint32 orig_logical = 3;
1306 optional int32 orig_start = 4;
1307 optional uint32 orig_group = 5;
1308 optional int32 orig_len = 6;
1309 optional uint32 goal_logical = 7;
1310 optional int32 goal_start = 8;
1311 optional uint32 goal_group = 9;
1312 optional int32 goal_len = 10;
1313 optional uint32 result_logical = 11;
1314 optional int32 result_start = 12;
1315 optional uint32 result_group = 13;
1316 optional int32 result_len = 14;
1317 optional uint32 found = 15;
1318 optional uint32 groups = 16;
1319 optional uint32 buddy = 17;
1320 optional uint32 flags = 18;
1321 optional uint32 tail = 19;
1322 optional uint32 cr = 20;
1323}
1324message Ext4MballocDiscardFtraceEvent {
1325 optional uint64 dev = 1;
1326 optional uint64 ino = 2;
1327 optional int32 result_start = 3;
1328 optional uint32 result_group = 4;
1329 optional int32 result_len = 5;
1330}
1331message Ext4MballocFreeFtraceEvent {
1332 optional uint64 dev = 1;
1333 optional uint64 ino = 2;
1334 optional int32 result_start = 3;
1335 optional uint32 result_group = 4;
1336 optional int32 result_len = 5;
1337}
1338message Ext4MballocPreallocFtraceEvent {
1339 optional uint64 dev = 1;
1340 optional uint64 ino = 2;
1341 optional uint32 orig_logical = 3;
1342 optional int32 orig_start = 4;
1343 optional uint32 orig_group = 5;
1344 optional int32 orig_len = 6;
1345 optional uint32 result_logical = 7;
1346 optional int32 result_start = 8;
1347 optional uint32 result_group = 9;
1348 optional int32 result_len = 10;
1349}
1350message Ext4OtherInodeUpdateTimeFtraceEvent {
1351 optional uint64 dev = 1;
1352 optional uint64 ino = 2;
1353 optional uint64 orig_ino = 3;
1354 optional uint32 uid = 4;
1355 optional uint32 gid = 5;
1356 optional uint32 mode = 6;
1357}
1358message Ext4PunchHoleFtraceEvent {
1359 optional uint64 dev = 1;
1360 optional uint64 ino = 2;
1361 optional int64 offset = 3;
1362 optional int64 len = 4;
1363 optional int32 mode = 5;
1364}
1365message Ext4ReadBlockBitmapLoadFtraceEvent {
1366 optional uint64 dev = 1;
1367 optional uint32 group = 2;
1368}
1369message Ext4ReadpageFtraceEvent {
1370 optional uint64 dev = 1;
1371 optional uint64 ino = 2;
1372 optional uint64 index = 3;
1373}
1374message Ext4ReleasepageFtraceEvent {
1375 optional uint64 dev = 1;
1376 optional uint64 ino = 2;
1377 optional uint64 index = 3;
1378}
1379message Ext4RemoveBlocksFtraceEvent {
1380 optional uint64 dev = 1;
1381 optional uint64 ino = 2;
1382 optional uint32 from = 3;
1383 optional uint32 to = 4;
1384 optional int64 partial = 5;
1385 optional uint64 ee_pblk = 6;
1386 optional uint32 ee_lblk = 7;
1387 optional uint32 ee_len = 8;
1388}
1389message Ext4RequestBlocksFtraceEvent {
1390 optional uint64 dev = 1;
1391 optional uint64 ino = 2;
1392 optional uint32 len = 3;
1393 optional uint32 logical = 4;
1394 optional uint32 lleft = 5;
1395 optional uint32 lright = 6;
1396 optional uint64 goal = 7;
1397 optional uint64 pleft = 8;
1398 optional uint64 pright = 9;
1399 optional uint32 flags = 10;
1400}
1401message Ext4RequestInodeFtraceEvent {
1402 optional uint64 dev = 1;
1403 optional uint64 dir = 2;
1404 optional uint32 mode = 3;
1405}
1406message Ext4SyncFsFtraceEvent {
1407 optional uint64 dev = 1;
1408 optional int32 wait = 2;
1409}
1410message Ext4TrimAllFreeFtraceEvent {
1411 optional int32 dev_major = 1;
1412 optional int32 dev_minor = 2;
1413 optional uint32 group = 3;
1414 optional int32 start = 4;
1415 optional int32 len = 5;
1416}
1417message Ext4TrimExtentFtraceEvent {
1418 optional int32 dev_major = 1;
1419 optional int32 dev_minor = 2;
1420 optional uint32 group = 3;
1421 optional int32 start = 4;
1422 optional int32 len = 5;
1423}
1424message Ext4TruncateEnterFtraceEvent {
1425 optional uint64 dev = 1;
1426 optional uint64 ino = 2;
1427 optional uint64 blocks = 3;
1428}
1429message Ext4TruncateExitFtraceEvent {
1430 optional uint64 dev = 1;
1431 optional uint64 ino = 2;
1432 optional uint64 blocks = 3;
1433}
1434message Ext4UnlinkEnterFtraceEvent {
Hector Dearman55ef3e02018-04-11 17:28:55 +01001435 optional uint64 dev = 1;
1436 optional uint64 ino = 2;
1437 optional uint64 parent = 3;
Hector Dearmane0e57802018-11-21 16:09:56 +00001438 optional int64 size = 4;
Hector Dearman55ef3e02018-04-11 17:28:55 +01001439}
Hector Dearmane0e57802018-11-21 16:09:56 +00001440message Ext4UnlinkExitFtraceEvent {
Hector Dearman55ef3e02018-04-11 17:28:55 +01001441 optional uint64 dev = 1;
1442 optional uint64 ino = 2;
1443 optional int32 ret = 3;
1444}
Hector Dearmane0e57802018-11-21 16:09:56 +00001445message Ext4WriteBeginFtraceEvent {
1446 optional uint64 dev = 1;
1447 optional uint64 ino = 2;
1448 optional int64 pos = 3;
1449 optional uint32 len = 4;
1450 optional uint32 flags = 5;
1451}
1452message Ext4WriteEndFtraceEvent {
1453 optional uint64 dev = 1;
1454 optional uint64 ino = 2;
1455 optional int64 pos = 3;
1456 optional uint32 len = 4;
1457 optional uint32 copied = 5;
1458}
1459message Ext4WritepageFtraceEvent {
1460 optional uint64 dev = 1;
1461 optional uint64 ino = 2;
1462 optional uint64 index = 3;
1463}
1464message Ext4WritepagesFtraceEvent {
1465 optional uint64 dev = 1;
1466 optional uint64 ino = 2;
1467 optional int64 nr_to_write = 3;
1468 optional int64 pages_skipped = 4;
1469 optional int64 range_start = 5;
1470 optional int64 range_end = 6;
1471 optional uint64 writeback_index = 7;
1472 optional int32 sync_mode = 8;
1473 optional uint32 for_kupdate = 9;
1474 optional uint32 range_cyclic = 10;
1475}
1476message Ext4WritepagesResultFtraceEvent {
1477 optional uint64 dev = 1;
1478 optional uint64 ino = 2;
1479 optional int32 ret = 3;
1480 optional int32 pages_written = 4;
1481 optional int64 pages_skipped = 5;
1482 optional uint64 writeback_index = 6;
1483 optional int32 sync_mode = 7;
1484}
1485message Ext4ZeroRangeFtraceEvent {
1486 optional uint64 dev = 1;
1487 optional uint64 ino = 2;
1488 optional int64 offset = 3;
1489 optional int64 len = 4;
1490 optional int32 mode = 5;
1491}
Hector Dearman55ef3e02018-04-11 17:28:55 +01001492
Hector Dearmane0e57802018-11-21 16:09:56 +00001493// End of protos/perfetto/trace/ftrace/ext4.proto
Hector Dearman55ef3e02018-04-11 17:28:55 +01001494
Hector Dearmane0e57802018-11-21 16:09:56 +00001495// Begin of protos/perfetto/trace/ftrace/f2fs.proto
Hector Dearman55ef3e02018-04-11 17:28:55 +01001496
Hector Dearmane0e57802018-11-21 16:09:56 +00001497message F2fsDoSubmitBioFtraceEvent {
1498 optional uint64 dev = 1;
1499 optional int32 btype = 2;
1500 optional uint32 sync = 3;
1501 optional uint64 sector = 4;
1502 optional uint32 size = 5;
1503}
1504message F2fsEvictInodeFtraceEvent {
1505 optional uint64 dev = 1;
1506 optional uint64 ino = 2;
1507 optional uint64 pino = 3;
1508 optional uint32 mode = 4;
1509 optional int64 size = 5;
1510 optional uint32 nlink = 6;
1511 optional uint64 blocks = 7;
1512 optional uint32 advise = 8;
1513}
1514message F2fsFallocateFtraceEvent {
1515 optional uint64 dev = 1;
1516 optional uint64 ino = 2;
1517 optional int32 mode = 3;
1518 optional int64 offset = 4;
1519 optional int64 len = 5;
1520 optional int64 size = 6;
1521 optional uint64 blocks = 7;
1522 optional int32 ret = 8;
1523}
Hector Dearman55ef3e02018-04-11 17:28:55 +01001524message F2fsGetDataBlockFtraceEvent {
1525 optional uint64 dev = 1;
1526 optional uint64 ino = 2;
1527 optional uint64 iblock = 3;
1528 optional uint64 bh_start = 4;
1529 optional uint64 bh_size = 5;
1530 optional int32 ret = 6;
1531}
Hector Dearmane0e57802018-11-21 16:09:56 +00001532message F2fsGetVictimFtraceEvent {
1533 optional uint64 dev = 1;
1534 optional int32 type = 2;
1535 optional int32 gc_type = 3;
1536 optional int32 alloc_mode = 4;
1537 optional int32 gc_mode = 5;
1538 optional uint32 victim = 6;
1539 optional uint32 ofs_unit = 7;
1540 optional uint32 pre_victim = 8;
1541 optional uint32 prefree = 9;
1542 optional uint32 free = 10;
1543}
Hector Dearman55ef3e02018-04-11 17:28:55 +01001544message F2fsIgetFtraceEvent {
1545 optional uint64 dev = 1;
1546 optional uint64 ino = 2;
1547 optional uint64 pino = 3;
1548 optional uint32 mode = 4;
1549 optional int64 size = 5;
1550 optional uint32 nlink = 6;
1551 optional uint64 blocks = 7;
1552 optional uint32 advise = 8;
1553}
Hector Dearmane0e57802018-11-21 16:09:56 +00001554message F2fsIgetExitFtraceEvent {
1555 optional uint64 dev = 1;
1556 optional uint64 ino = 2;
1557 optional int32 ret = 3;
1558}
1559message F2fsNewInodeFtraceEvent {
1560 optional uint64 dev = 1;
1561 optional uint64 ino = 2;
1562 optional int32 ret = 3;
1563}
1564message F2fsReadpageFtraceEvent {
1565 optional uint64 dev = 1;
1566 optional uint64 ino = 2;
1567 optional uint64 index = 3;
1568 optional uint64 blkaddr = 4;
1569 optional int32 type = 5;
1570}
1571message F2fsReserveNewBlockFtraceEvent {
1572 optional uint64 dev = 1;
1573 optional uint32 nid = 2;
1574 optional uint32 ofs_in_node = 3;
1575}
1576message F2fsSetPageDirtyFtraceEvent {
1577 optional uint64 dev = 1;
1578 optional uint64 ino = 2;
1579 optional int32 type = 3;
1580 optional int32 dir = 4;
1581 optional uint64 index = 5;
1582 optional int32 dirty = 6;
1583}
1584message F2fsSubmitWritePageFtraceEvent {
1585 optional uint64 dev = 1;
1586 optional uint64 ino = 2;
1587 optional int32 type = 3;
1588 optional uint64 index = 4;
1589 optional uint32 block = 5;
1590}
Hector Dearman55ef3e02018-04-11 17:28:55 +01001591message F2fsSyncFileEnterFtraceEvent {
1592 optional uint64 dev = 1;
1593 optional uint64 ino = 2;
1594 optional uint64 pino = 3;
1595 optional uint32 mode = 4;
1596 optional int64 size = 5;
1597 optional uint32 nlink = 6;
1598 optional uint64 blocks = 7;
1599 optional uint32 advise = 8;
1600}
Hector Dearman55ef3e02018-04-11 17:28:55 +01001601message F2fsSyncFileExitFtraceEvent {
1602 optional uint64 dev = 1;
1603 optional uint64 ino = 2;
1604 optional uint32 need_cp = 3;
1605 optional int32 datasync = 4;
1606 optional int32 ret = 5;
1607}
Hector Dearmane0e57802018-11-21 16:09:56 +00001608message F2fsSyncFsFtraceEvent {
1609 optional uint64 dev = 1;
1610 optional int32 dirty = 2;
1611 optional int32 wait = 3;
1612}
1613message F2fsTruncateFtraceEvent {
1614 optional uint64 dev = 1;
1615 optional uint64 ino = 2;
1616 optional uint64 pino = 3;
1617 optional uint32 mode = 4;
1618 optional int64 size = 5;
1619 optional uint32 nlink = 6;
1620 optional uint64 blocks = 7;
1621 optional uint32 advise = 8;
1622}
1623message F2fsTruncateBlocksEnterFtraceEvent {
1624 optional uint64 dev = 1;
1625 optional uint64 ino = 2;
1626 optional int64 size = 3;
1627 optional uint64 blocks = 4;
1628 optional uint64 from = 5;
1629}
1630message F2fsTruncateBlocksExitFtraceEvent {
1631 optional uint64 dev = 1;
1632 optional uint64 ino = 2;
1633 optional int32 ret = 3;
1634}
1635message F2fsTruncateDataBlocksRangeFtraceEvent {
1636 optional uint64 dev = 1;
1637 optional uint64 ino = 2;
1638 optional uint32 nid = 3;
1639 optional uint32 ofs = 4;
1640 optional int32 free = 5;
1641}
1642message F2fsTruncateInodeBlocksEnterFtraceEvent {
1643 optional uint64 dev = 1;
1644 optional uint64 ino = 2;
1645 optional int64 size = 3;
1646 optional uint64 blocks = 4;
1647 optional uint64 from = 5;
1648}
1649message F2fsTruncateInodeBlocksExitFtraceEvent {
1650 optional uint64 dev = 1;
1651 optional uint64 ino = 2;
1652 optional int32 ret = 3;
1653}
1654message F2fsTruncateNodeFtraceEvent {
1655 optional uint64 dev = 1;
1656 optional uint64 ino = 2;
1657 optional uint32 nid = 3;
1658 optional uint32 blk_addr = 4;
1659}
1660message F2fsTruncateNodesEnterFtraceEvent {
1661 optional uint64 dev = 1;
1662 optional uint64 ino = 2;
1663 optional uint32 nid = 3;
1664 optional uint32 blk_addr = 4;
1665}
1666message F2fsTruncateNodesExitFtraceEvent {
1667 optional uint64 dev = 1;
1668 optional uint64 ino = 2;
1669 optional int32 ret = 3;
1670}
1671message F2fsTruncatePartialNodesFtraceEvent {
1672 optional uint64 dev = 1;
1673 optional uint64 ino = 2;
1674 optional uint32 nid = 3;
1675 optional int32 depth = 4;
1676 optional int32 err = 5;
1677}
1678message F2fsUnlinkEnterFtraceEvent {
1679 optional uint64 dev = 1;
1680 optional uint64 ino = 2;
1681 optional int64 size = 3;
1682 optional uint64 blocks = 4;
1683 optional string name = 5;
1684}
1685message F2fsUnlinkExitFtraceEvent {
1686 optional uint64 dev = 1;
1687 optional uint64 ino = 2;
1688 optional int32 ret = 3;
1689}
1690message F2fsVmPageMkwriteFtraceEvent {
1691 optional uint64 dev = 1;
1692 optional uint64 ino = 2;
1693 optional int32 type = 3;
1694 optional int32 dir = 4;
1695 optional uint64 index = 5;
1696 optional int32 dirty = 6;
1697}
Hector Dearman55ef3e02018-04-11 17:28:55 +01001698message F2fsWriteBeginFtraceEvent {
1699 optional uint64 dev = 1;
1700 optional uint64 ino = 2;
1701 optional int64 pos = 3;
1702 optional uint32 len = 4;
1703 optional uint32 flags = 5;
1704}
Hector Dearmane0e57802018-11-21 16:09:56 +00001705message F2fsWriteCheckpointFtraceEvent {
1706 optional uint64 dev = 1;
1707 optional uint32 is_umount = 2;
1708 optional string msg = 3;
1709}
Hector Dearman55ef3e02018-04-11 17:28:55 +01001710message F2fsWriteEndFtraceEvent {
1711 optional uint64 dev = 1;
1712 optional uint64 ino = 2;
1713 optional int64 pos = 3;
1714 optional uint32 len = 4;
1715 optional uint32 copied = 5;
1716}
1717
Hector Dearmane0e57802018-11-21 16:09:56 +00001718// End of protos/perfetto/trace/ftrace/f2fs.proto
Hector Dearman55ef3e02018-04-11 17:28:55 +01001719
Hector Dearmane0e57802018-11-21 16:09:56 +00001720// Begin of protos/perfetto/trace/ftrace/filemap.proto
1721
1722message MmFilemapAddToPageCacheFtraceEvent {
1723 optional uint64 pfn = 1;
1724 optional uint64 i_ino = 2;
1725 optional uint64 index = 3;
1726 optional uint64 s_dev = 4;
1727 optional uint64 page = 5;
1728}
1729message MmFilemapDeleteFromPageCacheFtraceEvent {
1730 optional uint64 pfn = 1;
1731 optional uint64 i_ino = 2;
1732 optional uint64 index = 3;
1733 optional uint64 s_dev = 4;
1734 optional uint64 page = 5;
1735}
1736
1737// End of protos/perfetto/trace/ftrace/filemap.proto
1738
1739// Begin of protos/perfetto/trace/ftrace/ftrace.proto
1740
1741message PrintFtraceEvent {
1742 optional uint64 ip = 1;
1743 optional string buf = 2;
1744}
1745
1746// End of protos/perfetto/trace/ftrace/ftrace.proto
1747
1748// Begin of protos/perfetto/trace/ftrace/ftrace_event.proto
1749
1750message FtraceEvent {
1751 // Nanoseconds since an epoch.
1752 // Epoch is configurable by writing into trace_clock.
1753 // By default this timestamp is CPU local.
1754 // TODO: Figure out a story for reconciling the various clocks.
1755 optional uint64 timestamp = 1;
1756
1757 // Kernel pid (do not confuse with userspace pid aka tgid)
1758 optional uint32 pid = 2;
1759
1760 oneof event {
1761 PrintFtraceEvent print = 3;
1762 SchedSwitchFtraceEvent sched_switch = 4;
1763 // removed field with id 5;
1764 // removed field with id 6;
1765 // removed field with id 7;
1766 // removed field with id 8;
1767 // removed field with id 9;
1768 // removed field with id 10;
1769 CpuFrequencyFtraceEvent cpu_frequency = 11;
1770 CpuFrequencyLimitsFtraceEvent cpu_frequency_limits = 12;
1771 CpuIdleFtraceEvent cpu_idle = 13;
1772 ClockEnableFtraceEvent clock_enable = 14;
1773 ClockDisableFtraceEvent clock_disable = 15;
1774 ClockSetRateFtraceEvent clock_set_rate = 16;
1775 SchedWakeupFtraceEvent sched_wakeup = 17;
1776 SchedBlockedReasonFtraceEvent sched_blocked_reason = 18;
1777 SchedCpuHotplugFtraceEvent sched_cpu_hotplug = 19;
1778 SchedWakingFtraceEvent sched_waking = 20;
1779 // removed field with id 21
1780 // removed field with id 22
1781 // removed field with id 23
1782 // removed field with id 24
1783 // removed field with id 25
1784 // removed field with id 26
1785 // removed field with id 27
1786 // removed field with id 28
1787 // removed field with id 29
1788 // removed field with id 30
1789 // removed field with id 31
1790 // removed field with id 32
1791 // removed field with id 33
1792 // removed field with id 34
1793 LowmemoryKillFtraceEvent lowmemory_kill = 35;
1794 // removed field with id 36
1795 // removed field with id 37
1796 // removed field with id 38
1797 // removed field with id 39
1798 // removed field with id 40
1799 Ext4DaWriteBeginFtraceEvent ext4_da_write_begin = 41;
1800 Ext4DaWriteEndFtraceEvent ext4_da_write_end = 42;
1801 Ext4SyncFileEnterFtraceEvent ext4_sync_file_enter = 43;
1802 Ext4SyncFileExitFtraceEvent ext4_sync_file_exit = 44;
1803 BlockRqIssueFtraceEvent block_rq_issue = 45;
1804 MmVmscanDirectReclaimBeginFtraceEvent mm_vmscan_direct_reclaim_begin = 46;
1805 MmVmscanDirectReclaimEndFtraceEvent mm_vmscan_direct_reclaim_end = 47;
1806 MmVmscanKswapdWakeFtraceEvent mm_vmscan_kswapd_wake = 48;
1807 MmVmscanKswapdSleepFtraceEvent mm_vmscan_kswapd_sleep = 49;
1808 BinderTransactionFtraceEvent binder_transaction = 50;
1809 BinderTransactionReceivedFtraceEvent binder_transaction_received = 51;
1810 BinderSetPriorityFtraceEvent binder_set_priority = 52;
1811 BinderLockFtraceEvent binder_lock = 53;
1812 BinderLockedFtraceEvent binder_locked = 54;
1813 BinderUnlockFtraceEvent binder_unlock = 55;
1814 // removed field with id 56
1815 // removed field with id 57
1816 // removed field with id 58
1817 // removed field with id 59
1818 // removed field with id 60
1819 // removed field with id 61
1820 // removed field with id 62
1821 // removed field with id 63
1822 // removed field with id 64
1823 // removed field with id 65
1824 // removed field with id 66
1825 // removed field with id 67
1826 // removed field with id 68
1827 // removed field with id 69
1828 // removed field with id 70
1829 // removed field with id 71
1830 // removed field with id 72
1831 // removed field with id 73
1832 // removed field with id 74
1833 // removed field with id 75
1834 // removed field with id 76
1835 // removed field with id 77
1836 // removed field with id 78
1837 // removed field with id 79
1838 // removed field with id 80
1839 // removed field with id 81
1840 // removed field with id 82
1841 // removed field with id 83
1842 // removed field with id 84
1843 // removed field with id 85
1844 // removed field with id 86
1845 // removed field with id 87
1846 // removed field with id 88
1847 // removed field with id 89
1848 // removed field with id 90
1849 // removed field with id 91
1850 // removed field with id 92
1851 // removed field with id 93
1852 // removed field with id 94
1853 // removed field with id 95
1854 // removed field with id 96
1855 MmFilemapAddToPageCacheFtraceEvent mm_filemap_add_to_page_cache = 97;
1856 MmFilemapDeleteFromPageCacheFtraceEvent mm_filemap_delete_from_page_cache =
1857 98;
1858 // removed field with id 99
1859 // removed field with id 100
1860 // removed field with id 101
1861 // removed field with id 102
1862 // removed field with id 103
1863 // removed field with id 104
1864 // removed field with id 105
1865 // removed field with id 106
1866 // removed field with id 107
1867 // removed field with id 108
1868 // removed field with id 109
1869 // removed field with id 110
1870 // removed field with id 111
1871 // removed field with id 112
1872 SuspendResumeFtraceEvent suspend_resume = 113;
1873 SchedWakeupNewFtraceEvent sched_wakeup_new = 114;
1874 BlockBioBackmergeFtraceEvent block_bio_backmerge = 115;
1875 BlockBioBounceFtraceEvent block_bio_bounce = 116;
1876 BlockBioCompleteFtraceEvent block_bio_complete = 117;
1877 BlockBioFrontmergeFtraceEvent block_bio_frontmerge = 118;
1878 BlockBioQueueFtraceEvent block_bio_queue = 119;
1879 BlockBioRemapFtraceEvent block_bio_remap = 120;
1880 BlockDirtyBufferFtraceEvent block_dirty_buffer = 121;
1881 BlockGetrqFtraceEvent block_getrq = 122;
1882 BlockPlugFtraceEvent block_plug = 123;
1883 BlockRqAbortFtraceEvent block_rq_abort = 124;
1884 BlockRqCompleteFtraceEvent block_rq_complete = 125;
1885 BlockRqInsertFtraceEvent block_rq_insert = 126;
1886 // removed field with id 127;
1887 BlockRqRemapFtraceEvent block_rq_remap = 128;
1888 BlockRqRequeueFtraceEvent block_rq_requeue = 129;
1889 BlockSleeprqFtraceEvent block_sleeprq = 130;
1890 BlockSplitFtraceEvent block_split = 131;
1891 BlockTouchBufferFtraceEvent block_touch_buffer = 132;
1892 BlockUnplugFtraceEvent block_unplug = 133;
1893 Ext4AllocDaBlocksFtraceEvent ext4_alloc_da_blocks = 134;
1894 Ext4AllocateBlocksFtraceEvent ext4_allocate_blocks = 135;
1895 Ext4AllocateInodeFtraceEvent ext4_allocate_inode = 136;
1896 Ext4BeginOrderedTruncateFtraceEvent ext4_begin_ordered_truncate = 137;
1897 Ext4CollapseRangeFtraceEvent ext4_collapse_range = 138;
1898 Ext4DaReleaseSpaceFtraceEvent ext4_da_release_space = 139;
1899 Ext4DaReserveSpaceFtraceEvent ext4_da_reserve_space = 140;
1900 Ext4DaUpdateReserveSpaceFtraceEvent ext4_da_update_reserve_space = 141;
1901 Ext4DaWritePagesFtraceEvent ext4_da_write_pages = 142;
1902 Ext4DaWritePagesExtentFtraceEvent ext4_da_write_pages_extent = 143;
1903 Ext4DirectIOEnterFtraceEvent ext4_direct_IO_enter = 144;
1904 Ext4DirectIOExitFtraceEvent ext4_direct_IO_exit = 145;
1905 Ext4DiscardBlocksFtraceEvent ext4_discard_blocks = 146;
1906 Ext4DiscardPreallocationsFtraceEvent ext4_discard_preallocations = 147;
1907 Ext4DropInodeFtraceEvent ext4_drop_inode = 148;
1908 Ext4EsCacheExtentFtraceEvent ext4_es_cache_extent = 149;
1909 Ext4EsFindDelayedExtentRangeEnterFtraceEvent
1910 ext4_es_find_delayed_extent_range_enter = 150;
1911 Ext4EsFindDelayedExtentRangeExitFtraceEvent
1912 ext4_es_find_delayed_extent_range_exit = 151;
1913 Ext4EsInsertExtentFtraceEvent ext4_es_insert_extent = 152;
1914 Ext4EsLookupExtentEnterFtraceEvent ext4_es_lookup_extent_enter = 153;
1915 Ext4EsLookupExtentExitFtraceEvent ext4_es_lookup_extent_exit = 154;
1916 Ext4EsRemoveExtentFtraceEvent ext4_es_remove_extent = 155;
1917 Ext4EsShrinkFtraceEvent ext4_es_shrink = 156;
1918 Ext4EsShrinkCountFtraceEvent ext4_es_shrink_count = 157;
1919 Ext4EsShrinkScanEnterFtraceEvent ext4_es_shrink_scan_enter = 158;
1920 Ext4EsShrinkScanExitFtraceEvent ext4_es_shrink_scan_exit = 159;
1921 Ext4EvictInodeFtraceEvent ext4_evict_inode = 160;
1922 Ext4ExtConvertToInitializedEnterFtraceEvent
1923 ext4_ext_convert_to_initialized_enter = 161;
1924 Ext4ExtConvertToInitializedFastpathFtraceEvent
1925 ext4_ext_convert_to_initialized_fastpath = 162;
1926 Ext4ExtHandleUnwrittenExtentsFtraceEvent ext4_ext_handle_unwritten_extents =
1927 163;
1928 Ext4ExtInCacheFtraceEvent ext4_ext_in_cache = 164;
1929 Ext4ExtLoadExtentFtraceEvent ext4_ext_load_extent = 165;
1930 Ext4ExtMapBlocksEnterFtraceEvent ext4_ext_map_blocks_enter = 166;
1931 Ext4ExtMapBlocksExitFtraceEvent ext4_ext_map_blocks_exit = 167;
1932 Ext4ExtPutInCacheFtraceEvent ext4_ext_put_in_cache = 168;
1933 Ext4ExtRemoveSpaceFtraceEvent ext4_ext_remove_space = 169;
1934 Ext4ExtRemoveSpaceDoneFtraceEvent ext4_ext_remove_space_done = 170;
1935 Ext4ExtRmIdxFtraceEvent ext4_ext_rm_idx = 171;
1936 Ext4ExtRmLeafFtraceEvent ext4_ext_rm_leaf = 172;
1937 Ext4ExtShowExtentFtraceEvent ext4_ext_show_extent = 173;
1938 Ext4FallocateEnterFtraceEvent ext4_fallocate_enter = 174;
1939 Ext4FallocateExitFtraceEvent ext4_fallocate_exit = 175;
1940 Ext4FindDelallocRangeFtraceEvent ext4_find_delalloc_range = 176;
1941 Ext4ForgetFtraceEvent ext4_forget = 177;
1942 Ext4FreeBlocksFtraceEvent ext4_free_blocks = 178;
1943 Ext4FreeInodeFtraceEvent ext4_free_inode = 179;
1944 Ext4GetImpliedClusterAllocExitFtraceEvent
1945 ext4_get_implied_cluster_alloc_exit = 180;
1946 Ext4GetReservedClusterAllocFtraceEvent ext4_get_reserved_cluster_alloc =
1947 181;
1948 Ext4IndMapBlocksEnterFtraceEvent ext4_ind_map_blocks_enter = 182;
1949 Ext4IndMapBlocksExitFtraceEvent ext4_ind_map_blocks_exit = 183;
1950 Ext4InsertRangeFtraceEvent ext4_insert_range = 184;
1951 Ext4InvalidatepageFtraceEvent ext4_invalidatepage = 185;
1952 Ext4JournalStartFtraceEvent ext4_journal_start = 186;
1953 Ext4JournalStartReservedFtraceEvent ext4_journal_start_reserved = 187;
1954 Ext4JournalledInvalidatepageFtraceEvent ext4_journalled_invalidatepage =
1955 188;
1956 Ext4JournalledWriteEndFtraceEvent ext4_journalled_write_end = 189;
1957 Ext4LoadInodeFtraceEvent ext4_load_inode = 190;
1958 Ext4LoadInodeBitmapFtraceEvent ext4_load_inode_bitmap = 191;
1959 Ext4MarkInodeDirtyFtraceEvent ext4_mark_inode_dirty = 192;
1960 Ext4MbBitmapLoadFtraceEvent ext4_mb_bitmap_load = 193;
1961 Ext4MbBuddyBitmapLoadFtraceEvent ext4_mb_buddy_bitmap_load = 194;
1962 Ext4MbDiscardPreallocationsFtraceEvent ext4_mb_discard_preallocations = 195;
1963 Ext4MbNewGroupPaFtraceEvent ext4_mb_new_group_pa = 196;
1964 Ext4MbNewInodePaFtraceEvent ext4_mb_new_inode_pa = 197;
1965 Ext4MbReleaseGroupPaFtraceEvent ext4_mb_release_group_pa = 198;
1966 Ext4MbReleaseInodePaFtraceEvent ext4_mb_release_inode_pa = 199;
1967 Ext4MballocAllocFtraceEvent ext4_mballoc_alloc = 200;
1968 Ext4MballocDiscardFtraceEvent ext4_mballoc_discard = 201;
1969 Ext4MballocFreeFtraceEvent ext4_mballoc_free = 202;
1970 Ext4MballocPreallocFtraceEvent ext4_mballoc_prealloc = 203;
1971 Ext4OtherInodeUpdateTimeFtraceEvent ext4_other_inode_update_time = 204;
1972 Ext4PunchHoleFtraceEvent ext4_punch_hole = 205;
1973 Ext4ReadBlockBitmapLoadFtraceEvent ext4_read_block_bitmap_load = 206;
1974 Ext4ReadpageFtraceEvent ext4_readpage = 207;
1975 Ext4ReleasepageFtraceEvent ext4_releasepage = 208;
1976 Ext4RemoveBlocksFtraceEvent ext4_remove_blocks = 209;
1977 Ext4RequestBlocksFtraceEvent ext4_request_blocks = 210;
1978 Ext4RequestInodeFtraceEvent ext4_request_inode = 211;
1979 Ext4SyncFsFtraceEvent ext4_sync_fs = 212;
1980 Ext4TrimAllFreeFtraceEvent ext4_trim_all_free = 213;
1981 Ext4TrimExtentFtraceEvent ext4_trim_extent = 214;
1982 Ext4TruncateEnterFtraceEvent ext4_truncate_enter = 215;
1983 Ext4TruncateExitFtraceEvent ext4_truncate_exit = 216;
1984 Ext4UnlinkEnterFtraceEvent ext4_unlink_enter = 217;
1985 Ext4UnlinkExitFtraceEvent ext4_unlink_exit = 218;
1986 Ext4WriteBeginFtraceEvent ext4_write_begin = 219;
1987 // removed field with id 220;
1988 // removed field with id 221;
1989 // removed field with id 222;
1990 // removed field with id 223;
1991 // removed field with id 224;
1992 // removed field with id 225;
1993 // removed field with id 226;
1994 // removed field with id 227;
1995 // removed field with id 228;
1996 // removed field with id 229;
1997 Ext4WriteEndFtraceEvent ext4_write_end = 230;
1998 Ext4WritepageFtraceEvent ext4_writepage = 231;
1999 Ext4WritepagesFtraceEvent ext4_writepages = 232;
2000 Ext4WritepagesResultFtraceEvent ext4_writepages_result = 233;
2001 Ext4ZeroRangeFtraceEvent ext4_zero_range = 234;
2002 TaskNewtaskFtraceEvent task_newtask = 235;
2003 TaskRenameFtraceEvent task_rename = 236;
2004 SchedProcessExecFtraceEvent sched_process_exec = 237;
2005 SchedProcessExitFtraceEvent sched_process_exit = 238;
2006 SchedProcessForkFtraceEvent sched_process_fork = 239;
2007 SchedProcessFreeFtraceEvent sched_process_free = 240;
2008 SchedProcessHangFtraceEvent sched_process_hang = 241;
2009 SchedProcessWaitFtraceEvent sched_process_wait = 242;
2010 F2fsDoSubmitBioFtraceEvent f2fs_do_submit_bio = 243;
2011 F2fsEvictInodeFtraceEvent f2fs_evict_inode = 244;
2012 F2fsFallocateFtraceEvent f2fs_fallocate = 245;
2013 F2fsGetDataBlockFtraceEvent f2fs_get_data_block = 246;
2014 F2fsGetVictimFtraceEvent f2fs_get_victim = 247;
2015 F2fsIgetFtraceEvent f2fs_iget = 248;
2016 F2fsIgetExitFtraceEvent f2fs_iget_exit = 249;
2017 F2fsNewInodeFtraceEvent f2fs_new_inode = 250;
2018 F2fsReadpageFtraceEvent f2fs_readpage = 251;
2019 F2fsReserveNewBlockFtraceEvent f2fs_reserve_new_block = 252;
2020 F2fsSetPageDirtyFtraceEvent f2fs_set_page_dirty = 253;
2021 F2fsSubmitWritePageFtraceEvent f2fs_submit_write_page = 254;
2022 F2fsSyncFileEnterFtraceEvent f2fs_sync_file_enter = 255;
2023 F2fsSyncFileExitFtraceEvent f2fs_sync_file_exit = 256;
2024 F2fsSyncFsFtraceEvent f2fs_sync_fs = 257;
2025 F2fsTruncateFtraceEvent f2fs_truncate = 258;
2026 F2fsTruncateBlocksEnterFtraceEvent f2fs_truncate_blocks_enter = 259;
2027 F2fsTruncateBlocksExitFtraceEvent f2fs_truncate_blocks_exit = 260;
2028 F2fsTruncateDataBlocksRangeFtraceEvent f2fs_truncate_data_blocks_range =
2029 261;
2030 F2fsTruncateInodeBlocksEnterFtraceEvent f2fs_truncate_inode_blocks_enter =
2031 262;
2032 F2fsTruncateInodeBlocksExitFtraceEvent f2fs_truncate_inode_blocks_exit =
2033 263;
2034 F2fsTruncateNodeFtraceEvent f2fs_truncate_node = 264;
2035 F2fsTruncateNodesEnterFtraceEvent f2fs_truncate_nodes_enter = 265;
2036 F2fsTruncateNodesExitFtraceEvent f2fs_truncate_nodes_exit = 266;
2037 F2fsTruncatePartialNodesFtraceEvent f2fs_truncate_partial_nodes = 267;
2038 F2fsUnlinkEnterFtraceEvent f2fs_unlink_enter = 268;
2039 F2fsUnlinkExitFtraceEvent f2fs_unlink_exit = 269;
2040 F2fsVmPageMkwriteFtraceEvent f2fs_vm_page_mkwrite = 270;
2041 F2fsWriteBeginFtraceEvent f2fs_write_begin = 271;
2042 F2fsWriteCheckpointFtraceEvent f2fs_write_checkpoint = 272;
2043 F2fsWriteEndFtraceEvent f2fs_write_end = 273;
2044 AllocPagesIommuEndFtraceEvent alloc_pages_iommu_end = 274;
2045 AllocPagesIommuFailFtraceEvent alloc_pages_iommu_fail = 275;
2046 AllocPagesIommuStartFtraceEvent alloc_pages_iommu_start = 276;
2047 AllocPagesSysEndFtraceEvent alloc_pages_sys_end = 277;
2048 AllocPagesSysFailFtraceEvent alloc_pages_sys_fail = 278;
2049 AllocPagesSysStartFtraceEvent alloc_pages_sys_start = 279;
2050 DmaAllocContiguousRetryFtraceEvent dma_alloc_contiguous_retry = 280;
2051 IommuMapRangeFtraceEvent iommu_map_range = 281;
2052 IommuSecPtblMapRangeEndFtraceEvent iommu_sec_ptbl_map_range_end = 282;
2053 IommuSecPtblMapRangeStartFtraceEvent iommu_sec_ptbl_map_range_start = 283;
2054 IonAllocBufferEndFtraceEvent ion_alloc_buffer_end = 284;
2055 IonAllocBufferFailFtraceEvent ion_alloc_buffer_fail = 285;
2056 IonAllocBufferFallbackFtraceEvent ion_alloc_buffer_fallback = 286;
2057 IonAllocBufferStartFtraceEvent ion_alloc_buffer_start = 287;
2058 IonCpAllocRetryFtraceEvent ion_cp_alloc_retry = 288;
2059 IonCpSecureBufferEndFtraceEvent ion_cp_secure_buffer_end = 289;
2060 IonCpSecureBufferStartFtraceEvent ion_cp_secure_buffer_start = 290;
2061 IonPrefetchingFtraceEvent ion_prefetching = 291;
2062 IonSecureCmaAddToPoolEndFtraceEvent ion_secure_cma_add_to_pool_end = 292;
2063 IonSecureCmaAddToPoolStartFtraceEvent ion_secure_cma_add_to_pool_start =
2064 293;
2065 IonSecureCmaAllocateEndFtraceEvent ion_secure_cma_allocate_end = 294;
2066 IonSecureCmaAllocateStartFtraceEvent ion_secure_cma_allocate_start = 295;
2067 IonSecureCmaShrinkPoolEndFtraceEvent ion_secure_cma_shrink_pool_end = 296;
2068 IonSecureCmaShrinkPoolStartFtraceEvent ion_secure_cma_shrink_pool_start =
2069 297;
2070 KfreeFtraceEvent kfree = 298;
2071 KmallocFtraceEvent kmalloc = 299;
2072 KmallocNodeFtraceEvent kmalloc_node = 300;
2073 KmemCacheAllocFtraceEvent kmem_cache_alloc = 301;
2074 KmemCacheAllocNodeFtraceEvent kmem_cache_alloc_node = 302;
2075 KmemCacheFreeFtraceEvent kmem_cache_free = 303;
2076 MigratePagesEndFtraceEvent migrate_pages_end = 304;
2077 MigratePagesStartFtraceEvent migrate_pages_start = 305;
2078 MigrateRetryFtraceEvent migrate_retry = 306;
2079 MmPageAllocFtraceEvent mm_page_alloc = 307;
2080 MmPageAllocExtfragFtraceEvent mm_page_alloc_extfrag = 308;
2081 MmPageAllocZoneLockedFtraceEvent mm_page_alloc_zone_locked = 309;
2082 MmPageFreeFtraceEvent mm_page_free = 310;
2083 MmPageFreeBatchedFtraceEvent mm_page_free_batched = 311;
2084 MmPagePcpuDrainFtraceEvent mm_page_pcpu_drain = 312;
2085 RssStatFtraceEvent rss_stat = 313;
2086 IonHeapShrinkFtraceEvent ion_heap_shrink = 314;
2087 IonHeapGrowFtraceEvent ion_heap_grow = 315;
2088 // removed field with id 316
2089 // removed field with id 317
2090 // removed field with id 318
2091 // removed field with id 319
2092 ClkEnableFtraceEvent clk_enable = 320;
2093 ClkDisableFtraceEvent clk_disable = 321;
2094 ClkSetRateFtraceEvent clk_set_rate = 322;
2095 BinderTransactionAllocBufFtraceEvent binder_transaction_alloc_buf = 323;
2096 SignalDeliverFtraceEvent signal_deliver = 324;
2097 SignalGenerateFtraceEvent signal_generate = 325;
2098 // removed field with id 326
Isabelle Taylor98e560d2018-11-22 11:59:12 +00002099 GenericFtraceEvent generic = 327;
Lalit Maganti3bd67ef2019-01-18 17:44:09 +00002100 MmEventRecordFtraceEvent mm_event_record = 328;
Lalit Magantia73a7252019-01-25 10:32:40 +00002101 SysEnterFtraceEvent sys_enter = 329;
2102 SysExitFtraceEvent sys_exit = 330;
Hector Dearmanbfc24112019-06-04 19:35:51 +01002103 ZeroFtraceEvent zero = 331;
Sidath Senanayake1f5f93a2019-06-06 22:24:15 +01002104 GpuFrequencyFtraceEvent gpu_frequency = 332;
Hector Dearmane0e57802018-11-21 16:09:56 +00002105 }
2106}
2107
2108// End of protos/perfetto/trace/ftrace/ftrace_event.proto
2109
2110// Begin of protos/perfetto/trace/ftrace/ftrace_event_bundle.proto
2111
Ryan Savitskic7fb94a2019-07-24 22:42:43 +01002112// One parsed page from per-cpu ftrace buffer.
Hector Dearmane0e57802018-11-21 16:09:56 +00002113message FtraceEventBundle {
2114 optional uint32 cpu = 1;
2115 repeated FtraceEvent event = 2;
Ryan Savitskic7fb94a2019-07-24 22:42:43 +01002116 // True if this cpu's ftrace kernel buffer lost events since the last read.
2117 optional bool lost_events = 3;
Hector Dearmane0e57802018-11-21 16:09:56 +00002118}
2119
2120// End of protos/perfetto/trace/ftrace/ftrace_event_bundle.proto
2121
2122// Begin of protos/perfetto/trace/ftrace/ftrace_stats.proto
2123
2124// Per-CPU stats for the ftrace data source gathered from the kernel from
2125// /sys/kernel/debug/tracing/per_cpu/cpuX/stats.
2126message FtraceCpuStats {
2127 // CPU index.
2128 optional uint64 cpu = 1;
2129
2130 // Number of entries still in the kernel buffer. Ideally this should be close
2131 // to zero, as events are consumed regularly and moved into the userspace
2132 // buffers (or file).
2133 optional uint64 entries = 2;
2134
2135 // Number of events lost in kernel buffers due to overwriting of old events
2136 // before userspace had a chance to drain them.
2137 optional uint64 overrun = 3;
2138
2139 // This should always be zero. If not the buffer size is way too small or
2140 // something went wrong with the tracer.
2141 optional uint64 commit_overrun = 4;
2142
2143 // Bytes actually read (not overwritten).
2144 optional uint64 bytes_read = 5;
2145
2146 // The timestamp for the oldest event still in the ring buffer.
2147 optional double oldest_event_ts = 6;
2148
2149 // The current timestamp.
2150 optional double now_ts = 7;
2151
2152 // If the kernel buffer has overwrite mode disabled, this will show the number
2153 // of new events that were lost because the buffer was full. This is similar
2154 // to |overrun| but only for the overwrite=false case.
2155 optional uint64 dropped_events = 8;
2156
2157 // The number of events read.
2158 optional uint64 read_events = 9;
2159}
2160
2161// Ftrace stats for all CPUs.
2162message FtraceStats {
2163 enum Phase {
2164 UNSPECIFIED = 0;
2165 START_OF_TRACE = 1;
2166 END_OF_TRACE = 2;
2167 }
2168
2169 // Tells when stats were sampled. There should be one sample at the beginning
2170 // of the trace and one sample at the end.
2171 optional Phase phase = 1;
2172
2173 // Per-CPU stats (one entry for each CPU).
2174 repeated FtraceCpuStats cpu_stats = 2;
2175}
2176
2177// End of protos/perfetto/trace/ftrace/ftrace_stats.proto
2178
Hector Dearmane92c6742018-11-22 21:42:39 +00002179// Begin of protos/perfetto/trace/ftrace/generic.proto
2180
2181// This generic proto is used to output events in the trace
2182// when a specific proto for that event does not exist.
2183message GenericFtraceEvent {
2184 message Field {
2185 optional string name = 1;
2186 oneof value {
2187 string str_value = 3;
2188 int64 int_value = 4;
2189 uint64 uint_value = 5;
2190 }
2191 }
2192
2193 optional string event_name = 1;
2194 repeated Field field = 2;
2195}
2196
2197// End of protos/perfetto/trace/ftrace/generic.proto
2198
Hector Dearmane0e57802018-11-21 16:09:56 +00002199// Begin of protos/perfetto/trace/ftrace/kmem.proto
2200
2201message AllocPagesIommuEndFtraceEvent {
2202 optional uint32 gfp_flags = 1;
2203 optional uint32 order = 2;
2204}
2205message AllocPagesIommuFailFtraceEvent {
2206 optional uint32 gfp_flags = 1;
2207 optional uint32 order = 2;
2208}
2209message AllocPagesIommuStartFtraceEvent {
2210 optional uint32 gfp_flags = 1;
2211 optional uint32 order = 2;
2212}
2213message AllocPagesSysEndFtraceEvent {
2214 optional uint32 gfp_flags = 1;
2215 optional uint32 order = 2;
2216}
2217message AllocPagesSysFailFtraceEvent {
2218 optional uint32 gfp_flags = 1;
2219 optional uint32 order = 2;
2220}
2221message AllocPagesSysStartFtraceEvent {
2222 optional uint32 gfp_flags = 1;
2223 optional uint32 order = 2;
2224}
2225message DmaAllocContiguousRetryFtraceEvent {
2226 optional int32 tries = 1;
2227}
2228message IommuMapRangeFtraceEvent {
2229 optional uint64 chunk_size = 1;
2230 optional uint64 len = 2;
2231 optional uint64 pa = 3;
2232 optional uint64 va = 4;
2233}
2234message IommuSecPtblMapRangeEndFtraceEvent {
2235 optional uint64 len = 1;
2236 optional int32 num = 2;
2237 optional uint32 pa = 3;
2238 optional int32 sec_id = 4;
2239 optional uint64 va = 5;
2240}
2241message IommuSecPtblMapRangeStartFtraceEvent {
2242 optional uint64 len = 1;
2243 optional int32 num = 2;
2244 optional uint32 pa = 3;
2245 optional int32 sec_id = 4;
2246 optional uint64 va = 5;
2247}
2248message IonAllocBufferEndFtraceEvent {
2249 optional string client_name = 1;
2250 optional uint32 flags = 2;
2251 optional string heap_name = 3;
2252 optional uint64 len = 4;
2253 optional uint32 mask = 5;
2254}
2255message IonAllocBufferFailFtraceEvent {
2256 optional string client_name = 1;
2257 optional int64 error = 2;
2258 optional uint32 flags = 3;
2259 optional string heap_name = 4;
2260 optional uint64 len = 5;
2261 optional uint32 mask = 6;
2262}
2263message IonAllocBufferFallbackFtraceEvent {
2264 optional string client_name = 1;
2265 optional int64 error = 2;
2266 optional uint32 flags = 3;
2267 optional string heap_name = 4;
2268 optional uint64 len = 5;
2269 optional uint32 mask = 6;
2270}
2271message IonAllocBufferStartFtraceEvent {
2272 optional string client_name = 1;
2273 optional uint32 flags = 2;
2274 optional string heap_name = 3;
2275 optional uint64 len = 4;
2276 optional uint32 mask = 5;
2277}
2278message IonCpAllocRetryFtraceEvent {
2279 optional int32 tries = 1;
2280}
2281message IonCpSecureBufferEndFtraceEvent {
2282 optional uint64 align = 1;
2283 optional uint64 flags = 2;
2284 optional string heap_name = 3;
2285 optional uint64 len = 4;
2286}
2287message IonCpSecureBufferStartFtraceEvent {
2288 optional uint64 align = 1;
2289 optional uint64 flags = 2;
2290 optional string heap_name = 3;
2291 optional uint64 len = 4;
2292}
2293message IonPrefetchingFtraceEvent {
2294 optional uint64 len = 1;
2295}
2296message IonSecureCmaAddToPoolEndFtraceEvent {
2297 optional uint32 is_prefetch = 1;
2298 optional uint64 len = 2;
2299 optional int32 pool_total = 3;
2300}
2301message IonSecureCmaAddToPoolStartFtraceEvent {
2302 optional uint32 is_prefetch = 1;
2303 optional uint64 len = 2;
2304 optional int32 pool_total = 3;
2305}
2306message IonSecureCmaAllocateEndFtraceEvent {
2307 optional uint64 align = 1;
2308 optional uint64 flags = 2;
2309 optional string heap_name = 3;
2310 optional uint64 len = 4;
2311}
2312message IonSecureCmaAllocateStartFtraceEvent {
2313 optional uint64 align = 1;
2314 optional uint64 flags = 2;
2315 optional string heap_name = 3;
2316 optional uint64 len = 4;
2317}
2318message IonSecureCmaShrinkPoolEndFtraceEvent {
2319 optional uint64 drained_size = 1;
2320 optional uint64 skipped_size = 2;
2321}
2322message IonSecureCmaShrinkPoolStartFtraceEvent {
2323 optional uint64 drained_size = 1;
2324 optional uint64 skipped_size = 2;
2325}
2326message KfreeFtraceEvent {
2327 optional uint64 call_site = 1;
2328 optional uint64 ptr = 2;
2329}
2330message KmallocFtraceEvent {
2331 optional uint64 bytes_alloc = 1;
2332 optional uint64 bytes_req = 2;
2333 optional uint64 call_site = 3;
2334 optional uint32 gfp_flags = 4;
2335 optional uint64 ptr = 5;
2336}
2337message KmallocNodeFtraceEvent {
2338 optional uint64 bytes_alloc = 1;
2339 optional uint64 bytes_req = 2;
2340 optional uint64 call_site = 3;
2341 optional uint32 gfp_flags = 4;
2342 optional int32 node = 5;
2343 optional uint64 ptr = 6;
2344}
2345message KmemCacheAllocFtraceEvent {
2346 optional uint64 bytes_alloc = 1;
2347 optional uint64 bytes_req = 2;
2348 optional uint64 call_site = 3;
2349 optional uint32 gfp_flags = 4;
2350 optional uint64 ptr = 5;
2351}
2352message KmemCacheAllocNodeFtraceEvent {
2353 optional uint64 bytes_alloc = 1;
2354 optional uint64 bytes_req = 2;
2355 optional uint64 call_site = 3;
2356 optional uint32 gfp_flags = 4;
2357 optional int32 node = 5;
2358 optional uint64 ptr = 6;
2359}
2360message KmemCacheFreeFtraceEvent {
2361 optional uint64 call_site = 1;
2362 optional uint64 ptr = 2;
2363}
2364message MigratePagesEndFtraceEvent {
2365 optional int32 mode = 1;
2366}
2367message MigratePagesStartFtraceEvent {
2368 optional int32 mode = 1;
2369}
2370message MigrateRetryFtraceEvent {
2371 optional int32 tries = 1;
2372}
2373message MmPageAllocFtraceEvent {
2374 optional uint32 gfp_flags = 1;
2375 optional int32 migratetype = 2;
2376 optional uint32 order = 3;
2377 optional uint64 page = 4;
2378 optional uint64 pfn = 5;
2379}
2380message MmPageAllocExtfragFtraceEvent {
2381 optional int32 alloc_migratetype = 1;
2382 optional int32 alloc_order = 2;
2383 optional int32 fallback_migratetype = 3;
2384 optional int32 fallback_order = 4;
2385 optional uint64 page = 5;
2386 optional int32 change_ownership = 6;
2387 optional uint64 pfn = 7;
2388}
2389message MmPageAllocZoneLockedFtraceEvent {
2390 optional int32 migratetype = 1;
2391 optional uint32 order = 2;
2392 optional uint64 page = 3;
2393 optional uint64 pfn = 4;
2394}
2395message MmPageFreeFtraceEvent {
2396 optional uint32 order = 1;
2397 optional uint64 page = 2;
2398 optional uint64 pfn = 3;
2399}
2400message MmPageFreeBatchedFtraceEvent {
2401 optional int32 cold = 1;
2402 optional uint64 page = 2;
2403 optional uint64 pfn = 3;
2404}
2405message MmPagePcpuDrainFtraceEvent {
2406 optional int32 migratetype = 1;
2407 optional uint32 order = 2;
2408 optional uint64 page = 3;
2409 optional uint64 pfn = 4;
2410}
2411message RssStatFtraceEvent {
2412 optional int32 member = 1;
2413 optional int64 size = 2;
2414}
2415message IonHeapShrinkFtraceEvent {
2416 optional string heap_name = 1;
2417 optional uint64 len = 2;
2418 optional int64 total_allocated = 3;
2419}
2420message IonHeapGrowFtraceEvent {
2421 optional string heap_name = 1;
2422 optional uint64 len = 2;
2423 optional int64 total_allocated = 3;
2424}
2425
2426// End of protos/perfetto/trace/ftrace/kmem.proto
2427
2428// Begin of protos/perfetto/trace/ftrace/lowmemorykiller.proto
Hector Dearman55ef3e02018-04-11 17:28:55 +01002429
2430message LowmemoryKillFtraceEvent {
2431 optional string comm = 1;
2432 optional int32 pid = 2;
2433 optional int64 pagecache_size = 3;
2434 optional int64 pagecache_limit = 4;
2435 optional int64 free = 5;
2436}
2437
Hector Dearmane0e57802018-11-21 16:09:56 +00002438// End of protos/perfetto/trace/ftrace/lowmemorykiller.proto
Hector Dearman55ef3e02018-04-11 17:28:55 +01002439
Lalit Maganti3bd67ef2019-01-18 17:44:09 +00002440// Begin of protos/perfetto/trace/ftrace/mm_event.proto
2441
2442message MmEventRecordFtraceEvent {
2443 optional uint32 avg_lat = 1;
2444 optional uint32 count = 2;
2445 optional uint32 max_lat = 3;
2446 optional uint32 type = 4;
2447}
2448
2449// End of protos/perfetto/trace/ftrace/mm_event.proto
2450
Hector Dearmane0e57802018-11-21 16:09:56 +00002451// Begin of protos/perfetto/trace/ftrace/power.proto
Hector Dearman55ef3e02018-04-11 17:28:55 +01002452
Hector Dearmane0e57802018-11-21 16:09:56 +00002453message CpuFrequencyFtraceEvent {
2454 optional uint32 state = 1;
2455 optional uint32 cpu_id = 2;
2456}
2457message CpuFrequencyLimitsFtraceEvent {
2458 optional uint32 min_freq = 1;
2459 optional uint32 max_freq = 2;
2460 optional uint32 cpu_id = 3;
2461}
2462message CpuIdleFtraceEvent {
2463 optional uint32 state = 1;
2464 optional uint32 cpu_id = 2;
2465}
2466message ClockEnableFtraceEvent {
2467 optional string name = 1;
2468 optional uint64 state = 2;
2469 optional uint64 cpu_id = 3;
2470}
2471message ClockDisableFtraceEvent {
2472 optional string name = 1;
2473 optional uint64 state = 2;
2474 optional uint64 cpu_id = 3;
2475}
2476message ClockSetRateFtraceEvent {
2477 optional string name = 1;
2478 optional uint64 state = 2;
2479 optional uint64 cpu_id = 3;
2480}
2481message SuspendResumeFtraceEvent {
2482 optional string action = 1;
2483 optional int32 val = 2;
2484 optional uint32 start = 3;
Hector Dearman55ef3e02018-04-11 17:28:55 +01002485}
Sidath Senanayake1f5f93a2019-06-06 22:24:15 +01002486message GpuFrequencyFtraceEvent {
2487 optional uint32 gpu_id = 1;
2488 optional uint32 state = 2;
2489}
Hector Dearman55ef3e02018-04-11 17:28:55 +01002490
Hector Dearmane0e57802018-11-21 16:09:56 +00002491// End of protos/perfetto/trace/ftrace/power.proto
Hector Dearman55ef3e02018-04-11 17:28:55 +01002492
Lalit Magantia73a7252019-01-25 10:32:40 +00002493// Begin of protos/perfetto/trace/ftrace/raw_syscalls.proto
2494
2495message SysEnterFtraceEvent {
2496 optional int64 id = 1;
2497}
2498message SysExitFtraceEvent {
2499 optional int64 id = 1;
2500 optional int64 ret = 2;
2501}
2502
2503// End of protos/perfetto/trace/ftrace/raw_syscalls.proto
2504
Hector Dearmane0e57802018-11-21 16:09:56 +00002505// Begin of protos/perfetto/trace/ftrace/sched.proto
Hector Dearman55ef3e02018-04-11 17:28:55 +01002506
2507message SchedSwitchFtraceEvent {
2508 optional string prev_comm = 1;
2509 optional int32 prev_pid = 2;
2510 optional int32 prev_prio = 3;
2511 optional int64 prev_state = 4;
2512 optional string next_comm = 5;
2513 optional int32 next_pid = 6;
2514 optional int32 next_prio = 7;
2515}
Hector Dearman55ef3e02018-04-11 17:28:55 +01002516message SchedWakeupFtraceEvent {
2517 optional string comm = 1;
2518 optional int32 pid = 2;
2519 optional int32 prio = 3;
2520 optional int32 success = 4;
2521 optional int32 target_cpu = 5;
2522}
Hector Dearmane0e57802018-11-21 16:09:56 +00002523message SchedBlockedReasonFtraceEvent {
2524 optional int32 pid = 1;
2525 optional uint64 caller = 2;
2526 optional uint32 io_wait = 3;
2527}
2528message SchedCpuHotplugFtraceEvent {
2529 optional int32 affected_cpu = 1;
2530 optional int32 error = 2;
2531 optional int32 status = 3;
2532}
2533message SchedWakingFtraceEvent {
2534 optional string comm = 1;
2535 optional int32 pid = 2;
2536 optional int32 prio = 3;
2537 optional int32 success = 4;
2538 optional int32 target_cpu = 5;
2539}
2540message SchedWakeupNewFtraceEvent {
2541 optional string comm = 1;
2542 optional int32 pid = 2;
2543 optional int32 prio = 3;
2544 optional int32 success = 4;
2545 optional int32 target_cpu = 5;
2546}
2547message SchedProcessExecFtraceEvent {
2548 optional string filename = 1;
2549 optional int32 pid = 2;
2550 optional int32 old_pid = 3;
2551}
2552message SchedProcessExitFtraceEvent {
2553 optional string comm = 1;
2554 optional int32 pid = 2;
2555 optional int32 tgid = 3;
2556 optional int32 prio = 4;
2557}
2558message SchedProcessForkFtraceEvent {
2559 optional string parent_comm = 1;
2560 optional int32 parent_pid = 2;
2561 optional string child_comm = 3;
2562 optional int32 child_pid = 4;
2563}
2564message SchedProcessFreeFtraceEvent {
2565 optional string comm = 1;
2566 optional int32 pid = 2;
2567 optional int32 prio = 3;
2568}
2569message SchedProcessHangFtraceEvent {
2570 optional string comm = 1;
2571 optional int32 pid = 2;
2572}
2573message SchedProcessWaitFtraceEvent {
2574 optional string comm = 1;
2575 optional int32 pid = 2;
2576 optional int32 prio = 3;
2577}
Hector Dearman55ef3e02018-04-11 17:28:55 +01002578
Hector Dearmane0e57802018-11-21 16:09:56 +00002579// End of protos/perfetto/trace/ftrace/sched.proto
2580
2581// Begin of protos/perfetto/trace/ftrace/signal.proto
2582
2583message SignalDeliverFtraceEvent {
2584 optional int32 code = 1;
2585 optional uint64 sa_flags = 2;
2586 optional int32 sig = 3;
2587}
2588message SignalGenerateFtraceEvent {
2589 optional int32 code = 1;
2590 optional string comm = 2;
2591 optional int32 group = 3;
2592 optional int32 pid = 4;
2593 optional int32 result = 5;
2594 optional int32 sig = 6;
2595}
2596
2597// End of protos/perfetto/trace/ftrace/signal.proto
2598
Hector Dearmanbfc24112019-06-04 19:35:51 +01002599// Begin of protos/perfetto/trace/ftrace/systrace.proto
2600
2601message ZeroFtraceEvent {
2602 optional int32 flag = 1;
2603 optional string name = 2;
2604 optional int32 pid = 3;
2605 optional int64 value = 4;
2606}
2607
2608// End of protos/perfetto/trace/ftrace/systrace.proto
2609
Hector Dearmane0e57802018-11-21 16:09:56 +00002610// Begin of protos/perfetto/trace/ftrace/task.proto
2611
2612message TaskNewtaskFtraceEvent {
2613 optional int32 pid = 1;
2614 optional string comm = 2;
2615 optional uint64 clone_flags = 3;
2616 optional int32 oom_score_adj = 4;
2617}
2618message TaskRenameFtraceEvent {
2619 optional int32 pid = 1;
2620 optional string oldcomm = 2;
2621 optional string newcomm = 3;
2622 optional int32 oom_score_adj = 4;
2623}
2624
2625// End of protos/perfetto/trace/ftrace/task.proto
2626
2627// Begin of protos/perfetto/trace/ftrace/vmscan.proto
2628
2629message MmVmscanDirectReclaimBeginFtraceEvent {
2630 optional int32 order = 1;
2631 optional int32 may_writepage = 2;
2632 optional uint32 gfp_flags = 3;
2633}
2634message MmVmscanDirectReclaimEndFtraceEvent {
2635 optional uint64 nr_reclaimed = 1;
2636}
2637message MmVmscanKswapdWakeFtraceEvent {
2638 optional int32 nid = 1;
2639 optional int32 order = 2;
2640}
2641message MmVmscanKswapdSleepFtraceEvent {
2642 optional int32 nid = 1;
2643}
2644
2645// End of protos/perfetto/trace/ftrace/vmscan.proto
Isabelle Taylor98e560d2018-11-22 11:59:12 +00002646
Eric Secklerc73ef062019-02-25 12:30:35 +00002647// Begin of protos/perfetto/trace/interned_data/interned_data.proto
2648
2649// ------------------------------ DATA INTERNING: ------------------------------
2650// Interning indexes are built up gradually by adding the entries contained in
2651// each TracePacket of the same packet sequence (packets emitted by the same
2652// producer and TraceWriter, see |trusted_packet_sequence_id|). Thus, packets
2653// can only refer to interned data from other packets in the same sequence.
2654//
2655// The writer will emit new entries when it encounters new internable values
2656// that aren't yet in the index. Data in current and subsequent TracePackets can
2657// then refer to the entry by its position (interning ID, abbreviated "iid") in
Eric Seckler612d1d02019-05-01 15:04:02 +01002658// its index. An interning ID with value 0 is considered invalid (not set).
Eric Secklerc73ef062019-02-25 12:30:35 +00002659//
2660// Because of the incremental build-up, the interning index will miss data when
2661// TracePackets are lost, e.g. because a chunk was overridden in the central
2662// ring buffer. To avoid invalidation of the whole trace in such a case, the
2663// index is periodically reset (see |incremental_state_cleared| in TracePacket).
2664// When packet loss occurs, the reader will only lose interning data up to the
2665// next reset.
2666// -----------------------------------------------------------------------------
2667
2668// Message that contains new entries for the interning indices of a packet
2669// sequence.
2670//
2671// The writer will usually emit new entries in the same TracePacket that first
2672// refers to them (since the last reset of interning state). They may also be
2673// emitted proactively in advance of referring to them in later packets.
2674//
Siddhartha S06add2b2019-06-20 02:58:50 -07002675// Next reserved id: 8 (up to 15).
Florian Mayercf9eadc2019-08-05 11:59:35 +01002676// Next id: 22.
Eric Secklerc73ef062019-02-25 12:30:35 +00002677message InternedData {
2678 // Each field's message type needs to specify an |iid| field, which is the ID
2679 // of the entry in the field's interning index. Each field constructs its own
2680 // index, thus interning IDs are scoped to the tracing session and field
2681 // (usually as a counter for efficient var-int encoding). It is illegal to
2682 // override entries in an index (using the same iid for two different values)
2683 // within the same tracing session, even after a reset of the emitted
2684 // interning state.
2685 repeated EventCategory event_categories = 1;
2686 repeated LegacyEventName legacy_event_names = 2;
2687 repeated DebugAnnotationName debug_annotation_names = 3;
2688 repeated SourceLocation source_locations = 4;
Nicolò Mazzucato85940b72019-07-18 10:32:39 +01002689 repeated LogMessageBody log_message_body = 20;
Florian Mayerd0ee6322019-06-07 12:15:48 +01002690
Eric Secklerc73ef062019-02-25 12:30:35 +00002691 // Note: field IDs up to 15 should be used for frequent data only.
Florian Mayerd0ee6322019-06-07 12:15:48 +01002692
2693 // Build IDs of exectuable files.
2694 repeated InternedString build_ids = 16;
2695 // Paths to executable files.
2696 repeated InternedString mapping_paths = 17;
Florian Mayer36fb0192019-08-02 11:22:45 +01002697 // Paths to source files.
2698 repeated InternedString source_paths = 18;
Florian Mayerd0ee6322019-06-07 12:15:48 +01002699 // Names of functions used in frames below.
2700 repeated InternedString function_names = 5;
Florian Mayercf9eadc2019-08-05 11:59:35 +01002701 // Symbols that were added to this trace after the fact.
2702 repeated ProfiledFrameSymbols profiled_frame_symbols = 21;
Florian Mayerd0ee6322019-06-07 12:15:48 +01002703
2704 // Executable files mapped into processes.
2705 repeated Mapping mappings = 19;
2706 // Frames of callstacks of a program.
2707 repeated Frame frames = 6;
2708 // A callstack of a program.
2709 repeated Callstack callstacks = 7;
Eric Secklerc73ef062019-02-25 12:30:35 +00002710}
2711
2712// End of protos/perfetto/trace/interned_data/interned_data.proto
2713
Primiano Tuccib02d8dc2019-06-04 11:46:43 +01002714// Begin of protos/perfetto/trace/perfetto/perfetto_metatrace.proto
2715
2716// Used to trace the execution of perfetto itself.
2717message PerfettoMetatrace {
2718 // See base/metatrace_events.h for definitions.
2719 oneof record_type {
2720 uint32 event_id = 1;
2721 uint32 counter_id = 2;
2722 }
2723
2724 // Only when using |event_id|.
2725 optional uint32 event_duration_ns = 3;
2726
2727 // Only when using |counter_id|.
2728 optional int32 counter_value = 4;
2729
2730 // ID of the thread that emitted the event.
2731 optional uint32 thread_id = 5;
2732
2733 // If true the meta-tracing ring buffer had overruns and hence some data is
2734 // missing from this point.
2735 optional bool has_overruns = 6;
2736}
2737
2738// End of protos/perfetto/trace/perfetto/perfetto_metatrace.proto
2739
Primiano Tuccib86e9ca2018-12-03 20:20:11 +01002740// Begin of protos/perfetto/trace/power/battery_counters.proto
2741
2742message BatteryCounters {
2743 // Battery capacity in microampere-hours(µAh). Also known as Coulomb counter.
2744 optional int64 charge_counter_uah = 1;
2745
2746 // Remaining battery capacity percentage of total capacity
2747 optional float capacity_percent = 2;
2748
2749 // Instantaneous battery current in microamperes(µA).
2750 // Positive values indicate net current entering the battery from a charge
2751 // source, negative values indicate net current discharging from the battery.
2752 optional int64 current_ua = 3;
2753
2754 // Instantaneous battery current in microamperes(µA).
2755 optional int64 current_avg_ua = 4;
2756}
2757
2758// End of protos/perfetto/trace/power/battery_counters.proto
2759
Esteban Talavera7714cec2019-01-31 15:53:34 +00002760// Begin of protos/perfetto/trace/power/power_rails.proto
2761
2762message PowerRails {
2763
2764 message RailDescriptor {
2765 // Index corresponding to the rail
2766 optional uint32 index = 1;
2767 // Name of the rail
2768 optional string rail_name = 2;
2769 // Name of the subsystem to which this rail belongs
2770 optional string subsys_name = 3;
2771 // Hardware sampling rate
2772 optional uint32 sampling_rate = 4;
2773 }
2774
2775 // This is only emitted at the beginning of the trace.
2776 repeated RailDescriptor rail_descriptor = 1;
2777
2778 message EnergyData {
2779 // Index corresponding to RailDescriptor.index
2780 optional uint32 index = 1;
2781 // Time since device boot(CLOCK_BOOTTIME) in milli-seconds
2782 optional uint64 timestamp_ms = 2;
2783 // Accumulated energy since device boot in microwatt-seconds (uWs)
2784 optional uint64 energy = 3;
2785 }
2786
2787 repeated EnergyData energy_data = 2;
2788}
2789
2790// End of protos/perfetto/trace/power/power_rails.proto
2791
Florian Mayer06264b42019-07-30 12:09:30 +01002792// Begin of protos/perfetto/trace/profiling/heap_graph.proto
2793
2794message HeapGraphObject {
2795 optional uint64 id = 1;
2796
2797 // Index for InternedData.type_names for the name of the type of this object.
2798 optional uint64 type_id = 2;
2799
2800 // Bytes occupied by this objects.
2801 optional uint64 self_size = 3;
2802
2803 // Indices for InternedData.field_names for the name of the field referring
2804 // to the object.
2805 repeated uint64 reference_field_id = 4;
2806
2807 // Ids of the Object that is referred to.
2808 repeated uint64 reference_object_id = 5;
2809}
2810
2811message HeapGraph {
2812 optional int32 pid = 1;
2813
2814 // Live objects at the time this dump was taken.
2815 repeated HeapGraphObject objects = 2;
2816
2817 // Type names used in managed heap graph.
2818 repeated InternedString type_names = 3;
2819
2820 // Field names for references in managed heap graph.
2821 repeated InternedString field_names = 4;
2822
2823 optional bool continued = 5;
2824 optional uint64 index = 6;
2825}
2826
2827// End of protos/perfetto/trace/profiling/heap_graph.proto
2828
Florian Mayer93d16ec2019-06-05 09:51:58 +01002829// Begin of protos/perfetto/trace/profiling/profile_common.proto
2830
Siddhartha S545776e2019-06-12 19:30:19 -07002831// The interning fields in this file can refer to 2 different intern tables,
2832// depending on the message they are used in. If the interned fields are present
2833// in ProfilePacket proto, then the intern tables included in the ProfilePacket
2834// should be used. If the intered fields are present in the
2835// StreamingProfilePacket proto, then the intern tables included in all of the
2836// previous InternedData message with same sequence ID should be used.
2837// TODO(fmayer): Move to the intern tables to a common location.
Florian Mayerd0ee6322019-06-07 12:15:48 +01002838message InternedString {
2839 optional uint64 iid = 1;
2840 optional bytes str = 2;
2841}
2842
Siddhartha S545776e2019-06-12 19:30:19 -07002843// A symbol field that is emitted after the trace is written. These tables would
2844// be appended as the last packets in the trace that the profiler will use, so
2845// that the actual trace need not be rewritten to symbolize the profiles.
Siddhartha S06add2b2019-06-20 02:58:50 -07002846message ProfiledFrameSymbols {
Siddhartha S545776e2019-06-12 19:30:19 -07002847 // Use the frame id as the interning key for the symbols.
Florian Mayercf9eadc2019-08-05 11:59:35 +01002848 optional uint64 frame_iid = 1;
Siddhartha S545776e2019-06-12 19:30:19 -07002849
Florian Mayereac28922019-08-01 13:00:38 +01002850 // These are repeated because when inlining happens, multiple functions'
2851 // frames can be at a single address. Imagine function Foo calling the
2852 // std::vector<int> constructor, which gets inlined at 0xf00. We then get
2853 // both Foo and the std::vector<int> constructor when we symbolize the
2854 // address.
Florian Mayercf9eadc2019-08-05 11:59:35 +01002855 repeated uint64 function_name_id = 2; // key to InternedString
2856 repeated uint64 file_name_id = 3; // key to InternedString
2857 repeated uint32 line_number = 4;
Siddhartha S545776e2019-06-12 19:30:19 -07002858}
2859
Florian Mayer93d16ec2019-06-05 09:51:58 +01002860message Mapping {
Florian Mayerd0ee6322019-06-07 12:15:48 +01002861 optional uint64 iid = 1; // Interning key.
Florian Mayer93d16ec2019-06-05 09:51:58 +01002862 optional uint64 build_id = 2; // Interning key.
Florian Mayer12655732019-07-02 15:08:26 +01002863 // TODO(fmayer): Document difference between those two.
2864 optional uint64 exact_offset = 8;
2865 optional uint64 start_offset = 3;
Florian Mayer93d16ec2019-06-05 09:51:58 +01002866 optional uint64 start = 4;
2867 optional uint64 end = 5;
2868 optional uint64 load_bias = 6;
2869 // E.g. ["system", "lib64", "libc.so"]
2870 repeated uint64 path_string_ids = 7; // id of string.
2871}
2872
2873message Frame {
Florian Mayerd0ee6322019-06-07 12:15:48 +01002874 optional uint64 iid = 1; // Interning key
Florian Mayer93d16ec2019-06-05 09:51:58 +01002875 // E.g. "fopen"
2876 optional uint64 function_name_id = 2; // id of string.
2877 optional uint64 mapping_id = 3;
2878 optional uint64 rel_pc = 4;
2879}
2880
2881message Callstack {
Florian Mayerd0ee6322019-06-07 12:15:48 +01002882 optional uint64 iid = 1;
Florian Mayer93d16ec2019-06-05 09:51:58 +01002883 // Frames of this callstack. Bottom frame first.
2884 repeated uint64 frame_ids = 2;
2885}
2886
2887// End of protos/perfetto/trace/profiling/profile_common.proto
2888
Hector Dearman685f7522019-03-12 14:28:56 +00002889// Begin of protos/perfetto/trace/profiling/profile_packet.proto
2890
2891message ProfilePacket {
Florian Mayer5716fc12019-06-24 11:50:51 -07002892 // The following interning tables are only used in Android version Q.
2893 // In newer versions, these tables are in InternedData
2894 // (see protos/perfetto/trace/interned_data) and are shared across
2895 // multiple ProfilePackets.
2896 // For backwards compatibility, consumers need to first look up interned
2897 // data in the tables within the ProfilePacket, and then, if they are empty,
2898 // look up in the InternedData instead.
Hector Dearman685f7522019-03-12 14:28:56 +00002899 repeated InternedString strings = 1;
Florian Mayerdc642fa2019-04-16 20:20:12 +01002900 repeated Mapping mappings = 4;
Hector Dearman685f7522019-03-12 14:28:56 +00002901 repeated Frame frames = 2;
Hector Dearman685f7522019-03-12 14:28:56 +00002902 repeated Callstack callstacks = 3;
Hector Dearman685f7522019-03-12 14:28:56 +00002903
Florian Mayer8707d4d2019-07-16 11:17:46 +01002904 // Next ID: 9
Hector Dearman685f7522019-03-12 14:28:56 +00002905 message HeapSample {
2906 optional uint64 callstack_id = 1;
Florian Mayer78760f22019-05-15 18:05:53 +01002907 // bytes allocated at this callstack.
Hector Dearman685f7522019-03-12 14:28:56 +00002908 optional uint64 self_allocated = 2;
Florian Mayer78760f22019-05-15 18:05:53 +01002909 // bytes allocated at this callstack that have been freed.
Hector Dearman685f7522019-03-12 14:28:56 +00002910 optional uint64 self_freed = 3;
Florian Mayer7142c7c2019-05-20 18:11:41 +01002911 // bytes allocated at this callstack but not used since the last
Florian Mayer4c19b692019-07-15 16:58:38 +01002912 // dump.
Florian Mayer7142c7c2019-05-20 18:11:41 +01002913 // See documentation of idle_allocations in HeapprofdConfig for more
2914 // details.
2915 optional uint64 self_idle = 7;
Florian Mayer8707d4d2019-07-16 11:17:46 +01002916 // Bytes allocated by this callstack but not freed at the time the malloc
2917 // heap usage of this process was maximal. This is only set if dump_at_max
2918 // is true in HeapprofdConfig. In that case, self_allocated, self_freed and
2919 // self_idle will not be set.
2920 optional uint64 self_max = 8;
Hector Dearman685f7522019-03-12 14:28:56 +00002921 optional uint64 timestamp = 4; // timestamp [opt]
Florian Mayer78760f22019-05-15 18:05:53 +01002922 // Number of allocations that were sampled at this callstack.
Hector Dearman685f7522019-03-12 14:28:56 +00002923 optional uint64 alloc_count = 5;
Florian Mayer78760f22019-05-15 18:05:53 +01002924 // Number of allocations that were sampled at this callstack that have been
2925 // freed.
Hector Dearman685f7522019-03-12 14:28:56 +00002926 optional uint64 free_count = 6;
2927 }
2928
Florian Mayer096bbe32019-04-03 12:10:53 +01002929 message Histogram {
2930 message Bucket {
2931 // This bucket counts values from the previous bucket's (or -infinity if
2932 // this is the first bucket) upper_limit (inclusive) to this upper_limit
2933 // (exclusive).
2934 optional uint64 upper_limit = 1;
2935 // This is the highest bucket. This is set instead of the upper_limit. Any
2936 // values larger or equal to the previous bucket's upper_limit are counted
2937 // in this bucket.
2938 optional bool max_bucket = 2;
2939 // Number of values that fall into this range.
2940 optional uint64 count = 3;
2941 }
2942 repeated Bucket buckets = 1;
2943 }
Florian Mayerdc642fa2019-04-16 20:20:12 +01002944
Florian Mayerdba63f72019-03-27 10:20:46 +00002945 message ProcessStats {
2946 optional uint64 unwinding_errors = 1;
2947 optional uint64 heap_samples = 2;
2948 optional uint64 map_reparses = 3;
Florian Mayer096bbe32019-04-03 12:10:53 +01002949 optional Histogram unwinding_time_us = 4;
Florian Mayer9fe278d2019-04-04 19:20:41 +01002950 optional uint64 total_unwinding_time_us = 5;
Florian Mayerdba63f72019-03-27 10:20:46 +00002951 }
Florian Mayerd0335fe2019-03-27 10:20:22 +00002952
Florian Mayerdc642fa2019-04-16 20:20:12 +01002953 repeated ProcessHeapSamples process_dumps = 5;
Hector Dearman685f7522019-03-12 14:28:56 +00002954 message ProcessHeapSamples {
2955 optional uint64 pid = 1;
Florian Mayerd0335fe2019-03-27 10:20:22 +00002956
2957 // This process was profiled from startup.
2958 // If false, this process was already running when profiling started.
2959 optional bool from_startup = 3;
2960
2961 // This process was not profiled because a concurrent session was active.
2962 // If this is true, samples will be empty.
2963 optional bool rejected_concurrent = 4;
Florian Mayer22e08dc2019-03-28 11:36:02 +00002964
2965 // This process disconnected while it was profiled.
2966 // If false, the process outlived the profiling session.
2967 optional bool disconnected = 6;
2968
Florian Mayerf6680532019-04-10 17:39:31 +01002969 // If disconnected, this disconnect was caused by the client overrunning
2970 // the buffer.
2971 optional bool buffer_overran = 7;
2972
Florian Mayere32b4fd2019-04-15 14:37:52 +01002973 // If disconnected, this disconnected was caused by the shared memory
2974 // buffer being corrupted. THIS IS ALWAYS A BUG IN HEAPPROFD OR CLIENT
2975 // MEMORY CORRUPTION.
2976 optional bool buffer_corrupted = 8;
2977
Florian Mayer5bd65f42019-05-02 16:20:38 +01002978 // Timestamp of the state of the target process that this dump represents.
2979 // This can be different to the timestamp of the TracePackets for various
2980 // reasons:
2981 // * If disconnected is set above, this is the timestamp of last state
2982 // heapprofd had of the process before it disconnected.
2983 // * Otherwise, if the rate of events produced by the process is high,
2984 // heapprofd might be behind.
2985 //
2986 // TODO(fmayer): This is MONOTONIC_COARSE. Refactor ClockSnapshot::Clock
2987 // to have a type enum that we can reuse here.
2988 optional uint64 timestamp = 9;
2989
Florian Mayerd0335fe2019-03-27 10:20:22 +00002990 optional ProcessStats stats = 5;
2991
Hector Dearman685f7522019-03-12 14:28:56 +00002992 repeated HeapSample samples = 2;
2993 }
2994
2995 optional bool continued = 6;
Florian Mayer638a1162019-07-12 10:42:56 +00002996 optional uint64 index = 7;
Hector Dearman685f7522019-03-12 14:28:56 +00002997}
2998
Oystein Eftevaagcba56412019-06-13 10:32:01 -07002999// Message used to represent individual stack samples sampled at discrete
3000// points in time, rather than aggregated over an interval.
3001message StreamingProfilePacket {
3002 repeated uint64 callstack_iid = 1; // Index into InternedData.callstacks
3003 repeated int64 timestamp_delta_us = 2;
3004}
3005
Hector Dearman685f7522019-03-12 14:28:56 +00003006// End of protos/perfetto/trace/profiling/profile_packet.proto
3007
Hector Dearmane92c6742018-11-22 21:42:39 +00003008// Begin of protos/perfetto/trace/ps/process_stats.proto
Isabelle Taylor98e560d2018-11-22 11:59:12 +00003009
Hector Dearmane92c6742018-11-22 21:42:39 +00003010// Per-process periodically sampled stats. These samples are wrapped in a
3011// dedicated message (as opposite to be fields in process_tree.proto) because
3012// they are dumped at a different rate than cmdline and thread list.
Lalit Maganti999355c2019-03-27 18:17:08 +00003013// Note: not all of these stats will be present in every ProcessStats message
3014// and sometimes processes may be missing . This is because counters are
3015// cached to reduce emission of counters which do not change.
Hector Dearmane92c6742018-11-22 21:42:39 +00003016message ProcessStats {
Lalit Maganti6820abc2019-01-21 11:12:23 +00003017 message Process {
Hector Dearmane92c6742018-11-22 21:42:39 +00003018 optional int32 pid = 1;
Lalit Maganti6820abc2019-01-21 11:12:23 +00003019
3020 // See /proc/[pid]/status in `man 5 proc` for a description of these fields.
Hector Dearmane92c6742018-11-22 21:42:39 +00003021 optional uint64 vm_size_kb = 2;
3022 optional uint64 vm_rss_kb = 3;
3023 optional uint64 rss_anon_kb = 4;
3024 optional uint64 rss_file_kb = 5;
3025 optional uint64 rss_shmem_kb = 6;
3026 optional uint64 vm_swap_kb = 7;
3027 optional uint64 vm_locked_kb = 8;
3028 optional uint64 vm_hwm_kb = 9;
3029 // When adding a new field remember to update kProcMemCounterSize in
3030 // the trace processor.
Lalit Maganti6820abc2019-01-21 11:12:23 +00003031
3032 optional int64 oom_score_adj = 10;
Isabelle Taylor98e560d2018-11-22 11:59:12 +00003033 }
Lalit Maganti6820abc2019-01-21 11:12:23 +00003034 repeated Process processes = 1;
Daniel Colascione4fe75a52019-05-30 12:39:12 -07003035
3036 // The time at which we finish collecting this batch of samples;
3037 // the top-level packet timestamp is the time at which
3038 // we begin collection.
3039 // TODO(dancol): analysis might be improved by
3040 // time-bracketing each sample as well as the whole
3041 // ProcessStats, but doing that is probably gated on
3042 // a vdso for CLOCK_BOOTTIME.
3043 optional uint64 collection_end_timestamp = 2;
Isabelle Taylor98e560d2018-11-22 11:59:12 +00003044}
3045
Hector Dearmane92c6742018-11-22 21:42:39 +00003046// End of protos/perfetto/trace/ps/process_stats.proto
3047
3048// Begin of protos/perfetto/trace/ps/process_tree.proto
3049
3050message ProcessTree {
3051 // Representation of a thread.
3052 message Thread {
3053 // The thread id (as per gettid())
3054 optional int32 tid = 1;
3055
3056 // Thread group id (i.e. the PID of the process, == TID of the main thread)
3057 optional int32 tgid = 3;
3058
3059 // The name of the thread.
3060 optional string name = 2;
3061 }
3062
3063 // Representation of a process.
3064 message Process {
3065 // The UNIX process ID, aka thread group ID (as per getpid()).
3066 optional int32 pid = 1;
3067
3068 // The parent process ID, as per getppid().
3069 optional int32 ppid = 2;
3070
3071 // The command line for the process, as per /proc/pid/cmdline.
3072 // If it is a kernel thread there will only be one cmdline field
3073 // and it will contain /proc/pid/comm.
3074 repeated string cmdline = 3;
3075
3076 // No longer used as of Apr 2018, when the dedicated |threads| field was
3077 // introduced in ProcessTree.
3078 repeated Thread threads_deprecated = 4 [deprecated = true];
3079 }
3080
3081 // List of processes and threads in the client. These lists are incremental
3082 // and not exhaustive. A process and its threads might show up separately in
3083 // different ProcessTree messages. A thread might event not show up at all, if
3084 // no sched_switch activity was detected, for instance:
3085 // #0 { processes: [{pid: 10, ...}], threads: [{pid: 11, tgid: 10}] }
3086 // #1 { threads: [{pid: 12, tgid: 10}] }
3087 // #2 { processes: [{pid: 20, ...}], threads: [{pid: 13, tgid: 10}] }
3088 repeated Process processes = 1;
3089 repeated Thread threads = 2;
Daniel Colascione4fe75a52019-05-30 12:39:12 -07003090
3091 // The time at which we finish collecting this process tree;
3092 // the top-level packet timestamp is the time at which
3093 // we begin collection.
3094 optional uint64 collection_end_timestamp = 3;
Hector Dearmane92c6742018-11-22 21:42:39 +00003095}
3096
3097// End of protos/perfetto/trace/ps/process_tree.proto
3098
3099// Begin of protos/perfetto/trace/sys_stats/sys_stats.proto
3100
3101// Various Linux system stat counters from /proc.
3102// The fields in this message can be reported at different rates and with
3103// different granularity. See sys_stats_config.proto.
3104message SysStats {
3105 // Counters from /proc/meminfo. Values are in KB.
3106 message MeminfoValue {
3107 optional MeminfoCounters key = 1;
3108 optional uint64 value = 2;
3109 };
3110 repeated MeminfoValue meminfo = 1;
3111
3112 // Counter from /proc/vmstat. Units are often pages, not KB.
3113 message VmstatValue {
3114 optional VmstatCounters key = 1;
3115 optional uint64 value = 2;
3116 };
3117 repeated VmstatValue vmstat = 2;
3118
3119 // Times in each mode, since boot. Unit: nanoseconds.
3120 message CpuTimes {
3121 optional uint32 cpu_id = 1;
3122 optional uint64 user_ns = 2; // Time spent in user mode.
3123 optional uint64 user_ice_ns = 3; // Time spent in user mode (low prio).
3124 optional uint64 system_mode_ns = 4; // Time spent in system mode.
3125 optional uint64 idle_ns = 5; // Time spent in the idle task.
3126 optional uint64 io_wait_ns = 6; // Time spent waiting for I/O.
3127 optional uint64 irq_ns = 7; // Time spent servicing interrupts.
3128 optional uint64 softirq_ns = 8; // Time spent servicing softirqs.
3129 }
3130 repeated CpuTimes cpu_stat = 3; // One entry per cpu.
3131
3132 // Num processes forked since boot.
3133 // Populated only if FORK_COUNT in config.stat_counters.
3134 optional uint64 num_forks = 4;
3135
3136 message InterruptCount {
3137 optional int32 irq = 1;
3138 optional uint64 count = 2;
3139 }
3140
3141 // Number of interrupts, broken by IRQ number.
3142 // Populated only if IRQ_COUNTS in config.stat_counters.
3143 optional uint64 num_irq_total = 5; // Total num of irqs serviced since boot.
3144 repeated InterruptCount num_irq = 6;
3145
3146 // Number of softirqs, broken by softirq number.
3147 // Populated only if SOFTIRQ_COUNTS in config.stat_counters.
3148 optional uint64 num_softirq_total = 7; // Total num of softirqs since boot.
3149 repeated InterruptCount num_softirq = 8; // Per-softirq count.
Daniel Colascione4fe75a52019-05-30 12:39:12 -07003150
3151 // The time at which we finish collecting this set of samples;
3152 // the top-level packet timestamp is the time at which
3153 // we begin collection.
3154 optional uint64 collection_end_timestamp = 9;
Hector Dearmane92c6742018-11-22 21:42:39 +00003155}
3156
3157// End of protos/perfetto/trace/sys_stats/sys_stats.proto
3158
Hector Dearman685f7522019-03-12 14:28:56 +00003159// Begin of protos/perfetto/trace/system_info.proto
3160
3161message Utsname {
3162 optional string sysname = 1;
3163 optional string version = 2;
3164 optional string release = 3;
3165 optional string machine = 4;
3166}
3167
3168message SystemInfo {
3169 optional Utsname utsname = 1;
3170}
3171
3172// End of protos/perfetto/trace/system_info.proto
3173
Hector Dearmane92c6742018-11-22 21:42:39 +00003174// Begin of protos/perfetto/trace/trace.proto
3175
3176message Trace {
3177 repeated TracePacket packet = 1;
3178
3179 // Do NOT add any other field here. This is just a convenience wrapper for
3180 // the use case of a trace being saved to a file. There are other cases
3181 // (streaming) where TracePacket are directly streamed without being wrapped
3182 // in a Trace proto. Nothing should ever rely on the full trace, all the
3183 // logic should be based on TracePacket(s).
3184}
3185
3186// End of protos/perfetto/trace/trace.proto
3187
3188// Begin of protos/perfetto/trace/trace_packet.proto
3189
3190// The root object emitted by Perfetto. A perfetto trace is just a stream of
3191// TracePacket(s).
3192//
Eric Secklerc73ef062019-02-25 12:30:35 +00003193// Next reserved id: 13 (up to 15).
Primiano Tucci3e7ca4f2019-08-09 20:49:26 +02003194// Next id: 60.
Hector Dearmane92c6742018-11-22 21:42:39 +00003195message TracePacket {
Primiano Tucci3e7ca4f2019-08-09 20:49:26 +02003196 // The timestamp of the TracePacket.
3197 // By default this timestamps refers to the trace clock (CLOCK_BOOTTIME on
3198 // Android). It can be overridden using a different timestamp_clock_id.
3199 // The clock domain definition in ClockSnapshot can also override:
3200 // - The unit (default: 1ns).
3201 // - The absolute vs delta encoding (default: absolute timestamp).
3202 optional uint64 timestamp = 8;
3203
3204 // Specifies the ID of the clock used for the TracePacket |timestamp|. Can be
3205 // one of the built-in types from ClockSnapshot::BuiltinClocks, or a
3206 // producer-defined clock id.
3207 // If unspecified and if no default per-sequence value has been provided via
3208 // TracePacketDefaults, it defaults to BuiltinClocks::BOOTTIME.
3209 optional uint32 timestamp_clock_id = 58;
Hector Dearmane92c6742018-11-22 21:42:39 +00003210
3211 oneof data {
3212 FtraceEventBundle ftrace_events = 1;
3213 ProcessTree process_tree = 2;
3214 ProcessStats process_stats = 9;
3215 InodeFileMap inode_file_map = 4;
3216 // removed field with id 5
3217 ClockSnapshot clock_snapshot = 6;
3218 SysStats sys_stats = 7;
Eric Secklerc73ef062019-02-25 12:30:35 +00003219 TrackEvent track_event = 11;
Hector Dearmane92c6742018-11-22 21:42:39 +00003220
Eric Secklerc73ef062019-02-25 12:30:35 +00003221 // IDs up to 15 are reserved. They take only one byte to encode their
3222 // preamble so should be used for freqeuent events.
Hector Dearmane92c6742018-11-22 21:42:39 +00003223
Isabelle Taylor80ec5f72019-02-27 11:27:41 +00003224 TraceConfig trace_config = 33;
Hector Dearmane92c6742018-11-22 21:42:39 +00003225 FtraceStats ftrace_stats = 34;
Ryan Savitski41ce4592019-05-02 14:43:59 +01003226 TraceStats trace_stats = 35;
Florian Mayer84113672019-01-21 14:48:27 +00003227 ProfilePacket profile_packet = 37;
Primiano Tuccib86e9ca2018-12-03 20:20:11 +01003228 BatteryCounters battery = 38;
Esteban Talavera7714cec2019-01-31 15:53:34 +00003229 PowerRails power_rails = 40;
Primiano Tucci64df2ca2019-01-03 22:26:47 +00003230 AndroidLogPacket android_log = 39;
Hector Dearman685f7522019-03-12 14:28:56 +00003231 SystemInfo system_info = 45;
Stephen Nusko70ea3302019-04-01 19:44:40 +01003232 Trigger trigger = 46;
Florian Mayer12f0f8e2019-04-02 12:31:13 +01003233 PackagesList packages_list = 47;
Mikhail Khokhlov5b60af52019-05-15 10:09:34 +01003234 ChromeBenchmarkMetadata chrome_benchmark_metadata = 48;
Primiano Tuccib02d8dc2019-06-04 11:46:43 +01003235 PerfettoMetatrace perfetto_metatrace = 49;
Siddhartha S1239fb32019-06-06 11:17:13 -07003236 ChromeMetadataPacket chrome_metadata = 51;
Ryan Savitski89bd9222019-06-13 14:39:30 +01003237 GpuCounterEvent gpu_counter_event = 52;
3238 GpuRenderStageEvent gpu_render_stage_event = 53;
Oystein Eftevaagcba56412019-06-13 10:32:01 -07003239 StreamingProfilePacket streaming_profile_packet = 54;
Florian Mayer06264b42019-07-30 12:09:30 +01003240 HeapGraph heap_graph = 56;
Mikael Pessa625a0912019-07-24 15:28:16 -07003241 GraphicsFrameEvent graphics_frame_event = 57;
Hector Dearmane92c6742018-11-22 21:42:39 +00003242
Siddhartha S06add2b2019-06-20 02:58:50 -07003243 // Only used in profile packets.
3244 ProfiledFrameSymbols profiled_frame_symbols = 55;
3245
Eric Secklerc73ef062019-02-25 12:30:35 +00003246 // Only used by TrackEvent.
3247 ProcessDescriptor process_descriptor = 43;
3248 ThreadDescriptor thread_descriptor = 44;
3249
Hector Dearmane92c6742018-11-22 21:42:39 +00003250 // This field is emitted at periodic intervals (~10s) and
3251 // contains always the binary representation of the UUID
3252 // {82477a76-b28d-42ba-81dc-33326d57a079}. This is used to be able to
3253 // efficiently partition long traces without having to fully parse them.
3254 bytes synchronization_marker = 36;
3255
Hector Dearman554627f2019-06-04 17:58:22 +01003256 // Zero or more proto encoded trace packets compressed using deflate.
3257 // Each compressed_packets TracePacket (including the two field ids and
3258 // sizes) should be less than 512KB.
3259 bytes compressed_packets = 50;
3260
Hector Dearmane92c6742018-11-22 21:42:39 +00003261 // This field is only used for testing.
Hector Dearman248241e2019-05-10 18:28:45 +01003262 // In previous versions of this proto this field had the id 268435455
3263 // This caused many problems:
3264 // - protozero decoder does not handle field ids larger than 999.
3265 // - old versions of protoc produce Java bindings with syntax errors when
3266 // the field id is large enough.
3267 // removed field with id 900
Hector Dearmane92c6742018-11-22 21:42:39 +00003268 }
3269
3270 // Trusted user id of the producer which generated this packet. Keep in sync
3271 // with TrustedPacket.trusted_uid.
Eric Secklerd0ac7ca2019-02-06 09:13:45 +00003272 //
3273 // TODO(eseckler): Emit this field in a PacketSequenceDescriptor message
3274 // instead.
Hector Dearmane92c6742018-11-22 21:42:39 +00003275 oneof optional_trusted_uid { int32 trusted_uid = 3; };
Eric Secklerd0ac7ca2019-02-06 09:13:45 +00003276
3277 // Service-assigned identifier of the packet sequence this packet belongs to.
3278 // Uniquely identifies a producer + writer pair within the tracing session. A
3279 // value of zero denotes an invalid ID. Keep in sync with
3280 // TrustedPacket.trusted_packet_sequence_id.
3281 oneof optional_trusted_packet_sequence_id {
3282 uint32 trusted_packet_sequence_id = 10;
3283 }
Eric Secklerc73ef062019-02-25 12:30:35 +00003284
3285 // Incrementally emitted interned data, valid only on the packet's sequence
3286 // (packets with the same |trusted_packet_sequence_id|). The writer will
3287 // usually emit new interned data in the same TracePacket that first refers to
3288 // it (since the last reset of interning state). It may also be emitted
3289 // proactively in advance of referring to them in later packets.
3290 optional InternedData interned_data = 12;
3291
Primiano Tucci3e7ca4f2019-08-09 20:49:26 +02003292 enum SequenceFlags {
3293 SEQ_UNSPECIFIED = 0;
3294
3295 // Set by the writer to indicate that it will re-emit any incremental data
3296 // for the packet's sequence before referring to it again. This includes
3297 // interned data as well as periodically emitted data like
3298 // Process/ThreadDescriptors. This flag only affects the current packet
3299 // sequence (see |trusted_packet_sequence_id|).
3300 //
3301 // When set, this TracePacket and subsequent TracePackets on the same
3302 // sequence will not refer to any incremental data emitted before this
3303 // TracePacket. For example, previously emitted interned data will be
3304 // re-emitted if it is referred to again.
3305 //
3306 // When the reader detects packet loss (|previous_packet_dropped|), it needs
3307 // to skip packets in the sequence until the next one with this flag set, to
3308 // ensure intact incremental data.
3309 SEQ_INCREMENTAL_STATE_CLEARED = 1;
3310
3311 // This packet requires incremental state, such as TracePacketDefaults or
3312 // InternedData, to be parsed correctly. The trace reader should skip this
3313 // packet if incremental state is not valid on this sequence, i.e. if no
3314 // packet with the SEQ_INCREMENTAL_STATE_CLEARED flag has been seen on the
3315 // current |trusted_packet_sequence_id|.
3316 SEQ_NEEDS_INCREMENTAL_STATE = 2;
3317 };
3318 optional uint32 sequence_flags = 13;
3319
3320 // DEPRECATED. Moved to SequenceFlags::SEQ_INCREMENTAL_STATE_CLEARED.
Eric Secklerc73ef062019-02-25 12:30:35 +00003321 optional bool incremental_state_cleared = 41;
3322
Primiano Tucci3e7ca4f2019-08-09 20:49:26 +02003323 // Default values for fields of later TracePackets emitted on this packet's
3324 // sequence (TracePackets with the same |trusted_packet_sequence_id|).
3325 // It must be reemitted when incremental state is cleared (see
3326 // |incremental_state_cleared|).
3327 // Requires that any future packet emitted on the same sequence specifies
3328 // the SEQ_NEEDS_INCREMENTAL_STATE flag.
3329 // TracePacketDefaults always override the global defaults for any future
3330 // packet on this sequence (regardless of SEQ_NEEDS_INCREMENTAL_STATE).
3331 optional TracePacketDefaults trace_packet_defaults = 59;
3332
Ryan Savitskia9097812019-03-26 16:13:25 +00003333 // Flag set by the service if, for the current packet sequence (see
3334 // |trusted_packet_sequence_id|), either:
3335 // * this is the first packet, or
3336 // * one or multiple packets were dropped since the last packet that the
3337 // consumer read from the sequence. This can happen if chunks in the trace
3338 // buffer are overridden before the consumer could read them when the trace
3339 // is configured in ring buffer mode.
Eric Secklerc73ef062019-02-25 12:30:35 +00003340 //
3341 // When packet loss occurs, incrementally emitted data (including interned
3342 // data) on the sequence should be considered invalid up until the next packet
Ryan Savitskia9097812019-03-26 16:13:25 +00003343 // with |incremental_state_cleared| set.
Eric Secklerc73ef062019-02-25 12:30:35 +00003344 optional bool previous_packet_dropped = 42;
Hector Dearmane92c6742018-11-22 21:42:39 +00003345}
3346
3347// End of protos/perfetto/trace/trace_packet.proto
Florian Mayer84113672019-01-21 14:48:27 +00003348
Primiano Tucci3e7ca4f2019-08-09 20:49:26 +02003349// Begin of protos/perfetto/trace/trace_packet_defaults.proto
3350
3351// Default values for TracePacket fields that hold for a particular TraceWriter
3352// packet sequence. This message contains a subset of the TracePacket fields
3353// with matching IDs. When provided, these fields define the default values
3354// that should be applied, at import time, to all TracePacket(s) with the same
3355// |trusted_packet_sequence_id|, unless otherwise specified in each packet.
3356message TracePacketDefaults {
3357 optional uint32 timestamp_clock_id = 58;
3358
3359 // TODO(eseckler): Add default values for TrackEvents (e.g. default track).
3360 message TrackEventDefaults {
3361 // optional int32 tid = ...;
3362 }
3363 optional TrackEventDefaults track_event = 11;
3364}
3365// End of protos/perfetto/trace/trace_packet_defaults.proto
3366
Eric Secklerc73ef062019-02-25 12:30:35 +00003367// Begin of protos/perfetto/trace/track_event/debug_annotation.proto
3368
3369// Key/value annotations provided in untyped TRACE_EVENT macros. These
3370// annotations are intended for debug use and are not considered a stable API
3371// surface. As such, they should not be relied upon to implement (new) metrics.
3372message DebugAnnotation {
3373 message NestedValue {
3374 enum NestedType {
3375 UNSPECIFIED = 0; // leaf value.
3376 DICT = 1;
3377 ARRAY = 2;
3378 }
3379 optional NestedType nested_type = 1;
3380
3381 repeated string dict_keys = 2;
3382 repeated NestedValue dict_values = 3;
3383 repeated NestedValue array_values = 4;
3384 optional int64 int_value = 5;
3385 optional double double_value = 6;
3386 optional bool bool_value = 7;
3387 optional string string_value = 8;
3388 }
3389
Florian Mayer5716fc12019-06-24 11:50:51 -07003390 optional uint64 name_iid = 1; // interned DebugAnnotationName.
Eric Secklerc73ef062019-02-25 12:30:35 +00003391
3392 oneof value {
3393 bool bool_value = 2;
3394 uint64 uint_value = 3;
3395 int64 int_value = 4;
3396 double double_value = 5;
3397 string string_value = 6;
3398 // Pointers are stored in a separate type as the JSON output treats them
3399 // differently from other uint64 values.
3400 uint64 pointer_value = 7;
3401 NestedValue nested_value = 8;
3402
3403 // Legacy instrumentation may not support conversion of nested data to
3404 // NestedValue yet.
3405 string legacy_json_value = 9;
3406 }
3407}
3408
3409// --------------------
3410// Interned data types:
3411// --------------------
3412
3413message DebugAnnotationName {
Florian Mayer5716fc12019-06-24 11:50:51 -07003414 optional uint64 iid = 1;
Eric Secklerc73ef062019-02-25 12:30:35 +00003415 optional string name = 2;
3416}
3417
3418// End of protos/perfetto/trace/track_event/debug_annotation.proto
3419
Nicolò Mazzucato85940b72019-07-18 10:32:39 +01003420// Begin of protos/perfetto/trace/track_event/log_message.proto
3421
3422message LogMessage {
3423 optional uint64 source_location_iid = 1; // interned SourceLocation.
3424 optional uint64 body_iid = 2; // interned LogMessageBody.
3425}
3426
3427// --------------------
3428// Interned data types:
3429// --------------------
3430
3431message LogMessageBody {
3432 optional uint64 iid = 1;
3433 optional string body = 2;
3434}
3435// End of protos/perfetto/trace/track_event/log_message.proto
3436
Eric Secklerc73ef062019-02-25 12:30:35 +00003437// Begin of protos/perfetto/trace/track_event/process_descriptor.proto
3438
3439// Process-wide data that is periodically emitted by one thread per process.
3440// Valid for all events in packet sequences emitted by the same process.
3441//
3442// Next id: 5.
3443message ProcessDescriptor {
3444 optional int32 pid = 1;
3445 repeated string cmdline = 2;
3446
3447 // To support old UI. New UI should determine default sorting by process_type.
3448 optional int32 legacy_sort_index = 3;
3449
3450 // See chromium's content::ProcessType.
3451 enum ChromeProcessType {
Eric Seckler59945762019-03-04 11:48:25 +00003452 PROCESS_UNSPECIFIED = 0;
3453 PROCESS_BROWSER = 1;
3454 PROCESS_RENDERER = 2;
3455 PROCESS_UTILITY = 3;
3456 PROCESS_ZYGOTE = 4;
3457 PROCESS_SANDBOX_HELPER = 5;
3458 PROCESS_GPU = 6;
3459 PROCESS_PPAPI_PLUGIN = 7;
3460 PROCESS_PPAPI_BROKER = 8;
Eric Secklerc73ef062019-02-25 12:30:35 +00003461 }
3462 optional ChromeProcessType chrome_process_type = 4;
Oystein Eftevaagcba56412019-06-13 10:32:01 -07003463 optional int32 process_priority = 5;
Eric Secklerc73ef062019-02-25 12:30:35 +00003464}
3465
3466// End of protos/perfetto/trace/track_event/process_descriptor.proto
3467
Nicolò Mazzucato85940b72019-07-18 10:32:39 +01003468// Begin of protos/perfetto/trace/track_event/source_location.proto
Eric Secklerc73ef062019-02-25 12:30:35 +00003469
3470// --------------------
3471// Interned data types:
3472// --------------------
3473
3474message SourceLocation {
Florian Mayer5716fc12019-06-24 11:50:51 -07003475 optional uint64 iid = 1;
Eric Secklerc73ef062019-02-25 12:30:35 +00003476
3477 // We intend to add a binary symbol version of this in the future.
3478 optional string file_name = 2;
3479 optional string function_name = 3;
Nicolò Mazzucato85940b72019-07-18 10:32:39 +01003480 optional uint32 line_number = 4;
Eric Secklerc73ef062019-02-25 12:30:35 +00003481}
3482
Nicolò Mazzucato85940b72019-07-18 10:32:39 +01003483// End of protos/perfetto/trace/track_event/source_location.proto
3484
3485// Begin of protos/perfetto/trace/track_event/task_execution.proto
3486
3487// TrackEvent arguments describing the execution of a task.
3488message TaskExecution {
3489 // Source location that the task was posted from.
3490 optional uint64 posted_from_iid = 1; // interned SourceLocation.
3491}
Eric Secklerc73ef062019-02-25 12:30:35 +00003492// End of protos/perfetto/trace/track_event/task_execution.proto
3493
3494// Begin of protos/perfetto/trace/track_event/thread_descriptor.proto
3495
3496// Periodically emitted data that's common to all events emitted by the same
3497// thread, i.e. all events in the same packet sequence. Valid for all subsequent
3498// events in the same sequence.
3499//
Eric Seckler1fe18c92019-05-30 10:27:54 +01003500// Next id: 9.
Eric Secklerc73ef062019-02-25 12:30:35 +00003501message ThreadDescriptor {
3502 optional int32 pid = 1;
3503 optional int32 tid = 2;
3504
3505 // To support old UI. New UI should determine default sorting by thread_type.
3506 optional int32 legacy_sort_index = 3;
3507
3508 enum ChromeThreadType {
Siddhartha Sd892f882019-06-03 11:48:42 -07003509 CHROME_THREAD_UNSPECIFIED = 0;
Siddhartha S1e2582a2019-05-31 14:08:07 -07003510
Siddhartha Sd892f882019-06-03 11:48:42 -07003511 CHROME_THREAD_MAIN = 1;
3512 CHROME_THREAD_IO = 2;
Siddhartha S1e2582a2019-05-31 14:08:07 -07003513
3514 // Scheduler:
Siddhartha Sd892f882019-06-03 11:48:42 -07003515 CHROME_THREAD_POOL_BG_WORKER = 3;
3516 CHROME_THREAD_POOL_FG_WORKER = 4;
3517 CHROME_THREAD_POOL_FB_BLOCKING = 5;
3518 CHROME_THREAD_POOL_BG_BLOCKING = 6;
3519 CHROME_THREAD_POOL_SERVICE = 7;
Siddhartha S1e2582a2019-05-31 14:08:07 -07003520
3521 // Compositor:
Siddhartha Sd892f882019-06-03 11:48:42 -07003522 CHROME_THREAD_COMPOSITOR = 8;
3523 CHROME_THREAD_VIZ_COMPOSITOR = 9;
3524 CHROME_THREAD_COMPOSITOR_WORKER = 10;
Siddhartha S1e2582a2019-05-31 14:08:07 -07003525
3526 // Renderer:
Siddhartha Sd892f882019-06-03 11:48:42 -07003527 CHROME_THREAD_SERVICE_WORKER = 11;
Siddhartha S1e2582a2019-05-31 14:08:07 -07003528
3529 // Tracing related threads:
Siddhartha Sd892f882019-06-03 11:48:42 -07003530 CHROME_THREAD_MEMORY_INFRA = 50;
3531 CHROME_THREAD_SAMPLING_PROFILER = 51;
Eric Secklerc73ef062019-02-25 12:30:35 +00003532 };
Eric Seckler14167852019-03-26 09:20:09 +00003533 optional ChromeThreadType chrome_thread_type = 4;
Eric Secklerc73ef062019-02-25 12:30:35 +00003534
3535 // TODO(eseckler): Replace this with ChromeThreadType where possible.
3536 optional string thread_name = 5;
3537
3538 // Absolute reference values. Clock values in subsequent TrackEvents can be
3539 // encoded accumulatively and relative to these. This reduces their var-int
3540 // encoding size.
3541 optional int64 reference_timestamp_us = 6;
3542 optional int64 reference_thread_time_us = 7;
Eric Seckler1fe18c92019-05-30 10:27:54 +01003543 optional int64 reference_thread_instruction_count = 8;
Eric Secklerc73ef062019-02-25 12:30:35 +00003544}
3545
3546// End of protos/perfetto/trace/track_event/thread_descriptor.proto
3547
3548// Begin of protos/perfetto/trace/track_event/track_event.proto
3549
3550// Trace events emitted by client instrumentation library (TRACE_EVENT macros),
3551// which describe activity on a track, such as a thread, task sequence, or
3552// asynchronous track.
3553//
3554// This message is optimized for writing and makes heavy use of data interning
3555// and delta encoding (e.g. of timestamps) to reduce data repetition and encoded
3556// data size.
3557//
3558// A TrackEvent exists in the context of its packet sequence (TracePackets
3559// emitted by the same producer + writer) and refers to data in preceding
3560// TracePackets emitted on the same sequence, both directly and indirectly. For
3561// example, interned data entries are emitted as part of a TracePacket and
3562// directly referred to from TrackEvents by their interning IDs. Attributes
3563// shared by all events on the same sequence (e.g. their thread and process
3564// association) are emitted as part of ProcessDescriptor and ThreadDescriptor
3565// messages in separate TracePackets instead.
3566//
Eric Seckler58fcbf12019-08-07 15:05:43 +01003567// Next reserved id: 10 (up to 15).
Nicolò Mazzucato85940b72019-07-18 10:32:39 +01003568// Next id: 22.
Eric Secklerc73ef062019-02-25 12:30:35 +00003569message TrackEvent {
3570 // Timestamp in microseconds (usually CLOCK_MONOTONIC).
3571 oneof timestamp {
3572 // Delta timestamp value since the last TrackEvent or ThreadDescriptor. To
3573 // calculate the absolute timestamp value, sum up all delta values of the
3574 // preceding TrackEvents since the last ThreadDescriptor and add the sum to
3575 // the |reference_timestamp| in ThreadDescriptor. This value should always
3576 // be positive.
3577 int64 timestamp_delta_us = 1;
3578 // Absolute value (e.g. a manually specified timestamp in the macro).
3579 // This is a one-off value that does not affect delta timestamp computation
3580 // in subsequent TrackEvents.
3581 int64 timestamp_absolute_us = 16;
3582 }
3583
3584 // CPU time for the current thread (e.g., CLOCK_THREAD_CPUTIME_ID) in
3585 // microseconds.
3586 oneof thread_time {
3587 // Same encoding as |timestamp| fields above.
3588 int64 thread_time_delta_us = 2;
3589 // TODO(eseckler): Consider removing absolute thread time support. It's
3590 // currently required to support writing PHASE_COMPLETE events out-of-order,
3591 // but shouldn't be required anymore when we split them into begin/end.
3592 int64 thread_time_absolute_us = 17;
3593 }
3594
Eric Seckler1fe18c92019-05-30 10:27:54 +01003595 // Value of the instruction counter for the current thread.
3596 oneof thread_instruction_count {
3597 // Same encoding as |timestamp| fields above.
3598 int64 thread_instruction_count_delta = 8;
3599 // TODO(eseckler): Consider removing absolute thread instruction count
3600 // support. It's currently required to support writing PHASE_COMPLETE events
3601 // out-of-order, but shouldn't be required anymore when we split them into
3602 // begin/end.
3603 int64 thread_instruction_count_absolute = 20;
3604 }
Andrew Comminos195e9352019-05-14 16:56:47 -07003605
Eric Seckler58fcbf12019-08-07 15:05:43 +01003606 // TODO(eseckler): Add a way to specify Tracks.
3607
Eric Secklerc73ef062019-02-25 12:30:35 +00003608 // We intend to add a binary symbol version of this in the future.
Florian Mayer5716fc12019-06-24 11:50:51 -07003609 repeated uint64 category_iids = 3; // interned EventCategoryName.
Eric Secklerc73ef062019-02-25 12:30:35 +00003610
3611 // TODO(eseckler): May also want a debug_name for untyped debug-only events.
3612
Eric Seckler58fcbf12019-08-07 15:05:43 +01003613 // Type of the TrackEvent (required if |phase| in LegacyEvent is not set).
3614 enum Type {
3615 TYPE_UNSPECIFIED = 0;
3616
3617 // Slice events are always formed by a pair of BEGIN + END events. END
3618 // events do not need to repeat any TrackEvent fields they have in common
3619 // with their corresponding BEGIN event. Arguments and debug annotations of
3620 // the BEGIN + END pair will be merged during trace import.
3621 //
3622 // Note that we deliberately chose not to support COMPLETE events since
3623 // clients would need to delay writing them until the slice is completed,
3624 // which can result in reordered events in the trace and loss of unfinished
3625 // events at the end of a trace.
3626 TYPE_SLICE_BEGIN = 1;
3627 TYPE_SLICE_END = 2;
3628
3629 // TODO(eseckler): Add support for counters.
3630 }
3631 optional Type type = 9;
3632
Eric Secklerc73ef062019-02-25 12:30:35 +00003633 // Unstable key/value annotations shown in the trace viewer but not intended
3634 // for metrics use.
3635 repeated DebugAnnotation debug_annotations = 4;
3636
3637 // Typed event arguments:
3638 optional TaskExecution task_execution = 5;
Nicolò Mazzucato85940b72019-07-18 10:32:39 +01003639 optional LogMessage log_message = 21;
3640
Eric Secklerc73ef062019-02-25 12:30:35 +00003641 // TODO(eseckler): New argument types go here :)
3642
3643 // Apart from {category, time, thread time, tid, pid}, other legacy trace
3644 // event attributes are initially simply proxied for conversion to a JSON
3645 // trace. We intend to gradually transition these attributes to similar native
3646 // features in TrackEvent (e.g. async + flow events), or deprecate them
3647 // without replacement where transition is unsuitable.
Eric Seckler59945762019-03-04 11:48:25 +00003648 //
Eric Seckler1fe18c92019-05-30 10:27:54 +01003649 // Next reserved id: 16 (up to 16).
Eric Seckler59945762019-03-04 11:48:25 +00003650 // Next id: 20.
Eric Secklerc73ef062019-02-25 12:30:35 +00003651 message LegacyEvent {
Florian Mayer5716fc12019-06-24 11:50:51 -07003652 optional uint64 name_iid = 1; // interned LegacyEventName.
Eric Secklerc73ef062019-02-25 12:30:35 +00003653 optional int32 phase = 2;
Eric Seckler7f2c5e42019-03-05 08:59:02 +00003654 optional int64 duration_us = 3;
3655 optional int64 thread_duration_us = 4;
Eric Seckler59945762019-03-04 11:48:25 +00003656
Eric Seckler1fe18c92019-05-30 10:27:54 +01003657 // Elapsed retired instruction count during the event.
3658 optional int64 thread_instruction_delta = 15;
3659
Eric Seckler7f2c5e42019-03-05 08:59:02 +00003660 reserved 5; // used to be |flags|.
Eric Seckler59945762019-03-04 11:48:25 +00003661
Eric Seckler7f2c5e42019-03-05 08:59:02 +00003662 oneof id {
3663 uint64 unscoped_id = 6;
3664 uint64 local_id = 10;
3665 uint64 global_id = 11;
3666 }
3667 // Additional optional scope for |id|.
3668 optional string id_scope = 7;
Eric Seckler59945762019-03-04 11:48:25 +00003669
3670 // Consider the thread timestamps for async BEGIN/END event pairs as valid.
3671 optional bool use_async_tts = 9;
3672
Eric Seckler7f2c5e42019-03-05 08:59:02 +00003673 // Idenfifies a flow. Flow events with the same bind_id are connected.
Eric Secklerc73ef062019-02-25 12:30:35 +00003674 optional uint64 bind_id = 8;
Eric Seckler7f2c5e42019-03-05 08:59:02 +00003675 // Use the enclosing slice as binding point for a flow end event instead of
3676 // the next slice. Flow start/step events always bind to the enclosing
3677 // slice.
Eric Seckler59945762019-03-04 11:48:25 +00003678 optional bool bind_to_enclosing = 12;
3679
3680 enum FlowDirection {
3681 FLOW_UNSPECIFIED = 0;
3682 FLOW_IN = 1;
3683 FLOW_OUT = 2;
3684 FLOW_INOUT = 3;
3685 }
3686 optional FlowDirection flow_direction = 13;
3687
3688 enum InstantEventScope {
3689 SCOPE_UNSPECIFIED = 0;
3690 SCOPE_GLOBAL = 1;
3691 SCOPE_PROCESS = 2;
3692 SCOPE_THREAD = 3;
3693 }
3694 optional InstantEventScope instant_event_scope = 14;
Eric Secklerc73ef062019-02-25 12:30:35 +00003695
3696 // Override the pid/tid if the writer needs to emit events on behalf of
3697 // another process/thread. This should be the exception. Normally, the
3698 // pid+tid from ThreadDescriptor is used.
3699 optional int32 pid_override = 18;
3700 optional int32 tid_override = 19;
3701 }
3702
3703 optional LegacyEvent legacy_event = 6;
3704}
3705
3706// --------------------
3707// Interned data types:
3708// --------------------
3709
3710message EventCategory {
Florian Mayer5716fc12019-06-24 11:50:51 -07003711 optional uint64 iid = 1;
Eric Secklerc73ef062019-02-25 12:30:35 +00003712 optional string name = 2;
3713}
3714
3715message LegacyEventName {
Florian Mayer5716fc12019-06-24 11:50:51 -07003716 optional uint64 iid = 1;
Eric Secklerc73ef062019-02-25 12:30:35 +00003717 optional string name = 2;
3718}
3719
3720// End of protos/perfetto/trace/track_event/track_event.proto
3721
Stephen Nusko70ea3302019-04-01 19:44:40 +01003722// Begin of protos/perfetto/trace/trigger.proto
3723
3724// When a TracingSession receives a trigger it records the boot time nanoseconds
3725// in the TracePacket's timestamp field as well as the name of the producer that
3726// triggered it. We emit this data so filtering can be done on triggers received
3727// in the trace.
3728message Trigger {
3729 // Name of the trigger which was received.
3730 optional string trigger_name = 1;
3731 // The actual producer that activated |trigger|.
3732 optional string producer_name = 2;
3733 // The verified UID of the producer.
3734 optional int32 trusted_producer_uid = 3;
3735}
3736
3737// End of protos/perfetto/trace/trigger.proto
3738
Ryan Savitski89bd9222019-06-13 14:39:30 +01003739// Begin of protos/perfetto/trace/gpu/gpu_counter_event.proto
3740
3741message GpuCounterEvent {
3742 // The first trace packet of each session should include counter_spec.
Florian Mayerb5751122019-07-02 14:07:03 +01003743 optional GpuCounterDescriptor counter_descriptor = 1;
Ryan Savitski89bd9222019-06-13 14:39:30 +01003744
3745 message GpuCounter {
3746 // required. Identifier for counter.
3747 optional uint32 counter_id = 1;
3748 // required. Value of the counter.
Florian Mayerb5751122019-07-02 14:07:03 +01003749 oneof value {
3750 int64 int_value = 2;
3751 double double_value = 3;
3752 }
Ryan Savitski89bd9222019-06-13 14:39:30 +01003753 }
3754 repeated GpuCounter counters = 2;
3755}
3756
3757// End of protos/perfetto/trace/gpu/gpu_counter_event.proto
3758
3759// Begin of protos/perfetto/trace/gpu/gpu_render_stage_event.proto
3760
3761message GpuRenderStageEvent {
3762 // required. Unique ID for the event.
3763 optional uint64 event_id = 1;
3764
Ryan Savitski89bd9222019-06-13 14:39:30 +01003765 // optional. Duration in GPU clock. If unset, this is a single time point
3766 // event.
Raymond Chiu449d2fd2019-07-10 15:57:57 -07003767 optional uint64 duration = 2;
Ryan Savitski89bd9222019-06-13 14:39:30 +01003768
3769 // required. ID to a hardware queue description in the specifications.
Raymond Chiu449d2fd2019-07-10 15:57:57 -07003770 optional int32 hw_queue_id = 3;
Ryan Savitski89bd9222019-06-13 14:39:30 +01003771
3772 // required. ID to a render stage description in the specifications.
Raymond Chiu449d2fd2019-07-10 15:57:57 -07003773 optional int32 stage_id = 4;
Ryan Savitski89bd9222019-06-13 14:39:30 +01003774
3775 // required. GL context/VK device.
Raymond Chiu449d2fd2019-07-10 15:57:57 -07003776 optional uint64 context = 5;
Ryan Savitski89bd9222019-06-13 14:39:30 +01003777
3778 // optional. Additional data for the user. This may include attribs for
3779 // the event like resource ids, shaders etc
3780 message ExtraData {
3781 optional string name = 1;
3782 optional string value = 2;
3783 }
Raymond Chiu449d2fd2019-07-10 15:57:57 -07003784 repeated ExtraData extra_data = 6;
Ryan Savitski89bd9222019-06-13 14:39:30 +01003785
3786 // The first trace packet of each session should include a Specifications
3787 // to enumerate all IDs that will be used.
3788 message Specifications {
3789 message ContextSpec {
3790 optional uint64 context = 1;
3791 optional int32 pid = 2;
3792 }
3793 optional ContextSpec context_spec = 1;
3794
3795 message Description {
Raymond Chiu449d2fd2019-07-10 15:57:57 -07003796 optional string name = 1;
3797 optional string description = 2;
Ryan Savitski89bd9222019-06-13 14:39:30 +01003798 }
3799
3800 // Labels to categorize the hw Queue this event goes on
3801 repeated Description hw_queue = 2;
3802
3803 // Labels to categorize render stage(binning, render, compute etc)
3804 repeated Description stage = 3;
3805 }
Raymond Chiu449d2fd2019-07-10 15:57:57 -07003806 optional Specifications specifications = 7;
Ryan Savitski89bd9222019-06-13 14:39:30 +01003807
3808 // Extension for vendor's custom proto.
Raymond Chiu449d2fd2019-07-10 15:57:57 -07003809 extensions 100;
Ryan Savitski89bd9222019-06-13 14:39:30 +01003810}
3811
3812// End of protos/perfetto/trace/gpu/gpu_render_stage_event.proto
3813
Florian Mayerb5751122019-07-02 14:07:03 +01003814// Begin of protos/perfetto/common/gpu_counter_descriptor.proto
3815
3816// Description of GPU counters.
3817// This message is sent by a GPU counter producer to specify the counters available in the hardware.
3818message GpuCounterDescriptor {
3819 message GpuCounterSpec {
3820 optional uint32 counter_id = 1;
3821 optional string name = 2;
3822 optional string description = 3;
Raymond Chiuee6188d2019-07-11 14:34:46 -07003823 optional MeasureUnit unit = 4;
3824 oneof peak_value {
3825 int64 int_peak_value = 5;
3826 double double_peak_value = 6;
3827 };
Florian Mayerb5751122019-07-02 14:07:03 +01003828 }
3829 repeated GpuCounterSpec specs = 1;
Raymond Chiuee6188d2019-07-11 14:34:46 -07003830
Isabelle Taylorf26b8ce2019-07-30 14:26:38 +01003831 // Taken from
3832 // https://developer.android.com/reference/android/icu/util/MeasureUnit
Raymond Chiuee6188d2019-07-11 14:34:46 -07003833 enum MeasureUnit {
3834 ACRE = 0;
3835 ACRE_FOOT = 1;
3836 AMPERE = 2;
3837 ARC_MINUTE = 3;
3838 ARC_SECOND = 4;
3839 ASTRONOMICAL_UNIT = 5;
3840 BIT = 6;
3841 BUSHEL = 7;
3842 BYTE = 8;
3843 CALORIE = 9;
3844 CARAT = 10;
3845 CELSIUS = 11;
3846 CENTILITER = 12;
3847 CENTIMETER = 13;
3848 CENTURY = 14;
3849 CUBIC_CENTIMETER = 15;
3850 CUBIC_FOOT = 16;
3851 CUBIC_INCH = 17;
3852 CUBIC_KILOMETER = 18;
3853 CUBIC_METER = 19;
3854 CUBIC_MILE = 20;
3855 CUBIC_YARD = 21;
3856 CUP = 22;
3857 CUP_METRIC = 23;
3858 DAY = 24;
3859 DECILITER = 25;
3860 DECIMETER = 26;
3861 DEGREE = 27;
3862 FAHRENHEIT = 28;
3863 FATHOM = 29;
3864 FLUID_OUNCE = 30;
3865 FOODCALORIE = 31;
3866 FOOT = 32;
3867 FURLONG = 33;
3868 GALLON = 34;
3869 GALLON_IMPERIAL = 35;
3870 GENERIC_TEMPERATURE = 36;
3871 GIGABIT = 37;
3872 GIGABYTE = 38;
3873 GIGAHERTZ = 39;
3874 GIGAWATT = 40;
3875 GRAM = 41;
3876 G_FORCE = 42;
3877 HECTARE = 43;
3878 HECTOLITER = 44;
3879 HECTOPASCAL = 45;
3880 HERTZ = 46;
3881 HORSEPOWER = 47;
3882 HOUR = 48;
3883 INCH = 49;
3884 INCH_HG = 50;
3885 JOULE = 51;
3886 KARAT = 52;
3887 KELVIN = 53;
3888 KILOBIT = 54;
3889 KILOBYTE = 55;
3890 KILOCALORIE = 56;
3891 KILOGRAM = 57;
3892 KILOHERTZ = 58;
3893 KILOJOULE = 59;
3894 KILOMETER = 60;
3895 KILOMETER_PER_HOUR = 61;
3896 KILOWATT = 62;
3897 KILOWATT_HOUR = 63;
3898 KNOT = 64;
3899 LIGHT_YEAR = 65;
3900 LITER = 66;
3901 LITER_PER_100KILOMETERS = 67;
3902 LITER_PER_KILOMETER = 68;
3903 LUX = 69;
3904 MEGABIT = 70;
3905 MEGABYTE = 71;
3906 MEGAHERTZ = 72;
3907 MEGALITER = 73;
3908 MEGAWATT = 74;
3909 METER = 75;
3910 METER_PER_SECOND = 76;
3911 METER_PER_SECOND_SQUARED = 77;
3912 METRIC_TON = 78;
3913 MICROGRAM = 79;
3914 MICROMETER = 80;
3915 MICROSECOND = 81;
3916 MILE = 82;
3917 MILE_PER_GALLON = 83;
3918 MILE_PER_GALLON_IMPERIAL = 84;
3919 MILE_PER_HOUR = 85;
3920 MILE_SCANDINAVIAN = 86;
3921 MILLIAMPERE = 87;
3922 MILLIBAR = 88;
3923 MILLIGRAM = 89;
3924 MILLIGRAM_PER_DECILITER = 90;
3925 MILLILITER = 91;
3926 MILLIMETER = 92;
3927 MILLIMETER_OF_MERCURY = 93;
3928 MILLIMOLE_PER_LITER = 94;
3929 MILLISECOND = 95;
3930 MILLIWATT = 96;
3931 MINUTE = 97;
3932 MONTH = 98;
3933 NANOMETER = 99;
3934 NANOSECOND = 100;
3935 NAUTICAL_MILE = 101;
3936 OHM = 102;
3937 OUNCE = 103;
3938 OUNCE_TROY = 104;
3939 PARSEC = 105;
3940 PART_PER_MILLION = 106;
3941 PICOMETER = 107;
3942 PINT = 108;
3943 PINT_METRIC = 109;
3944 POINT = 110;
3945 POUND = 111;
3946 POUND_PER_SQUARE_INCH = 112;
3947 QUART = 113;
3948 RADIAN = 114;
3949 REVOLUTION_ANGLE = 115;
3950 SECOND = 116;
3951 SQUARE_CENTIMETER = 117;
3952 SQUARE_FOOT = 118;
3953 SQUARE_INCH = 119;
3954 SQUARE_KILOMETER = 120;
3955 SQUARE_METER = 121;
3956 SQUARE_MILE = 122;
3957 SQUARE_YARD = 123;
3958 STONE = 124;
3959 TABLESPOON = 125;
3960 TEASPOON = 126;
3961 TERABIT = 127;
3962 TERABYTE = 128;
3963 TON = 129;
3964 VOLT = 130;
3965 WATT = 131;
3966 WEEK = 132;
3967 YARD = 133;
3968 YEAR = 134;
3969 };
Florian Mayerb5751122019-07-02 14:07:03 +01003970}
3971
3972// End of protos/perfetto/common/gpu_counter_descriptor.proto
3973
Isabelle Taylor80ec5f72019-02-27 11:27:41 +00003974// Begin of protos/perfetto/config/android/android_log_config.proto
3975
3976message AndroidLogConfig {
3977 repeated AndroidLogId log_ids = 1;
3978
3979 reserved 2; // Was |poll_ms|, deprecated.
3980
3981 // If set ignores all log messages whose prio is < the given value.
3982 optional AndroidLogPriority min_prio = 3;
3983
3984 // If non-empty ignores all log messages whose tag doesn't match one of the
3985 // specified values.
3986 repeated string filter_tags = 4;
3987}
3988
3989// End of protos/perfetto/config/android/android_log_config.proto
3990
3991// Begin of protos/perfetto/config/chrome/chrome_config.proto
3992
3993// When editing this file run ./tools/gen_tracing_cpp_headers_from_protos.py
3994// to reflect changes in the corresponding C++ headers.
3995
3996message ChromeConfig {
3997 optional string trace_config = 1;
Siddhartha S305a5012019-03-29 09:33:00 -07003998
3999 // When enabled, the data source should only fill in fields in the output that
4000 // are not potentially privacy sensitive.
4001 optional bool privacy_filtering_enabled = 2;
Isabelle Taylor80ec5f72019-02-27 11:27:41 +00004002}
4003
4004// End of protos/perfetto/config/chrome/chrome_config.proto
4005
4006// Begin of protos/perfetto/config/data_source_config.proto
4007
4008// When editing this file run ./tools/gen_tracing_cpp_headers_from_protos.py
4009// to reflect changes in the corresponding C++ headers.
4010
4011// The configuration that is passed to each data source when starting tracing.
4012message DataSourceConfig {
4013 // Data source unique name, e.g., "linux.ftrace". This must match
4014 // the name passed by the data source when it registers (see
4015 // RegisterDataSource()).
4016 optional string name = 1;
4017
4018 // The index of the logging buffer where TracePacket(s) will be stored.
4019 // This field doesn't make a major difference for the Producer(s). The final
4020 // logging buffers, in fact, are completely owned by the Service. We just ask
4021 // the Producer to copy this number into the chunk headers it emits, so that
4022 // the Service can quickly identify the buffer where to move the chunks into
4023 // without expensive lookups on its fastpath.
4024 optional uint32 target_buffer = 2;
4025
4026 // Set by the service to indicate the duration of the trace.
4027 // DO NOT SET in consumer as this will be overridden by the service.
4028 optional uint32 trace_duration_ms = 3;
4029
Florian Mayer6e45e9a2019-07-25 14:18:24 +01004030 // Set by the service to indicate how long it waits after StopDataSource.
4031 // DO NOT SET in consumer as this will be overridden by the service.
4032 optional uint32 stop_timeout_ms = 7;
4033
Florian Mayerfb879982019-03-29 10:45:32 +00004034 // Set by the service to indicate whether this tracing session has extra
4035 // guardrails.
4036 // DO NOT SET in consumer as this will be overridden by the service.
4037 optional bool enable_extra_guardrails = 6;
4038
Isabelle Taylor80ec5f72019-02-27 11:27:41 +00004039 // Set by the service to indicate which tracing session the data source
4040 // belongs to. The intended use case for this is checking if two data sources,
4041 // one of which produces metadata for the other one, belong to the same trace
4042 // session and hence should be linked together.
4043 // This field was introduced in Aug 2018 after Android P.
4044 optional uint64 tracing_session_id = 4;
4045
4046 // Keeep the lower IDs (up to 99) for fields that are *not* specific to
4047 // data-sources and needs to be processed by the traced daemon.
4048
Primiano Tucci0f2f3b42019-05-21 19:37:01 +01004049 // All data source config fields must be marked as [lazy=true]. This prevents
4050 // the proto-to-cpp generator from recursing into those when generating the
4051 // cpp classes and polluting tracing/core with data-source-specific classes.
4052 // Instead they are treated as opaque strings containing raw proto bytes.
4053
4054 optional FtraceConfig ftrace_config = 100 [lazy = true];
4055 optional InodeFileConfig inode_file_config = 102 [lazy = true];
4056 optional ProcessStatsConfig process_stats_config = 103 [lazy = true];
4057 optional SysStatsConfig sys_stats_config = 104 [lazy = true];
4058 optional HeapprofdConfig heapprofd_config = 105 [lazy = true];
4059 optional AndroidPowerConfig android_power_config = 106 [lazy = true];
4060 optional AndroidLogConfig android_log_config = 107 [lazy = true];
Ryan Savitski89bd9222019-06-13 14:39:30 +01004061 optional GpuCounterConfig gpu_counter_config = 108 [lazy = true];
Ryan Savitskifde4ae62019-06-14 16:02:52 +01004062 optional PackagesListConfig packages_list_config = 109 [lazy = true];
Primiano Tucci0f2f3b42019-05-21 19:37:01 +01004063
Primiano Tucci0f9e0222019-06-05 09:36:41 +01004064 // Chrome is special as it doesn't use the perfetto IPC layer. We want to
4065 // avoid proto serialization and de-serialization there because that would
4066 // just add extra hops on top of the Mojo ser/des. Instead we auto-generate a
4067 // C++ class for it so it can pass around plain C++ objets.
Isabelle Taylor80ec5f72019-02-27 11:27:41 +00004068 optional ChromeConfig chrome_config = 101;
Isabelle Taylor80ec5f72019-02-27 11:27:41 +00004069
4070 // This is a fallback mechanism to send a free-form text config to the
4071 // producer. In theory this should never be needed. All the code that
4072 // is part of the platform (i.e. traced service) is supposed to *not* truncate
4073 // the trace config proto and propagate unknown fields. However, if anything
4074 // in the pipeline (client or backend) ends up breaking this forward compat
4075 // plan, this field will become the escape hatch to allow future data sources
4076 // to get some meaningful configuration.
4077 optional string legacy_config = 1000;
4078
4079 // This field is only used for testing.
Primiano Tucci0f9e0222019-06-05 09:36:41 +01004080 optional TestConfig for_testing = 1001;
4081
4082 reserved 268435455; // Was |for_testing|. Caused more problems then found.
Isabelle Taylor80ec5f72019-02-27 11:27:41 +00004083}
4084
4085// End of protos/perfetto/config/data_source_config.proto
4086
4087// Begin of protos/perfetto/config/ftrace/ftrace_config.proto
4088
4089// When editing this file run ./tools/gen_tracing_cpp_headers_from_protos.py
4090// to reflect changes in the corresponding C++ headers.
4091
4092message FtraceConfig {
4093 repeated string ftrace_events = 1;
4094 repeated string atrace_categories = 2;
4095 repeated string atrace_apps = 3;
4096 // *Per-CPU* buffer size.
4097 optional uint32 buffer_size_kb = 10;
4098 optional uint32 drain_period_ms = 11;
4099}
4100
4101// End of protos/perfetto/config/ftrace/ftrace_config.proto
4102
4103// Begin of protos/perfetto/config/inode_file/inode_file_config.proto
4104
4105// When editing this file run ./tools/gen_tracing_cpp_headers_from_protos.py
4106// to reflect changes in the corresponding C++ headers.
4107
4108message InodeFileConfig {
4109 message MountPointMappingEntry {
4110 optional string mountpoint = 1;
4111 repeated string scan_roots = 2;
4112 }
4113
4114 // How long to pause between batches.
4115 optional uint32 scan_interval_ms = 1;
4116
4117 // How long to wait before the first scan in order to accumulate inodes.
4118 optional uint32 scan_delay_ms = 2;
4119
4120 // How many inodes to scan in one batch.
4121 optional uint32 scan_batch_size = 3;
4122
4123 // Do not scan for inodes not found in the static map.
4124 optional bool do_not_scan = 4;
4125
4126 // If non-empty, only scan inodes corresponding to block devices named in
4127 // this list.
4128 repeated string scan_mount_points = 5;
4129
4130 // When encountering an inode belonging to a block device corresponding
4131 // to one of the mount points in this map, scan its scan_roots instead.
4132 repeated MountPointMappingEntry mount_point_mapping = 6;
4133}
4134
4135// End of protos/perfetto/config/inode_file/inode_file_config.proto
4136
4137// Begin of protos/perfetto/config/power/android_power_config.proto
4138
4139message AndroidPowerConfig {
4140 enum BatteryCounters {
4141 BATTERY_COUNTER_UNSPECIFIED = 0;
4142 BATTERY_COUNTER_CHARGE = 1; // Coulomb counter.
4143 BATTERY_COUNTER_CAPACITY_PERCENT = 2; // Charge (%).
4144 BATTERY_COUNTER_CURRENT = 3; // Instantaneous current.
4145 BATTERY_COUNTER_CURRENT_AVG = 4; // Avg current.
4146 }
4147 optional uint32 battery_poll_ms = 1;
4148 repeated BatteryCounters battery_counters = 2;
4149
4150 // Where available enables per-power-rail measurements.
4151 optional bool collect_power_rails = 3;
4152}
4153
4154// End of protos/perfetto/config/power/android_power_config.proto
4155
4156// Begin of protos/perfetto/config/process_stats/process_stats_config.proto
4157
4158// When editing this file run ./tools/gen_tracing_cpp_headers_from_protos.py
4159// to reflect changes in the corresponding C++ headers.
4160
4161message ProcessStatsConfig {
4162 enum Quirks {
4163 QUIRKS_UNSPECIFIED = 0;
4164
4165 // This has been deprecated and ignored as per 2018-05-01. Full scan at
4166 // startup is now disabled by default and can be re-enabled using the
4167 // |scan_all_processes_on_start| arg.
4168 DISABLE_INITIAL_DUMP = 1 [deprecated = true];
4169
4170 DISABLE_ON_DEMAND = 2;
4171 }
4172
4173 repeated Quirks quirks = 1;
4174
4175 // If enabled all processes will be scanned and dumped when the trace starts.
4176 optional bool scan_all_processes_on_start = 2;
4177
4178 // If enabled thread names are also recoded (this is redundant if sched_switch
4179 // is enabled).
4180 optional bool record_thread_names = 3;
4181
4182 // If > 0 samples counters (see process_stats.proto) from
4183 // /proc/pid/status and oom_score_adj every X ms.
4184 // This is required to be > 100ms to avoid excessive CPU usage.
4185 // TODO(primiano): add CPU cost for change this value.
4186 optional uint32 proc_stats_poll_ms = 4;
4187
4188 // If empty samples stats for all processes. If non empty samples stats only
4189 // for processes matching the given string in their argv0 (i.e. the first
4190 // entry of /proc/pid/cmdline).
4191 // TODO(primiano): implement this feature.
4192 // repeated string proc_stats_filter = 5;
Lalit Maganti999355c2019-03-27 18:17:08 +00004193
4194 // This is required to be either = 0 or a multiple of |proc_stats_poll_ms|
4195 // (default: |proc_stats_poll_ms|). If = 0, will be set to
4196 // |proc_stats_poll_ms|. Non-multiples will be rounded down to the nearest
4197 // multiple.
4198 optional uint32 proc_stats_cache_ttl_ms = 6;
Isabelle Taylor80ec5f72019-02-27 11:27:41 +00004199}
4200
4201// End of protos/perfetto/config/process_stats/process_stats_config.proto
4202
4203// Begin of protos/perfetto/config/sys_stats/sys_stats_config.proto
4204
4205// When editing this file run ./tools/gen_tracing_cpp_headers_from_protos.py
4206// to reflect changes in the corresponding C++ headers.
4207
4208// This file defines the configuration for the Linux /proc poller data source,
4209// which injects counters in the trace.
4210// Counters that are needed in the trace must be explicitly listed in the
4211// *_counters fields. This is to avoid spamming the trace with all counters
4212// at all times.
4213// The sampling rate is configurable. All polling rates (*_period_ms) need
4214// to be integer multiples of each other.
4215// OK: [10ms, 10ms, 10ms], [10ms, 20ms, 10ms], [10ms, 20ms, 60ms]
4216// Not OK: [10ms, 10ms, 11ms], [10ms, 15ms, 20ms]
4217message SysStatsConfig {
4218 // Polls /proc/meminfo every X ms, if non-zero.
4219 // This is required to be > 10ms to avoid excessive CPU usage.
4220 // Cost: 0.3 ms [read] + 0.07 ms [parse + trace injection]
4221 optional uint32 meminfo_period_ms = 1;
4222
Primiano Tucci1eb966d2019-06-06 15:40:09 +01004223 // If empty all known counters are reported. Otherwise, only the counters
4224 // specified below are reported.
Isabelle Taylor80ec5f72019-02-27 11:27:41 +00004225 repeated MeminfoCounters meminfo_counters = 2;
4226
4227 // Polls /proc/vmstat every X ms, if non-zero.
4228 // This is required to be > 10ms to avoid excessive CPU usage.
4229 // Cost: 0.2 ms [read] + 0.3 ms [parse + trace injection]
4230 optional uint32 vmstat_period_ms = 3;
4231 repeated VmstatCounters vmstat_counters = 4;
4232
4233 // Pols /proc/stat every X ms, if non-zero.
4234 // This is required to be > 10ms to avoid excessive CPU usage.
4235 // Cost: 4.1 ms [read] + 1.9 ms [parse + trace injection]
4236 optional uint32 stat_period_ms = 5;
4237 enum StatCounters {
4238 STAT_UNSPECIFIED = 0;
4239 STAT_CPU_TIMES = 1;
4240 STAT_IRQ_COUNTS = 2;
4241 STAT_SOFTIRQ_COUNTS = 3;
4242 STAT_FORK_COUNT = 4;
4243 }
4244 repeated StatCounters stat_counters = 6;
4245}
4246
4247// End of protos/perfetto/config/sys_stats/sys_stats_config.proto
4248
4249// Begin of protos/perfetto/config/test_config.proto
4250
4251// When editing this file run ./tools/gen_tracing_cpp_headers_from_protos.py
4252// to reflect changes in the corresponding C++ headers.
4253
4254// The configuration for a fake producer used in tests.
4255message TestConfig {
4256 message DummyFields {
4257 optional uint32 field_uint32 = 1;
4258 optional int32 field_int32 = 2;
4259 optional uint64 field_uint64 = 3;
4260 optional int64 field_int64 = 4;
4261 optional fixed64 field_fixed64 = 5;
4262 optional sfixed64 field_sfixed64 = 6;
4263 optional fixed32 field_fixed32 = 7;
4264 optional sfixed32 field_sfixed32 = 8;
4265 optional double field_double = 9;
4266 optional float field_float = 10;
4267 optional sint64 field_sint64 = 11;
4268 optional sint32 field_sint32 = 12;
4269 optional string field_string = 13;
4270 optional bytes field_bytes = 14;
4271 }
4272
4273 // The number of messages the fake producer should send.
4274 optional uint32 message_count = 1;
4275
4276 // The maximum number of messages which should be sent each second.
4277 // The actual obserced speed may be lower if the producer is unable to
4278 // work fast enough.
4279 // If this is zero or unset, the producer will send as fast as possible.
4280 optional uint32 max_messages_per_second = 2;
4281
4282 // The seed value for a simple multiplicative congruential pseudo-random
4283 // number sequence.
4284 optional uint32 seed = 3;
4285
4286 // The size of each message in bytes. Should be greater than or equal 5 to
4287 // account for the number of bytes needed to encode the random number and a
4288 // null byte for the string.
4289 optional uint32 message_size = 4;
4290
4291 // Whether the producer should send a event batch when the data source is
4292 // is initially registered.
4293 optional bool send_batch_on_register = 5;
4294
4295 optional DummyFields dummy_fields = 6;
4296}
4297
4298// End of protos/perfetto/config/test_config.proto
4299
4300// Begin of protos/perfetto/config/trace_config.proto
4301
Ryan Savitski0b4008a2019-05-13 17:55:53 +01004302// When editing this file run ./tools/gen_tracing_cpp_headers_from_protos
Isabelle Taylor80ec5f72019-02-27 11:27:41 +00004303// to reflect changes in the corresponding C++ headers.
4304
4305// The overall config that is used when starting a new tracing session through
4306// ProducerPort::StartTracing().
4307// It contains the general config for the logging buffer(s) and the configs for
4308// all the data source being enabled.
4309//
Hector Dearman2bdd2be2019-08-07 14:50:37 +01004310// Next id: 27.
Isabelle Taylor80ec5f72019-02-27 11:27:41 +00004311message TraceConfig {
4312 message BufferConfig {
4313 optional uint32 size_kb = 1;
4314
4315 reserved 2; // |page_size|, now deprecated.
4316 reserved 3; // |optimize_for|, now deprecated.
4317
4318 enum FillPolicy {
4319 UNSPECIFIED = 0;
4320
4321 // Default behavior. The buffer operates as a conventional ring buffer.
4322 // If the writer is faster than the reader (or if the reader reads only
4323 // after tracing is stopped) newly written packets will overwrite old
4324 // packets.
4325 RING_BUFFER = 1;
4326
4327 // Behaves like RING_BUFFER as long as there is space in the buffer or
4328 // the reader catches up with the writer. As soon as the writer hits
4329 // an unread chunk, it stops accepting new data in the buffer.
4330 DISCARD = 2;
4331 }
4332 optional FillPolicy fill_policy = 4;
4333 }
4334 repeated BufferConfig buffers = 1;
4335
4336 message DataSource {
4337 // Filters and data-source specific config. It contains also the unique name
4338 // of the data source, the one passed in the DataSourceDescriptor when they
4339 // register on the service.
4340 optional protos.DataSourceConfig config = 1;
4341
4342 // Optional. If multiple producers (~processes) expose the same data source
4343 // and |producer_name_filter| != "", the data source is enabled only for
4344 // producers whose names match any of the producer_name_filter below.
4345 // The |producer_name_filter| has to be an exact match. (TODO(primiano):
4346 // support wildcards or regex).
4347 // This allows to enable a data source only for specific processes.
4348 // The "repeated" field has OR sematics: specifying a filter ["foo", "bar"]
4349 // will enable data source on both "foo" and "bar" (if existent).
4350 repeated string producer_name_filter = 2;
4351 }
4352 repeated DataSource data_sources = 2;
4353
Siddhartha Sb63f61e2019-05-03 16:19:51 -07004354 // Config for builtin trace packets emitted by perfetto like trace stats,
4355 // system info, etc.
4356 message BuiltinDataSource {
4357 // Disable emitting clock timestamps into the trace.
4358 optional bool disable_clock_snapshotting = 1;
4359
4360 optional bool disable_trace_config = 2;
4361
4362 optional bool disable_system_info = 3;
4363 }
4364 optional BuiltinDataSource builtin_data_sources = 20;
4365
Stephen Nuskof53f8ed2019-03-20 14:51:10 +00004366 // If specified, the trace will be stopped |duration_ms| after starting.
4367 // However in case of traces with triggers, see
4368 // TriggerConfig.trigger_timeout_ms instead.
Isabelle Taylor80ec5f72019-02-27 11:27:41 +00004369 optional uint32 duration_ms = 3;
4370
4371 // This is set when --dropbox is passed to the Perfetto command line client
4372 // and enables guardrails that limit resource usage for traces requested
4373 // by statsd.
4374 optional bool enable_extra_guardrails = 4;
4375
4376 enum LockdownModeOperation {
4377 LOCKDOWN_UNCHANGED = 0;
4378 LOCKDOWN_CLEAR = 1;
4379 LOCKDOWN_SET = 2;
4380 }
4381 // Reject producers that are not running under the same UID as the tracing
4382 // service.
4383 optional LockdownModeOperation lockdown_mode = 5;
4384
4385 message ProducerConfig {
4386 // Identifies the producer for which this config is for.
4387 optional string producer_name = 1;
4388
4389 // Specifies the preferred size of the shared memory buffer. If the size is
4390 // larger than the max size, the max will be used. If it is smaller than
4391 // the page size or doesn't fit pages evenly into it, it will fall back to
4392 // the size specified by the producer or finally the default shared memory
4393 // size.
4394 optional uint32 shm_size_kb = 2;
4395
4396 // Specifies the preferred size of each page in the shared memory buffer.
4397 // Must be an integer multiple of 4K.
4398 optional uint32 page_size_kb = 3;
4399 }
4400
4401 repeated ProducerConfig producers = 6;
4402
4403 // Contains statsd-specific metadata about an alert associated with the trace.
4404 message StatsdMetadata {
4405 // The identifier of the alert which triggered this trace.
4406 optional int64 triggering_alert_id = 1;
4407 // The uid which registered the triggering configuration with statsd.
4408 optional int32 triggering_config_uid = 2;
4409 // The identifier of the config which triggered the alert.
4410 optional int64 triggering_config_id = 3;
4411 // The identifier of the subscription which triggered this trace.
4412 optional int64 triggering_subscription_id = 4;
4413 }
4414
4415 // Statsd-specific metadata.
4416 optional StatsdMetadata statsd_metadata = 7;
4417
4418 // When true, the EnableTracing() request must also provide a file descriptor.
4419 // The service will then periodically read packets out of the trace buffer and
4420 // store it into the passed file.
4421 optional bool write_into_file = 8;
4422
4423 // Optional. If non-zero tunes the write period. A min value of 100ms is
4424 // enforced (i.e. smaller values are ignored).
4425 optional uint32 file_write_period_ms = 9;
4426
4427 // Optional. When non zero the periodic write stops once at most X bytes
4428 // have been written into the file. Tracing is disabled when this limit is
4429 // reached, even if |duration_ms| has not been reached yet.
4430 optional uint64 max_file_size_bytes = 10;
4431
4432 // Contains flags which override the default values of the guardrails inside
4433 // Perfetto. These values are only affect userdebug builds.
4434 message GuardrailOverrides {
4435 // Override the default limit (in bytes) for uploading data to server within
4436 // a 24 hour period.
4437 optional uint64 max_upload_per_day_bytes = 1;
4438 }
4439
4440 optional GuardrailOverrides guardrail_overrides = 11;
4441
4442 // When true, data sources are not started until an explicit call to
4443 // StartTracing() on the consumer port. This is to support early
4444 // initialization and fast trace triggering. This can be used only when the
4445 // Consumer explicitly triggers the StartTracing() method.
4446 // This should not be used in a remote trace config via statsd, doing so will
4447 // result in a hung trace session.
4448 optional bool deferred_start = 12;
4449
4450 // When set, it periodically issues a Flush() to all data source, forcing them
4451 // to commit their data into the tracing service. This can be used for
4452 // quasi-real-time streaming mode and to guarantee some partial ordering of
4453 // events in the trace in windows of X ms.
4454 optional uint32 flush_period_ms = 13;
4455
4456 // Wait for this long for producers to acknowledge flush requests.
4457 // Default 5s.
4458 optional uint32 flush_timeout_ms = 14;
4459
Florian Mayer990e6d72019-06-03 11:34:52 +01004460 // Wait for this long for producers to acknowledge stop requests.
4461 // Default 5s.
4462 optional uint32 data_source_stop_timeout_ms = 23;
4463
Siddhartha Sb63f61e2019-05-03 16:19:51 -07004464 reserved 15; // |disable_clock_snapshotting| moved.
Isabelle Taylor80ec5f72019-02-27 11:27:41 +00004465
4466 // Android-only. If set, sends an intent to the Traceur system app when the
4467 // trace ends to notify it about the trace readiness.
4468 optional bool notify_traceur = 16;
Stephen Nuskof53f8ed2019-03-20 14:51:10 +00004469
4470 // Triggers allow producers to start or stop the tracing session when an event
4471 // occurs.
4472 //
4473 // For example if we are tracing probabilistically, most traces will be
4474 // uninteresting. Triggers allow us to keep only the interesting ones such as
4475 // those traces during which the device temperature reached a certain
4476 // threshold. In this case the producer can activate a trigger to keep
4477 // (STOP_TRACING) the trace, otherwise it can also begin a trace
4478 // (START_TRACING) because it knows something is about to happen.
4479 message TriggerConfig {
4480 enum TriggerMode {
4481 UNSPECIFIED = 0;
4482
4483 // When this mode is chosen, data sources are not started until one of the
4484 // |triggers| are received. This supports early initialization and fast
4485 // starting of the tracing system. On triggering, the session will then
4486 // record for |stop_delay_ms|. However if no trigger is seen
4487 // after |trigger_timeout_ms| the session will be stopped and no data will
4488 // be returned.
4489 START_TRACING = 1;
4490
4491 // When this mode is chosen, the session will be started via the normal
4492 // EnableTracing() & StartTracing(). If no trigger is ever seen
4493 // the session will be stopped after |trigger_timeout_ms| and no data will
4494 // be returned. However if triggered the trace will stop after
4495 // |stop_delay_ms| and any data in the buffer will be returned to the
4496 // consumer.
4497 STOP_TRACING = 2;
4498 }
4499 optional TriggerMode trigger_mode = 1;
4500
4501 message Trigger {
4502 // The producer must specify this name to activate the trigger.
4503 optional string name = 1;
4504
4505 // The a std::regex that will match the producer that can activate this
4506 // trigger. This is optional. If unset any producers can activate this
4507 // trigger.
4508 optional string producer_name_regex = 2;
4509
4510 // After a trigger is received either in START_TRACING or STOP_TRACING
4511 // mode then the trace will end |stop_delay_ms| after triggering.
4512 optional uint32 stop_delay_ms = 3;
4513 }
4514 // A list of triggers which are related to this configuration. If ANY
4515 // trigger is seen then an action will be performed based on |trigger_mode|.
4516 repeated Trigger triggers = 2;
4517
4518 // Required and must be positive if a TriggerConfig is specified. This is
4519 // how long this TraceConfig should wait for a trigger to arrive. After this
4520 // period of time if no trigger is seen the TracingSession will be cleaned
4521 // up.
4522 optional uint32 trigger_timeout_ms = 3;
4523 }
4524 optional TriggerConfig trigger_config = 17;
Stephen Nusko9fa59cb2019-04-15 04:19:16 +01004525
4526 // When this is non-empty the perfetto command line tool will ignore the rest
4527 // of this TraceConfig and instead connect to the perfetto service as a
4528 // producer and send these triggers, potentially stopping or starting traces
4529 // that were previous configured to use a TriggerConfig.
4530 repeated string activate_triggers = 18;
Hector Dearman085dc3c2019-04-23 11:48:10 +01004531
Ryan Savitskiac6e0d42019-05-10 15:59:56 +01004532 // Configuration for trace contents that reference earlier trace data. For
4533 // example, a data source might intern strings, and emit packets containing
4534 // {interned id : string} pairs. Future packets from that data source can then
4535 // use the interned ids instead of duplicating the raw string contents. The
4536 // trace parser will then need to use that interning table to fully interpret
4537 // the rest of the trace.
4538 message IncrementalStateConfig {
Ryan Savitski0b4008a2019-05-13 17:55:53 +01004539 // If nonzero, notify eligible data sources to clear their incremental state
4540 // periodically, with the given period. The notification is sent only to
4541 // data sources that have |handles_incremental_state_clear| set in their
4542 // DataSourceDescriptor. The notification requests that the data source
4543 // stops referring to past trace contents. This is particularly useful when
4544 // tracing in ring buffer mode, where it is not exceptional to overwrite old
4545 // trace data.
Ryan Savitskiac6e0d42019-05-10 15:59:56 +01004546 //
4547 // Warning: this time-based global clearing is likely to be removed in the
Ryan Savitski0b4008a2019-05-13 17:55:53 +01004548 // future, to be replaced with a smarter way of sending the notifications
4549 // only when necessary.
Ryan Savitskiac6e0d42019-05-10 15:59:56 +01004550 optional uint32 clear_period_ms = 1;
4551 }
4552 optional IncrementalStateConfig incremental_state_config = 21;
4553
Hector Dearman085dc3c2019-04-23 11:48:10 +01004554 // Additional guardrail used by the Perfetto command line client.
4555 // On user builds when --dropbox is set perfetto will refuse to trace unless
4556 // this is also set.
4557 // Added in Q.
4558 optional bool allow_user_build_tracing = 19;
Hector Dearmanfb4d0732019-05-19 15:44:56 +01004559
4560 // If set the tracing service will ensure there is at most one tracing session
4561 // with this key.
4562 optional string unique_session_name = 22;
Hector Dearman554627f2019-06-04 17:58:22 +01004563
4564 // Compress trace with the given method. Best effort.
4565 enum CompressionType {
4566 COMPRESSION_TYPE_UNSPECIFIED = 0;
4567 COMPRESSION_TYPE_DEFLATE = 1;
4568 };
4569 optional CompressionType compression_type = 24;
Ryan Savitski53ca60b2019-06-03 13:04:40 +01004570
4571 // Android-only. Debug builds only. Not for general use. If set, saves a
4572 // Dropbox trace into an incident. This field is read by perfetto_cmd, rather
4573 // than the tracing service. All fields are mandatory.
4574 message IncidentReportConfig {
4575 optional string destination_package = 1;
4576 optional string destination_class = 2;
4577 // Level of filtering in the requested incident. See |Destination| in
4578 // frameworks/base/core/proto/android/privacy.proto.
4579 optional int32 privacy_level = 3;
4580 // If true, do not write the trace into dropbox (i.e. incident only).
4581 // Otherwise, write to both dropbox and incident.
4582 optional bool skip_dropbox = 4;
4583 }
4584 optional IncidentReportConfig incident_report_config = 25;
Hector Dearman2bdd2be2019-08-07 14:50:37 +01004585
4586 // An identifier clients can use to tie this trace to other logging.
4587 optional bytes trace_uuid = 26;
Isabelle Taylor80ec5f72019-02-27 11:27:41 +00004588}
4589
4590// End of protos/perfetto/config/trace_config.proto
4591
4592// Begin of protos/perfetto/config/profiling/heapprofd_config.proto
4593
4594// Configuration for go/heapprofd.
4595message HeapprofdConfig {
4596 message ContinuousDumpConfig {
4597 // ms to wait before first dump.
4598 optional uint32 dump_phase_ms = 5;
4599 // ms to wait between following dumps.
4600 optional uint32 dump_interval_ms = 6;
4601 };
4602
4603 // Set to 1 for perfect accuracy.
4604 // Otherwise, sample every sample_interval_bytes on average.
Florian Mayer81df6cb2019-04-15 11:32:13 +01004605 //
4606 // See https://docs.perfetto.dev/#/heapprofd?id=sampling-interval for more
4607 // details.
Isabelle Taylor80ec5f72019-02-27 11:27:41 +00004608 optional uint64 sampling_interval_bytes = 1;
4609
4610 // E.g. surfaceflinger, com.android.phone
Florian Mayerb524cbb2019-04-05 18:14:35 +01004611 // This input is normalized in the following way: if it contains slashes,
4612 // everything up to the last slash is discarded. If it contains "@",
4613 // everything after the first @ is discared.
4614 // E.g. /system/bin/surfaceflinger@1.0 normalizes to surfaceflinger.
4615 // This transformation is also applied to the processes' command lines when
4616 // matching.
Isabelle Taylor80ec5f72019-02-27 11:27:41 +00004617 repeated string process_cmdline = 2;
Florian Mayerb524cbb2019-04-05 18:14:35 +01004618
Isabelle Taylor80ec5f72019-02-27 11:27:41 +00004619 // For watermark based triggering or local debugging.
4620 repeated uint64 pid = 4;
Florian Mayera774cb72019-04-29 14:20:43 +01004621
4622 // Profile all processes eligible for profiling on the system.
4623 // See https://docs.perfetto.dev/#/heapprofd?id=target-processes for which
4624 // processes are eligible.
4625 //
4626 // On unmodified userdebug builds, this will lead to system crashes. Zygote
4627 // will crash when trying to launch a new process as it will have an
4628 // unexpected open socket to heapprofd.
4629 //
4630 // heapprofd will likely be overloaded by the amount of data for low
4631 // sampling intervals.
Isabelle Taylor80ec5f72019-02-27 11:27:41 +00004632 optional bool all = 5;
Florian Mayera774cb72019-04-29 14:20:43 +01004633
Florian Mayer9c6538d2019-03-07 14:32:05 +00004634 // Do not emit function names for mappings starting with this prefix.
4635 // E.g. /system to not emit symbols for any system libraries.
4636 repeated string skip_symbol_prefix = 7;
Isabelle Taylor80ec5f72019-02-27 11:27:41 +00004637
Isabelle Taylor80ec5f72019-02-27 11:27:41 +00004638 // Dump at a predefined interval.
4639 optional ContinuousDumpConfig continuous_dump_config = 6;
Florian Mayer92e8bf92019-03-28 13:44:45 +00004640
4641 // Size of the shared memory buffer between the profiled processes and
4642 // heapprofd. Defaults to 8 MiB. If larger than 500 MiB, truncated to 500
4643 // MiB.
Florian Mayer91b3c6d2019-04-10 13:44:37 -07004644 //
4645 // Needs to be:
4646 // * at least 8192,
4647 // * a power of two,
4648 // * a multiple of 4096.
Florian Mayer92e8bf92019-03-28 13:44:45 +00004649 optional uint64 shmem_size_bytes = 8;
Florian Mayerd6bdb6f2019-05-03 17:53:58 +01004650
4651 // When the shmem buffer is full, block the client instead of ending the
4652 // trace. Use with caution as this will significantly slow down the target
4653 // process.
4654 optional bool block_client = 9;
Florian Mayer225559a2019-05-09 14:28:26 +01004655
4656 // Do not profile processes from startup, only match already running
4657 // processes.
4658 //
4659 // Can not be set at the same time as no_running.
4660 optional bool no_startup = 10;
4661
4662 // Do not profile running processes. Only match processes on startup.
4663 //
4664 // Can not be set at the same time as no_startup.
4665 optional bool no_running = 11;
Florian Mayer7142c7c2019-05-20 18:11:41 +01004666
4667 // Gather information on how many bytes of allocations are on non-referenced
4668 // pages. The way to use this generally is:
4669 // 1. Start profile of app.
4670 // 2. Start app.
Florian Mayer4c19b692019-07-15 16:58:38 +01004671 // 3. Trigger a dump by sending SIGUSR1 to heapprofd.
Florian Mayer7142c7c2019-05-20 18:11:41 +01004672 // 4. Do operations.
4673 // 5. End profile.
4674 //
4675 // You can then find the allocations that were not used for the operations you
4676 // did in step 4.
4677 optional bool idle_allocations = 12;
Florian Mayer8707d4d2019-07-16 11:17:46 +01004678
4679 // Cause heapprofd to emit a single dump at the end, showing the memory usage
4680 // at the point in time when the sampled heap usage of the process was at its
4681 // maximum. This causes ProfilePacket.HeapSample.self_max to be set, and
4682 // self_allocated and self_freed to not be set.
4683 optional bool dump_at_max = 13;
Isabelle Taylor80ec5f72019-02-27 11:27:41 +00004684}
4685
4686// End of protos/perfetto/config/profiling/heapprofd_config.proto
Ryan Savitski89bd9222019-06-13 14:39:30 +01004687
4688// Begin of protos/perfetto/config/gpu/gpu_counter_config.proto
4689
4690// When editing this file run ./tools/gen_tracing_cpp_headers_from_protos.py
4691// to reflect changes in the corresponding C++ headers.
4692
4693message GpuCounterConfig {
4694 // Desired sampling interval for counters.
4695 optional uint64 counter_period_ns = 1;
4696
4697 // List of counters to be sampled. Counter IDs correspond to the ones
4698 // described in GpuCounterSpec in the data source descriptor.
4699 repeated uint32 counter_ids = 2;
4700}
4701
4702// End of protos/perfetto/config/gpu/gpu_counter_config.proto
Ryan Savitskifde4ae62019-06-14 16:02:52 +01004703
4704// Begin of protos/perfetto/config/android/packages_list_config.proto
4705
4706// Data source that lists details (such as version code) about packages on an
4707// Android device.
4708message PackagesListConfig {
4709 // If not empty, emit info about only the following list of package names
4710 // (exact match, no regex). Otherwise, emit info about all packages.
4711 repeated string package_name_filter = 1;
4712}
4713
4714// End of protos/perfetto/config/android/packages_list_config.proto