• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// 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
14option go_package = "github.com/google/perfetto/perfetto_proto";
15
16// Begin of protos/perfetto/metrics/android/process_metadata.proto
17
18message AndroidProcessMetadata {
19  // Process name. Usually, cmdline or <package_name>(:<custom_name>)?.
20  optional string name = 1;
21
22  // User id under which this process runs.
23  optional int64 uid = 2;
24
25  // Package metadata from Android package list.
26  message Package {
27    optional string package_name = 1;
28    optional int64 apk_version_code = 2;
29    optional bool debuggable = 3;
30  }
31
32  // Package that this process belongs to.
33  //
34  // If this process shares its uid (see `packages_for_uid` field), the package
35  // is determined based on the process name and package name. If there is no
36  // match this field is empty.
37  optional Package package = 7;
38
39  // All packages using this uid.
40  //
41  // Shared uid documentation:
42  // https://developer.android.com/guide/topics/manifest/manifest-element#uid
43  repeated Package packages_for_uid = 8;
44
45  // Pid of the process name.
46  optional int64 pid = 9;
47
48  reserved 3, 4, 5, 6;
49}
50
51// End of protos/perfetto/metrics/android/process_metadata.proto
52
53// Begin of protos/perfetto/metrics/android/android_blocking_calls_cuj_metric.proto
54
55// Blocking calls inside Android CUJs. Shows count and total duration for each.
56message AndroidBlockingCallsCujMetric {
57  repeated Cuj cuj = 1;
58
59  // Next id: 7
60  message Cuj {
61    // ID of the CUJ that is unique within the trace.
62    optional int32 id = 1;
63
64    // Name of the CUJ, extracted from the CUJ jank or latency trace marker.
65    // For example SHADE_EXPAND_COLLAPSE from J<SHADE_EXPAND_COLLAPSE>.
66    optional string name = 2;
67
68    // Details about the process (uid, version, etc)
69    optional AndroidProcessMetadata process = 3;
70
71    // ts of the CUJ trace marker slice, in ns.
72    optional int64 ts = 4;
73
74    // dur of the CUJ trace marker slice, in ns.
75    optional int64 dur = 5;
76
77    // List of blocking calls on the process main thread.
78    repeated BlockingCall blocking_calls = 6;
79  }
80
81  // Blocking call on the main thread.
82  message BlockingCall {
83    // Name of the blocking call
84    optional string name = 1;
85    // Number of times it happened within the CUJ
86    optional int64 cnt = 2;
87    // Total duration within the CUJ
88    optional int64 total_dur_ms = 3;
89    // Maximal duration within the CUJ
90    optional int64 max_dur_ms = 4;
91    // Minimal duration within the CUJ
92    optional int64 min_dur_ms = 5;
93  }
94}
95
96// End of protos/perfetto/metrics/android/android_blocking_calls_cuj_metric.proto
97
98// Begin of protos/perfetto/metrics/android/android_frame_timeline_metric.proto
99
100message AndroidFrameTimelineMetric {
101  message ProcessBreakdown {
102    optional AndroidProcessMetadata process = 3;
103
104    optional int64 total_frames = 4;
105    optional int64 missed_frames = 5;
106    optional int64 missed_app_frames = 6;
107    optional int64 missed_sf_frames = 7;
108
109    optional int64 frame_dur_max = 8;
110    optional int64 frame_dur_avg = 9;
111    optional int64 frame_dur_p50 = 10;
112    optional int64 frame_dur_p90 = 11;
113    optional int64 frame_dur_p95 = 12;
114    optional int64 frame_dur_p99 = 13;
115    optional double frame_dur_ms_p50 = 14;
116    optional double frame_dur_ms_p90 = 15;
117    optional double frame_dur_ms_p95 = 16;
118    optional double frame_dur_ms_p99 = 17;
119    optional int64 dropped_frames = 18;
120
121    reserved 1, 2;
122  }
123
124  optional int64 total_frames = 4;
125  optional int64 missed_app_frames = 5;
126  optional int64 dropped_frames = 6;
127
128  repeated ProcessBreakdown process = 2;
129
130  reserved 1;
131}
132
133
134// End of protos/perfetto/metrics/android/android_frame_timeline_metric.proto
135
136// Begin of protos/perfetto/metrics/android/android_trusty_workqueues.proto
137
138// Metric used to generate a simplified view of the Trusty kworker events.
139message AndroidTrustyWorkqueues {}
140
141// End of protos/perfetto/metrics/android/android_trusty_workqueues.proto
142
143// Begin of protos/perfetto/metrics/android/batt_metric.proto
144
145message AndroidBatteryMetric {
146  message BatteryCounters {
147    // Timestamp measured from boot time [ns].
148    optional int64 timestamp_ns = 1;
149    // Fields 2-5 are the same as in BatteryCounters proto in TracePacket.
150    optional double charge_counter_uah = 2;
151    optional float capacity_percent = 3;
152    optional double current_ua = 4;
153    optional double current_avg_ua = 5;
154  }
155
156  message BatteryAggregates {
157    // Field numbers for these 3 == the int values from Android
158    optional int64 total_screen_off_ns = 1;
159    optional int64 total_screen_on_ns = 2;
160    optional int64 total_screen_doze_ns = 3;
161    // Total time a wakelock was held
162    optional int64 total_wakelock_ns = 4;
163    // Amount of time the device was suspended. Depends on the ftrace source
164    // "power/suspend_resume".
165    optional int64 sleep_ns = 5;
166    optional int64 sleep_screen_off_ns = 6;
167    optional int64 sleep_screen_on_ns = 7;
168    optional int64 sleep_screen_doze_ns = 8;
169  }
170
171  // Period of time during the trace that the device went to sleep completely.
172  message SuspendPeriod {
173    optional int64 timestamp_ns = 1;
174    optional int64 duration_ns = 2;
175  }
176
177  // Battery counters info for each ts of the trace. This should only be
178  // extracted for short traces.
179  repeated BatteryCounters battery_counters = 1;
180
181  optional BatteryAggregates battery_aggregates = 2;
182
183  repeated SuspendPeriod suspend_period = 3;
184}
185
186// End of protos/perfetto/metrics/android/batt_metric.proto
187
188// Begin of protos/perfetto/metrics/android/binder_metric.proto
189
190// This metric provides the following:
191// 1. Per-process Binder statistics for traces with binder_driver enabled.
192//    Specifically, transactions are categorized and counted
193// 2. Unaggregated binder txn durations with per-txn aggregated thread state and
194// blocked function
195//    durations
196message AndroidBinderMetric {
197  message PerProcessBreakdown {
198    optional string process_name = 1;
199    optional uint32 pid = 2;
200    optional string slice_name = 3;
201    optional uint32 count = 4;
202  }
203
204  message UnaggregatedTxnBreakdown {
205    // General
206    optional string aidl_name = 1;
207    // Client
208    // Removed: was binder_txn_id
209    reserved 2;
210    optional string client_process = 3;
211    optional string client_thread = 4;
212    optional bool is_main_thread = 5;
213    optional int64 client_ts = 6;
214    optional int64 client_dur = 7;
215    // Server
216    // Removed: was binder_reply_id
217    reserved 8;
218    optional string server_process = 9;
219    optional string server_thread = 10;
220    optional int64 server_ts = 11;
221    optional int64 server_dur = 12;
222    // Aggregations
223    repeated ThreadStateBreakdown thread_states = 13;
224    repeated BlockedFunctionBreakdown blocked_functions = 14;
225
226    optional uint32 client_tid = 15;
227    optional uint32 server_tid = 16;
228
229    optional uint32 client_pid = 17;
230    optional uint32 server_pid = 18;
231  }
232
233  message ThreadStateBreakdown {
234    optional string thread_state_type = 1;
235    optional string thread_state = 2;
236    optional int64 thread_state_dur = 3;
237    optional int64 thread_state_count = 4;
238  }
239
240  message BlockedFunctionBreakdown {
241    optional string thread_state_type = 1;
242    optional string blocked_function = 2;
243    optional int64 blocked_function_dur = 3;
244    optional int64 blocked_function_count = 4;
245  }
246
247  repeated PerProcessBreakdown process_breakdown = 1;
248  repeated UnaggregatedTxnBreakdown unaggregated_txn_breakdown = 2;
249}
250
251// End of protos/perfetto/metrics/android/binder_metric.proto
252
253// Begin of protos/perfetto/metrics/android/camera_metric.proto
254
255message AndroidCameraMetric {
256  message Counter {
257    optional double min = 1;
258    optional double max = 2;
259    optional double avg = 3;
260  }
261
262  // Counter for the sum of DMA and RSS across GCA, cameraserver
263  // and HAL. This provides a single number for the memory
264  // pressure using the camera is putting on the rest of the
265  // system.
266  //
267  // Note: this number assumes that all DMA pressure is coming
268  // from the camera as this is usually a pretty good
269  // approximation. Being more accurate here would increase the
270  // complexity of the metric significantly.
271  //
272  // Note: if there are multiple GCA/cameraserver/HAL processes
273  // in the trace, this metric will simply take the latest
274  // one in the trace and ignore the others.
275  optional Counter gc_rss_and_dma = 1;
276}
277
278// End of protos/perfetto/metrics/android/camera_metric.proto
279
280// Begin of protos/perfetto/metrics/android/camera_unagg_metric.proto
281
282message AndroidCameraUnaggregatedMetric {
283  message Value {
284    optional int64 ts = 1;
285    optional double value = 2;
286  }
287
288  // Timeseries for the sum of DMA and RSS across GCA, cameraserver
289  // and HAL. This provides a single number for the memory
290  // pressure using the camera is putting on the rest of the
291  // system.
292  //
293  // Note: this number assumes that all DMA pressure is coming
294  // from the camera as this is usually a pretty good
295  // approximation. Being more accurate here would increase the
296  // complexity of the metric significantly.
297  //
298  // Note: if there are multiple GCA/cameraserver/HAL processes
299  // in the trace, this metric will simply take the latest
300  // one in the trace and ignore the others.
301  repeated Value gc_rss_and_dma = 1;
302}
303
304// End of protos/perfetto/metrics/android/camera_unagg_metric.proto
305
306// Begin of protos/perfetto/metrics/android/cpu_metric.proto
307
308message AndroidCpuMetric {
309  // Next id: 6
310  message Metrics {
311    // CPU megacycles (i.e. cycles divided by 1e6).
312    optional int64 mcycles = 1;
313
314    // Total time the thread was running for this breakdown in
315    // nanoseconds.
316    optional int64 runtime_ns = 2;
317
318    // Min/max/average CPU frequency weighted by the time the CPU was
319    // running at each frequency in this breakdown.
320    optional int64 min_freq_khz = 3;
321    optional int64 max_freq_khz = 4;
322    optional int64 avg_freq_khz = 5;
323  }
324
325  // Next id: 7
326  message CoreData {
327    optional uint32 id = 1;
328    optional Metrics metrics = 6;
329
330    reserved 2 to 5;
331  }
332
333  // Next id: 3
334  message CoreTypeData {
335    optional string type = 1;
336    optional Metrics metrics = 2;
337  }
338
339  // Next id: 7
340  message Thread {
341    optional string name = 1;
342    optional Metrics metrics = 4;
343
344    // Breakdowns of above metrics.
345    repeated CoreData core = 2;
346    repeated CoreTypeData core_type = 5;
347
348    reserved 3;
349  }
350
351  // Next id: 8
352  message Process {
353    optional string name = 1;
354    optional Metrics metrics = 4;
355
356    // Breakdowns of above metrics.
357    repeated Thread threads = 6;
358    repeated CoreData core = 7;
359    repeated CoreTypeData core_type = 5;
360
361    reserved 3;
362  }
363
364  repeated Process process_info = 1;
365}
366
367// End of protos/perfetto/metrics/android/cpu_metric.proto
368
369// Begin of protos/perfetto/metrics/android/display_metrics.proto
370
371message AndroidDisplayMetrics {
372  // Stat that reports the number of duplicate frames submitted
373  // to the display for rendering. That is frames that have the same
374  // pixels values but where still submitted. It is tracked based on
375  // comparing the MISR of the current frame vs previous frame.
376  optional uint32 total_duplicate_frames = 1;
377
378  // Stat reports whether there is any duplicate_frames tracked
379  optional uint32 duplicate_frames_logged = 2;
380
381  // Stat that reports the number of dpu underrrun occurs count.
382  optional uint32 total_dpu_underrun_count = 3;
383
384
385  message RefreshRateStat {
386    // The refresh rate value (the number of frames per second)
387    optional uint32 refresh_rate_fps = 1;
388
389    // Calculate the number of refresh rate switches to this fps
390    optional uint32 count = 2;
391
392    // Calculate the total duration of refresh rate stays at this fps
393    optional double total_dur_ms = 3;
394
395    // Calculate the average duration of refresh rate stays at this fps
396    optional double avg_dur_ms = 4;
397  }
398
399  // Calculate the total number of refresh rate changes
400  optional uint32 refresh_rate_switches = 4;
401
402  // The statistics for each refresh rate value
403  repeated RefreshRateStat refresh_rate_stats = 5;
404
405  // Stats to measure the runtime of updating the power state in
406  // DisplayPowerController
407  message UpdatePowerState {
408    optional uint32 avg_runtime_micro_secs = 2;
409
410    // Removed: avg_runtime_ms
411    reserved 1;
412  }
413
414  optional UpdatePowerState update_power_state = 6;
415}
416
417// End of protos/perfetto/metrics/android/display_metrics.proto
418
419// Begin of protos/perfetto/metrics/android/dma_heap_metric.proto
420
421// dma-buf heap memory stats on Android.
422message AndroidDmaHeapMetric {
423    optional double avg_size_bytes = 1;
424    optional double min_size_bytes = 2;
425    optional double max_size_bytes = 3;
426
427    // Total allocation size.
428    // Essentially the sum of positive allocs.
429    optional double total_alloc_size_bytes = 4;
430}
431
432// End of protos/perfetto/metrics/android/dma_heap_metric.proto
433
434// Begin of protos/perfetto/metrics/android/dvfs_metric.proto
435
436message AndroidDvfsMetric {
437
438  message BandStat {
439    // Operating frequency
440    optional int32 freq_value = 1;
441
442    // Percentage of duration in this operating frequency compared to all frequencies
443    optional double percentage = 2;
444
445    // Total duration in ns when the state was in this operating frequency
446    optional int64 duration_ns = 3;
447  }
448
449  message FrequencyResidency {
450    // Frequency representative name
451    optional string freq_name = 1;
452    // Each band statistics meta
453    repeated BandStat band_stat = 2;
454  }
455
456  // Frequency residency metrics from clock_set_rate ftrace event.
457  repeated FrequencyResidency freq_residencies = 1;
458}
459
460// End of protos/perfetto/metrics/android/dvfs_metric.proto
461
462// Begin of protos/perfetto/metrics/android/fastrpc_metric.proto
463
464// fastrpc memory stats on Android.
465message AndroidFastrpcMetric {
466  message Subsystem {
467    optional string name = 1;
468    optional double avg_size_bytes = 2;
469    optional double min_size_bytes = 3;
470    optional double max_size_bytes = 4;
471
472    // Total allocation size.
473    // Essentially the sum of positive allocs.
474    optional double total_alloc_size_bytes = 5;
475  }
476
477  repeated Subsystem subsystem = 1;
478}
479
480// End of protos/perfetto/metrics/android/fastrpc_metric.proto
481
482// Begin of protos/perfetto/metrics/android/g2d_metric.proto
483
484message G2dMetrics {
485  message G2dInstance {
486    // G2d name.
487    optional string name = 1;
488
489    optional uint32 frame_count = 5;
490    optional uint32 error_count = 6;
491
492    optional double max_dur_ms = 7;
493    optional double min_dur_ms = 8;
494    optional double avg_dur_ms = 9;
495
496    // Removed: was int64 versions of max_dur_ns, min_dur_ns and avg_dur_ns.
497    reserved 2 to 4;
498  }
499  message G2dMetric {
500    // G2D Metric for each G2D Instance.
501    repeated G2dInstance instances = 1;
502
503    // the number of frames processed by G2D
504    optional uint32 frame_count = 5;
505    // the number of error events
506    optional uint32 error_count = 6;
507
508    // max/min/avg G2d frame durations for all instances.
509    optional double max_dur_ms = 7;
510    optional double min_dur_ms = 8;
511    optional double avg_dur_ms = 9;
512
513    // Removed: was int64 versions of max_dur_ns, min_dur_ns and avg_dur_ns.
514    reserved 2 to 4;
515  }
516
517  optional G2dMetric g2d_hw = 1;
518  optional G2dMetric g2d_sw = 2;
519}
520
521// End of protos/perfetto/metrics/android/g2d_metric.proto
522
523// Begin of protos/perfetto/metrics/android/gpu_metric.proto
524
525message AndroidGpuMetric {
526  message Process {
527    // Process name.
528    optional string name = 1;
529
530    // max/min/avg GPU memory used by this process.
531    optional int64 mem_max = 2;
532    optional int64 mem_min = 3;
533    optional int64 mem_avg = 4;
534  }
535
536  // GPU metric for processes using GPU.
537  repeated Process processes = 1;
538
539  // max/min/avg GPU memory used by the entire system.
540  optional int64 mem_max = 2;
541  optional int64 mem_min = 3;
542  optional int64 mem_avg = 4;
543
544  message FrequencyMetric {
545    // Identifier for GPU in a multi-gpu device.
546    optional uint32 gpu_id = 1;
547
548    // max/min/avg GPU frequency for this gpu_id
549    // the calculation of avg is weighted by the duration of each frequency
550    optional int64 freq_max = 2;
551    optional int64 freq_min = 3;
552    optional double freq_avg = 4;
553
554    message MetricsPerFrequency {
555      // Used frequency
556      optional int64 freq = 1;
557
558      // Total duration in ms when the state of GPU was in this frequency
559      optional double dur_ms = 2;
560
561      // Percentage of duration in this frequency compared to all frequencies
562      // in this gpu_id
563      optional double percentage = 3;
564    }
565
566    // Metrics for each used GPU frequency
567    repeated MetricsPerFrequency used_freqs = 5;
568  }
569
570  // GPU frequency metric for each gpu_id
571  repeated FrequencyMetric freq_metrics = 5;
572}
573
574// End of protos/perfetto/metrics/android/gpu_metric.proto
575
576// Begin of protos/perfetto/metrics/android/hwcomposer.proto
577
578message AndroidHwcomposerMetrics {
579  // Counts the number of composition total layers in the trace. (non-weighted average)
580  optional double composition_total_layers = 1;
581
582  // Counts the number of composition dpu layers in the trace. (non-weighted average)
583  optional double composition_dpu_layers = 2;
584
585  // Counts the number of composition gpu layers in the trace. (non-weighted average)
586  optional double composition_gpu_layers = 3;
587
588  // Counts the number of composition dpu cached layers in the trace. (non-weighted average)
589  optional double composition_dpu_cached_layers = 4;
590
591  // Counts the number of composition surfaceflinger cached layers in the trace.
592  // (non-weighted average)
593  optional double composition_sf_cached_layers = 5;
594
595  // Counts the number of composition rounded corner decoration layers in the trace.
596  // (non-weighted average)
597  optional double composition_rcd_layers = 15;
598
599  // Counts how many times validateDisplay is skipped.
600  optional int32 skipped_validation_count = 6;
601
602  // Counts how many times validateDisplay cannot be skipped.
603  optional int32 unskipped_validation_count = 7;
604
605  // Counts how many times validateDisplay is already separated from presentDisplay
606  // since the beginning.
607  optional int32 separated_validation_count = 8;
608
609  // Counts how many unhandled validation cases which might be caused by errors.
610  optional int32 unknown_validation_count = 9;
611
612  // the average of overall hwcomposer execution time.
613  optional double avg_all_execution_time_ms = 10;
614
615  // the average of hwcomposer execution time for skipped validation cases.
616  optional double avg_skipped_execution_time_ms = 11;
617
618  // the average of hwcomposer execution time for unskipped validation cases.
619  optional double avg_unskipped_execution_time_ms = 12;
620
621  // the average of hwcomposer execution time for separated validation cases.
622  optional double avg_separated_execution_time_ms = 13;
623
624  message DpuVoteMetrics {
625    // the thread ID that handles this track
626    optional uint32 tid = 1;
627
628    // the weighted average of DPU Vote Clock
629    optional double avg_dpu_vote_clock = 2;
630
631    // the weighted average of DPU Vote Avg Bandwidth
632    optional double avg_dpu_vote_avg_bw = 3;
633
634    // the weighted average of DPU Vote Peak Bandwidth
635    optional double avg_dpu_vote_peak_bw = 4;
636
637    // the weighted average of DPU Vote RT (Real Time) Bandwidth
638    optional double avg_dpu_vote_rt_bw = 5;
639  }
640
641  // DPU Vote Metrics for each thread track
642  repeated DpuVoteMetrics dpu_vote_metrics = 14;
643
644  message MetricsPerDisplay {
645    // Display ID in HWC
646    optional string display_id = 1;
647
648    // Counts the number of composition total layers in the trace. (non-weighted average)
649    optional double composition_total_layers = 2;
650
651    // Counts the number of composition dpu layers in the trace. (non-weighted average)
652    optional double composition_dpu_layers = 3;
653
654    // Counts the number of composition gpu layers in the trace. (non-weighted average)
655    optional double composition_gpu_layers = 4;
656
657    // Counts the number of composition dpu cached layers in the trace. (non-weighted average)
658    optional double composition_dpu_cached_layers = 5;
659
660    // Counts the number of composition surfaceflinger cached layers in the trace.
661    // (non-weighted average)
662    optional double composition_sf_cached_layers = 6;
663
664    // Counts the number of composition rounded corner decoration layers in the trace.
665    // (non-weighted average)
666    optional double composition_rcd_layers = 7;
667
668    // Counts how many times validateDisplay is skipped.
669    optional int32 skipped_validation_count = 8;
670
671    // Counts how many times validateDisplay cannot be skipped.
672    optional int32 unskipped_validation_count = 9;
673
674    // Counts how many times validateDisplay is already separated from presentDisplay
675    // since the beginning.
676    optional int32 separated_validation_count = 10;
677
678    // Counts how many unhandled validation cases which might be caused by errors.
679    optional int32 unknown_validation_count = 11;
680
681    // the average of overall hwcomposer execution time.
682    optional double avg_all_execution_time_ms = 12;
683
684    // the average of hwcomposer execution time for skipped validation cases.
685    optional double avg_skipped_execution_time_ms = 13;
686
687    // the average of hwcomposer execution time for unskipped validation cases.
688    optional double avg_unskipped_execution_time_ms = 14;
689
690    // the average of hwcomposer execution time for separated validation cases.
691    optional double avg_separated_execution_time_ms = 15;
692  }
693
694  repeated MetricsPerDisplay metrics_per_display = 16;
695}
696
697// End of protos/perfetto/metrics/android/hwcomposer.proto
698
699// Begin of protos/perfetto/metrics/android/hwui_metric.proto
700
701// Android HWUI graphics performance and graphics memory usage metrics.
702message ProcessRenderInfo {
703  // Name of the package launched
704  optional string process_name = 1;
705
706  // CPU time spent on RenderThread in milliseconds.
707  optional int64 rt_cpu_time_ms = 2;
708
709  // Number of frames drawn on RenderThread, followed by max/min/avg CPU time to draw a frame
710  // in nanoseconds.
711  optional uint32 draw_frame_count = 3;
712  optional int64 draw_frame_max = 4;
713  optional int64 draw_frame_min = 5;
714  optional double draw_frame_avg = 6;
715
716  // Number of GPU commands flushes and max/min/avg time per flush in nanoseconds.
717  optional uint32 flush_count = 7;
718  optional int64 flush_max = 8;
719  optional int64 flush_min = 9;
720  optional double flush_avg = 10;
721
722  // Number of View tree preparation counts and max/min/avg time to traverse the tree in
723  // nanoseconds.
724  optional uint32 prepare_tree_count = 11;
725  optional int64 prepare_tree_max = 12;
726  optional int64 prepare_tree_min = 13;
727  optional double prepare_tree_avg = 14;
728
729  // Number of times the GPU rendered a frame and max/min/avg time for GPU to finish rendering in
730  // in nanoseconds.
731  optional uint32 gpu_completion_count = 15;
732  optional int64 gpu_completion_max = 16;
733  optional int64 gpu_completion_min = 17;
734  optional double gpu_completion_avg = 18;
735
736  // Number of times a frame was recorded/serialized in a display list on the UI thread with
737  // max/min/avg time in nanoseconds.
738  optional uint32 ui_record_count = 19;
739  optional int64 ui_record_max = 20;
740  optional int64 ui_record_min = 21;
741  optional double ui_record_avg = 22;
742
743  // number of unique shader programs that were used to render frames, followed by total and average
744  // times to prepare a shader in nanoseconds.
745  optional uint32 shader_compile_count = 23;
746  optional int64 shader_compile_time = 24;
747  optional double shader_compile_avg = 25;
748  // number of shader programs loaded from the disk cache, followed by total time and average time
749  // to prepare a shader in nanoseconds.
750  optional uint32 cache_hit_count = 26;
751  optional int64 cache_hit_time = 27;
752  optional double cache_hit_avg = 28;
753  // number of shader programs compiled/linked, followed by total time and average time to prepare
754  // a shader in nanoseconds.
755  optional uint32 cache_miss_count = 29;
756  optional int64 cache_miss_time = 30;
757  optional double cache_miss_avg = 31;
758
759  // max/min/avg CPU memory used for graphics by HWUI at the end of a frame.
760  optional int64 graphics_cpu_mem_max = 32;
761  optional int64 graphics_cpu_mem_min = 33;
762  optional double graphics_cpu_mem_avg = 34;
763
764  // max/min/avg GPU memory used by HWUI at the end of a frame excluding textures.
765  optional int64 graphics_gpu_mem_max = 35;
766  optional int64 graphics_gpu_mem_min = 36;
767  optional double graphics_gpu_mem_avg = 37;
768
769  // max/min/avg memory used for GPU textures by HWUI at the end of a frame.
770  optional int64 texture_mem_max = 38;
771  optional int64 texture_mem_min = 39;
772  optional double texture_mem_avg = 40;
773
774  // max/min/avg memory used by HWUI at the end of a frame. This is a sum of previous 3 categories.
775  optional int64 all_mem_max = 41;
776  optional int64 all_mem_min = 42;
777  optional double all_mem_avg = 43;
778}
779
780message AndroidHwuiMetric {
781  //  HWUI metrics for processes that have a RenderThread.
782  repeated ProcessRenderInfo process_info = 1;
783}
784
785// End of protos/perfetto/metrics/android/hwui_metric.proto
786
787// Begin of protos/perfetto/metrics/android/ion_metric.proto
788
789// ion memory stats on Android.
790message AndroidIonMetric {
791  message Buffer {
792    optional string name = 1;
793    optional double avg_size_bytes = 2;
794    optional double min_size_bytes = 3;
795    optional double max_size_bytes = 4;
796
797    // Total allocation size.
798    // Essentially the sum of positive allocs (-> new buffers).
799    optional double total_alloc_size_bytes = 5;
800  }
801
802  repeated Buffer buffer = 1;
803}
804
805// End of protos/perfetto/metrics/android/ion_metric.proto
806
807// Begin of protos/perfetto/metrics/android/irq_runtime_metric.proto
808
809// measure max IRQ runtime and IRQ tasks running over threshold.
810message AndroidIrqRuntimeMetric {
811  message IrqSlice {
812    // IRQ name
813    optional string irq_name = 1;
814    // timestamp
815    optional int64 ts = 2;
816    // runtime of IRQ task
817    optional int64 dur = 3;
818  }
819  message ThresholdMetric {
820    // Threshold value
821    optional string threshold = 1;
822    // over threshold count
823    optional int64 over_threshold_count = 2;
824    // anomaly ratio (over threshold count / total count)
825    optional double anomaly_ratio= 3;
826  }
827  message IrqRuntimeMetric {
828    // max runtime of IRQ tasks
829    optional int64 max_runtime = 1;
830    // total IRQ tasks
831    optional int64 total_count = 2;
832    // over threshold metric
833    optional ThresholdMetric threshold_metric = 3;
834    // information for top 10 IRQ tasks
835    repeated IrqSlice longest_irq_slices = 4;
836  }
837
838  // metrics for hardirq and softirq
839  optional IrqRuntimeMetric hw_irq = 1;
840  optional IrqRuntimeMetric sw_irq = 2;
841}
842
843
844// End of protos/perfetto/metrics/android/irq_runtime_metric.proto
845
846// Begin of protos/perfetto/metrics/android/jank_cuj_metric.proto
847
848message AndroidJankCujMetric {
849  repeated Cuj cuj = 1;
850
851  // Next id: 12
852  message Cuj {
853    // ID of the CUJ that is unique within the trace.
854    optional int32 id = 1;
855
856    // Name of the CUJ, extracted from the CUJ trace marker.
857    // For example SHADE_EXPAND_COLLAPSE from J<SHADE_EXPAND_COLLAPSE>.
858    optional string name = 2;
859
860    // Details about the process (uid, version, etc)
861    optional AndroidProcessMetadata process = 3;
862
863    // ts of the CUJ trace marker slice.
864    optional int64 ts = 4;
865
866    // dur of the CUJ trace marker slice.
867    optional int64 dur = 5;
868
869    // Details about each of the frames within the CUJ.
870    repeated Frame frame = 6;
871
872    // Details about each of the SF frames within the CUJ.
873    repeated Frame sf_frame = 10;
874
875    // Metrics extracted from the counters output by FrameTracker
876    // Does not contain the frame_dur percentile information.
877    optional Metrics counter_metrics = 7;
878
879    // Metrics extracted from the frame timeline.
880    optional Metrics timeline_metrics = 8;
881
882    // Metrics extracted from the trace slices.
883    optional Metrics trace_metrics = 9;
884
885    // Layer name of the surface where the cuj is drawn.
886    optional string layer_name = 11;
887  }
888
889  // Next id: 10
890  message Frame {
891    // Index of the frame within the single user journey.
892    optional int64 frame_number = 1;
893
894    // VSYNC ID of the frame.
895    optional int64 vsync = 2;
896
897    optional int64 ts = 3;
898    optional int64 dur = 4;
899    optional int64 dur_expected = 7;
900
901    // Whether the app process missed the frame deadline.
902    // Only set for the App frames. Always left unset for SF frames.
903    optional bool app_missed = 5;
904
905    // Whether SF missed the frame deadline.
906    optional bool sf_missed = 6;
907
908    // Whether the SF callback missed before emitting jank metrics.
909    // SF callback is used to get the jank classification.
910    optional bool sf_callback_missed = 8;
911
912    // Whether the HWUI callback missed before emitting jank metrics.
913    // HWUI callback is used to get the frame duration.
914    optional bool hwui_callback_missed = 9;
915  }
916
917  // Next id: 18
918  message Metrics {
919    // Overall number of frames within the CUJ.
920    optional int64 total_frames = 1;
921
922    // Number of missed frames.
923    optional int64 missed_frames = 2;
924
925    // Number of frames missed due to the app missing the deadline.
926    optional int64 missed_app_frames = 3;
927
928    // Number of frames missed due to SF.
929    optional int64 missed_sf_frames = 4;
930
931    // Number of successive frames missed.
932    // Not available in timeline_metrics and trace_metrics.
933    optional int64 missed_frames_max_successive = 5;
934
935    // Max frame duration in nanoseconds.
936    optional int64 frame_dur_max = 6;
937
938    // Average frame duration in nanoseconds.
939    // Not available in counter_metrics.
940    optional int64 frame_dur_avg = 7;
941
942    // Median frame duration in nanoseconds.
943    // Not available in counter_metrics.
944    optional int64 frame_dur_p50 = 8;
945
946    // P90 frame duration in nanoseconds.
947    // Not available in counter_metrics.
948    optional int64 frame_dur_p90 = 9;
949
950    // P95 frame duration in nanoseconds.
951    // Not available in counter_metrics.
952    optional int64 frame_dur_p95 = 10;
953
954    // P99 frame duration in nanoseconds.
955    // Not available in counter_metrics.
956    optional int64 frame_dur_p99 = 11;
957
958    // Median frame duration in milliseconds.
959    // Not available in counter_metrics.
960    optional double frame_dur_ms_p50 = 12;
961
962    // P90 frame duration in milliseconds.
963    // Not available in counter_metrics.
964    optional double frame_dur_ms_p90 = 13;
965
966    // P95 frame duration in milliseconds.
967    // Not available in counter_metrics.
968    optional double frame_dur_ms_p95 = 14;
969
970    // P99 frame duration in milliseconds.
971    // Not available in counter_metrics.
972    optional double frame_dur_ms_p99 = 15;
973
974    // Number of frames with missed SF callback.
975    optional int64 sf_callback_missed_frames = 16;
976
977    // Number of frames with missed HWUI callback.
978    optional int64 hwui_callback_missed_frames = 17;
979  }
980}
981
982// End of protos/perfetto/metrics/android/jank_cuj_metric.proto
983
984// Begin of protos/perfetto/metrics/android/java_heap_histogram.proto
985
986message JavaHeapHistogram {
987  // Next id: 9
988  message TypeCount {
989    optional string type_name = 1;
990    optional string category = 4;
991
992    optional uint32 obj_count = 2;
993    optional uint32 reachable_obj_count = 3;
994
995    optional uint32 size_kb = 5;
996    optional uint32 reachable_size_kb = 6;
997    optional uint32 native_size_kb = 7;
998    optional uint32 reachable_native_size_kb = 8;
999  }
1000
1001  message Sample {
1002    optional int64 ts = 1;
1003    repeated TypeCount type_count = 2;
1004  }
1005
1006  // Heap stats per process. One sample per dump (with continuous dump you can
1007  // have more samples differentiated by ts).
1008  message InstanceStats {
1009    optional uint32 upid = 1;
1010    optional AndroidProcessMetadata process = 2;
1011    repeated Sample samples = 3;
1012  }
1013
1014  repeated InstanceStats instance_stats = 1;
1015}
1016
1017// End of protos/perfetto/metrics/android/java_heap_histogram.proto
1018
1019// Begin of protos/perfetto/metrics/android/java_heap_stats.proto
1020
1021message JavaHeapStats {
1022  message HeapRoots {
1023    optional string root_type = 1;
1024    optional string type_name = 2;
1025    optional int64 obj_count = 3;
1026  }
1027
1028  // Next id: 11
1029  message Sample {
1030    optional int64 ts = 1;
1031    // Size of the Java heap in bytes
1032    optional int64 heap_size = 2;
1033    // Native size of all the objects (not included in heap_size)
1034    optional int64 heap_native_size = 8;
1035    optional int64 obj_count = 4;
1036    // Size of the reachable objects in bytes.
1037    optional int64 reachable_heap_size = 3;
1038    // Native size of all the reachable objects (not included in
1039    // reachable_heap_size)
1040    optional int64 reachable_heap_native_size = 9;
1041    optional int64 reachable_obj_count = 5;
1042    // Sum of anonymous RSS + swap pages in bytes.
1043    optional int64 anon_rss_and_swap_size = 6;
1044
1045    // ART root objects
1046    repeated HeapRoots roots = 7;
1047    // OOM adjustment score
1048    optional int64 oom_score_adj = 10;
1049  }
1050
1051  // Heap stats per process. One sample per dump (can be > 1 if continuous
1052  // dump is enabled).
1053  message InstanceStats {
1054    optional uint32 upid = 1;
1055    optional AndroidProcessMetadata process = 2;
1056    repeated Sample samples = 3;
1057  }
1058
1059  repeated InstanceStats instance_stats = 1;
1060}
1061
1062// End of protos/perfetto/metrics/android/java_heap_stats.proto
1063
1064// Begin of protos/perfetto/metrics/android/lmk_metric.proto
1065
1066// LMK stats on Android.
1067message AndroidLmkMetric {
1068  message ByOomScore {
1069    optional int32 oom_score_adj = 1;
1070    optional int32 count = 2;
1071  }
1072
1073  // Total count of LMK events observed in the trace.
1074  optional int32 total_count = 1;
1075  repeated ByOomScore by_oom_score = 2;
1076
1077  // OOM reaper kills. Enabled via the oom/mark_victim point. Should never
1078  // happen.
1079  optional int32 oom_victim_count = 3;
1080}
1081
1082// End of protos/perfetto/metrics/android/lmk_metric.proto
1083
1084// Begin of protos/perfetto/metrics/android/lmk_reason_metric.proto
1085
1086// Global process state at LMK time, used to identify potential culprits.
1087// TODO: rename to AndroidLmkProcessState
1088message AndroidLmkReasonMetric {
1089  message Process {
1090    optional AndroidProcessMetadata process = 1;
1091
1092    // OOM score adj of the process.
1093    optional int32 oom_score_adj = 2;
1094
1095    // RSS + swap.
1096    optional int64 size = 3;
1097
1098    optional int64 file_rss_bytes = 4;
1099    optional int64 anon_rss_bytes = 5;
1100    optional int64 shmem_rss_bytes = 6;
1101    optional int64 swap_bytes = 7;
1102  }
1103  message Lmk {
1104    // OOM score adj of the LMK'ed process.
1105    optional int32 oom_score_adj = 1;
1106
1107    // Total size of the ION heap in bytes during this LMK.
1108    optional int64 ion_heaps_bytes = 4;
1109    // Deprecated. Prefer ion_heaps_bytes.
1110    optional int64 system_ion_heap_size = 2;
1111
1112    // Processes present during this LMK.
1113    repeated Process processes = 3;
1114  }
1115
1116  // LMKs present in the trace, ordered on their timestamp.
1117  repeated Lmk lmks = 1;
1118}
1119
1120// End of protos/perfetto/metrics/android/lmk_reason_metric.proto
1121
1122// Begin of protos/perfetto/metrics/android/mem_metric.proto
1123
1124// Memory metrics on Android.
1125message AndroidMemoryMetric {
1126  message ProcessMetrics {
1127    optional string process_name = 1;
1128    optional ProcessMemoryCounters total_counters = 2;
1129    repeated PriorityBreakdown priority_breakdown = 3;
1130  }
1131
1132  message PriorityBreakdown {
1133    optional string priority = 1;
1134    optional ProcessMemoryCounters counters = 2;
1135  }
1136
1137  message ProcessMemoryCounters {
1138    optional Counter anon_rss = 1;
1139    optional Counter file_rss = 2;
1140    optional Counter swap = 3;
1141    optional Counter anon_and_swap = 4;
1142
1143    // Available when ART trace events are available.
1144    optional Counter java_heap = 5;
1145  }
1146
1147  message Counter {
1148    optional double min = 1;
1149    optional double max = 2;
1150    optional double avg = 3;
1151
1152    // Memory growth observed in the counter sequence. In case of multiple
1153    // processes with the same name, break ties using max.
1154    optional double delta = 4;
1155  }
1156
1157  // Process metrics, grouped by process name
1158  repeated ProcessMetrics process_metrics = 1;
1159}
1160
1161// End of protos/perfetto/metrics/android/mem_metric.proto
1162
1163// Begin of protos/perfetto/metrics/android/mem_unagg_metric.proto
1164
1165// Unaggregated memory metrics on Android.
1166message AndroidMemoryUnaggregatedMetric {
1167  message ProcessValues {
1168    optional string process_name = 1;
1169    optional ProcessMemoryValues mem_values = 2;
1170  }
1171
1172  message ProcessMemoryValues {
1173    repeated Value anon_rss = 1;
1174    repeated Value file_rss = 2;
1175    repeated Value swap = 3;
1176    repeated Value anon_and_swap = 4;
1177  }
1178
1179  message Value {
1180    optional int64 ts = 1;
1181    optional int32 oom_score = 2;
1182    optional double value = 3;
1183  }
1184
1185  // Process metrics for every process instance in trace.
1186  repeated ProcessValues process_values = 1;
1187}
1188
1189// End of protos/perfetto/metrics/android/mem_unagg_metric.proto
1190
1191// Begin of protos/perfetto/metrics/android/monitor_contention_metric.proto
1192
1193// This metric provides information about the monitor contention graph in a
1194// trace
1195message AndroidMonitorContentionMetric {
1196  // Next field id: 24
1197  message Node {
1198    // Global context
1199    optional int64 node_parent_id = 1;
1200    optional int64 node_id = 2;
1201    optional int64 ts = 3;
1202    optional int64 dur = 4;
1203    optional string process_name = 14;
1204    optional uint32 pid = 23;
1205    optional uint32 waiter_count = 11;
1206    repeated ThreadStateBreakdown thread_states = 19;
1207    repeated BlockedFunctionBreakdown blocked_functions = 20;
1208
1209    // Blocking context
1210    optional string blocking_method = 5;
1211    optional string short_blocking_method = 7;
1212    optional string blocking_src = 9;
1213    optional string blocking_thread_name = 13;
1214    optional bool is_blocking_thread_main = 16;
1215    optional uint32 blocking_thread_tid = 22;
1216
1217    // Blocked context
1218    optional string blocked_method = 6;
1219    optional string short_blocked_method = 8;
1220    optional string blocked_src = 10;
1221    optional string blocked_thread_name = 12;
1222    optional bool is_blocked_thread_main = 15;
1223    optional uint32 blocked_thread_tid = 21;
1224
1225    // Binder context
1226    optional int64 binder_reply_ts = 17;
1227    optional uint32 binder_reply_tid = 18;
1228  }
1229
1230  message ThreadStateBreakdown {
1231    optional string thread_state = 1;
1232    optional int64 thread_state_dur = 2;
1233    optional int64 thread_state_count = 3;
1234  }
1235
1236  message BlockedFunctionBreakdown {
1237    optional string blocked_function = 1;
1238    optional int64 blocked_function_dur = 2;
1239    optional int64 blocked_function_count = 3;
1240  }
1241
1242  repeated Node node = 1;
1243}
1244
1245// End of protos/perfetto/metrics/android/monitor_contention_metric.proto
1246
1247// Begin of protos/perfetto/metrics/android/multiuser_metric.proto
1248
1249// Metrics for Multiuser events, such as switching users.
1250message AndroidMultiuserMetric {
1251
1252  // Holds the data for a Multiuser event.
1253  message EventData {
1254    // Duration of the event (in milliseconds).
1255    optional int32 duration_ms = 1;
1256
1257    // CPU usage of each process during the event.
1258    message CpuUsage {
1259      // The userId of the process (e.g. 0 or 10).
1260      optional int32 user_id = 1;
1261      // The name of the process.
1262      optional string process_name = 2;
1263      // The number of CPU cycles (in megacycles) spent by that process during the event.
1264      optional int32 cpu_mcycles = 3;
1265      // The ratio of this process's cycles to the total for all processes, expressed as a percentage.
1266      optional float cpu_percentage = 4;
1267      // General identifier for this usage source: determined from the process name, user, etc.
1268      // Should be stable across multiple runs (i.e. does not print the user_id directly).
1269      optional string identifier = 5;
1270    }
1271    repeated CpuUsage cpu_usage = 2;
1272  }
1273
1274  // Metrics for a user switch.
1275  optional EventData user_switch = 1;
1276}
1277// End of protos/perfetto/metrics/android/multiuser_metric.proto
1278
1279// Begin of protos/perfetto/metrics/android/network_metric.proto
1280
1281message AndroidNetworkMetric {
1282  message PacketStatistic {
1283    // Packet count.
1284    optional int64 packets = 1;
1285
1286    // Packet Bytes.
1287    optional int64 bytes = 2;
1288
1289    // Timestamp when first packet received or transmitted.
1290    optional int64 first_packet_timestamp_ns = 3;
1291
1292    // Timestamp when last packet received or transmitted.
1293    optional int64 last_packet_timestamp_ns = 4;
1294
1295    // Interval between first & last packet. The minimum interval is 10ms.
1296    optional int64 interval_ns = 5;
1297
1298    // Data Speed.
1299    optional double data_rate_kbps = 6;
1300  }
1301
1302  message CorePacketStatistic {
1303    optional uint32 id = 1;
1304    optional PacketStatistic packet_statistic = 2;
1305  }
1306
1307  message Rx {
1308    // Total packets statistic.
1309    optional PacketStatistic total = 1;
1310
1311    // Per core packets statistic.
1312    repeated CorePacketStatistic core = 2;
1313
1314    // GRO aggregation ratio.
1315    optional string gro_aggregation_ratio = 3;
1316  }
1317
1318  message Tx {
1319    // Total packets statistic.
1320    optional PacketStatistic total = 1;
1321
1322    // Per core packets statistic.
1323    repeated CorePacketStatistic core = 2;
1324  }
1325
1326  message NetDevice {
1327    // Network device name.
1328    optional string name = 1;
1329
1330    // Ingress traffic statistic.
1331    optional Rx rx = 2;
1332
1333    // Egress traffic statistic
1334    optional Tx tx = 3;
1335  }
1336
1337  message NetRxActionStatistic {
1338    // SoftIrq NET_RX action count.
1339    optional int64 count = 1;
1340
1341    // SoftIrq NET_RX action was running in millisecond.
1342    optional double runtime_ms = 2;
1343
1344    // SoftIrq NET_RX action average running time.
1345    optional double avg_runtime_ms = 3;
1346
1347    // CPU megacycles (i.e. cycles divided by 1e6).
1348    optional int64 mcycles = 4;
1349
1350    // Average weighted CPU frequency by the time the NET_RX Action
1351    // running at each frequency.
1352    optional int64 avg_freq_khz = 5;
1353  }
1354
1355  message NetTxActionStatistic {
1356    // SoftIrq NET_TX action count.
1357    optional int64 count = 1;
1358
1359    // SoftIrq NET_TX action was running in millisecond.
1360    optional double runtime_ms = 2;
1361
1362    // SoftIrq NET_TX action average running time.
1363    optional double avg_runtime_ms = 3;
1364
1365    // CPU megacycles (i.e. cycles divided by 1e6).
1366    optional int64 mcycles = 4;
1367
1368    // Average weighted CPU frequency by the time the NET_TX Action
1369    // running at each frequency.
1370    optional int64 avg_freq_khz = 5;
1371  }
1372
1373  message IpiActionStatistic {
1374    // SoftIrq IPI action count.
1375    optional int64 count = 1;
1376
1377    // SoftIrq IPI action was running in millisecond.
1378    optional double runtime_ms = 2;
1379
1380    // SoftIrq IPI action average running time.
1381    optional double avg_runtime_ms = 3;
1382  }
1383
1384  message CoreNetRxActionStatistic {
1385    optional uint32 id = 1;
1386    optional NetRxActionStatistic net_rx_action_statistic = 2;
1387  }
1388
1389  message CoreNetTxActionStatistic {
1390    optional uint32 id = 1;
1391    optional NetTxActionStatistic net_tx_action_statistic = 2;
1392  }
1393
1394  message NetRxAction {
1395    // Total NET_RX action statistics.
1396    optional NetRxActionStatistic total = 1;
1397
1398    // Per core NET_RX action statistics.
1399    repeated CoreNetRxActionStatistic core = 2;
1400
1401    // The average packet time moves through the kernel stack.
1402    optional double avg_interstack_latency_ms = 3;
1403  }
1404
1405  message NetTxAction {
1406    // Total NET_TX action statistics.
1407    optional NetTxActionStatistic total = 1;
1408
1409    // Per core NET_TX action statistics.
1410    repeated CoreNetTxActionStatistic core = 2;
1411  }
1412
1413  message IpiAction {
1414    // Total IPI action statistics.
1415    optional IpiActionStatistic total = 1;
1416  }
1417
1418  // Network device metrics.
1419  repeated NetDevice net_devices = 1;
1420
1421  // SoftIrq NET_RX action metrics.
1422  optional NetRxAction net_rx_action = 2;
1423
1424  // Packet retransmission rate.
1425  optional double retransmission_rate = 3;
1426
1427  // Kfree Skb rate (i.e. kfree_skb count divided by the packet count from all
1428  // net devices).
1429  optional double kfree_skb_rate = 4;
1430
1431  // SoftIrq NET_TX action metrics.
1432  optional NetTxAction net_tx_action = 5;
1433
1434  // SoftIrq IPI action metrics.
1435  optional IpiAction ipi_action = 6;
1436}
1437
1438// End of protos/perfetto/metrics/android/network_metric.proto
1439
1440// Begin of protos/perfetto/metrics/android/other_traces.proto
1441
1442message AndroidOtherTracesMetric {
1443  // Uuids of other traces being finalized while the current trace was being
1444  // recorded.
1445  repeated string finalized_traces_uuid = 1;
1446}
1447
1448// End of protos/perfetto/metrics/android/other_traces.proto
1449
1450// Begin of protos/perfetto/metrics/android/package_list.proto
1451
1452message AndroidPackageList {
1453  message Package {
1454    optional string package_name = 1;
1455    optional int64 uid = 2;
1456    optional int64 version_code = 3;
1457  }
1458
1459  repeated Package packages = 1;
1460}
1461
1462// End of protos/perfetto/metrics/android/package_list.proto
1463
1464// Begin of protos/perfetto/metrics/android/powrails_metric.proto
1465
1466message AndroidPowerRails {
1467  // Energy data per Power Rail at given ts.
1468  message EnergyData {
1469    // Time since device boot(CLOCK_BOTTOMTIME) in milli-seconds.
1470    optional int64 timestamp_ms = 1;
1471    // Accumulated energy since device boot in microwatt-seconds(uws).
1472    optional double energy_uws = 2;
1473  }
1474
1475  message PowerRails {
1476    // Name of the rail.
1477    optional string name = 1;
1478    // Energy data for given rail and for all samples in the trace.
1479    repeated EnergyData energy_data = 2;
1480    // The average used power between the first and the last sampled
1481    // energy data in miliwatt (mw)
1482    optional double avg_used_power_mw = 3;
1483  }
1484
1485  // Energy data per Power Rail.
1486  repeated PowerRails power_rails = 1;
1487
1488  // The average used power between the first and last sampled rail across all
1489  // the rails in milliwatts (mw).
1490  optional double avg_total_used_power_mw = 2;
1491}
1492// End of protos/perfetto/metrics/android/powrails_metric.proto
1493
1494// Begin of protos/perfetto/metrics/android/profiler_smaps.proto
1495
1496message ProfilerSmaps {
1497  message Mapping {
1498    optional string path = 1;
1499    optional int32 size_kb = 2;
1500    optional int32 private_dirty_kb = 3;
1501    optional int32 swap_kb = 4;
1502  }
1503
1504  message Instance {
1505    optional AndroidProcessMetadata process = 1;
1506    repeated Mapping mappings = 2;
1507  }
1508
1509  repeated Instance instance = 1;
1510}
1511
1512// End of protos/perfetto/metrics/android/profiler_smaps.proto
1513
1514// Begin of protos/perfetto/metrics/android/rt_runtime_metric.proto
1515
1516// measure max RT runtime and RT tasks running over 5ms.
1517message AndroidRtRuntimeMetric {
1518  message RtSlice {
1519    // thread name
1520    optional string tname = 1;
1521    // timestamp
1522    optional int64 ts = 2;
1523    // runtime of RT task
1524    optional int64 dur = 3;
1525  }
1526
1527  // max runtime of RT tasks
1528  optional int64 max_runtime = 1;
1529  // how many RT tasks are over 5ms.
1530  optional int64 over_5ms_count = 2;
1531  // information for top 10 RT tasks
1532  repeated RtSlice longest_rt_slices = 3;
1533}
1534
1535
1536// End of protos/perfetto/metrics/android/rt_runtime_metric.proto
1537
1538// Begin of protos/perfetto/metrics/android/simpleperf.proto
1539
1540// Metric that stores information related to atrace events generated by
1541// simpleperf tool
1542message AndroidSimpleperfMetric {
1543  optional double urgent_ratio = 1;
1544
1545  message PerfEventMetric {
1546    // Simpleperf event name
1547    optional string name = 1;
1548
1549    message Thread {
1550      // Thread ID
1551      optional int32 tid = 1;
1552      // Thread name
1553      optional string name = 2;
1554      // CPU ID
1555      optional int32 cpu = 3;
1556      // Total counter value
1557      optional double total = 4;
1558    }
1559
1560    message Process {
1561      // Process ID
1562      optional int32 pid = 1;
1563      // Process name
1564      optional string name = 2;
1565      // Metrics for each thread in this process.
1566      repeated Thread threads = 3;
1567      // Total counter value over all threads in this process
1568      optional double total = 4;
1569    }
1570
1571    // Metrics for each process
1572    repeated Process processes = 2;
1573
1574    // Total counter value over all processes and threads
1575    optional double total = 3;
1576  }
1577
1578  repeated PerfEventMetric events = 2;
1579}
1580
1581// End of protos/perfetto/metrics/android/simpleperf.proto
1582
1583// Begin of protos/perfetto/metrics/android/startup_metric.proto
1584
1585// Android app startup metrics.
1586message AndroidStartupMetric {
1587  // A simplified view of the task state durations for a thread
1588  // and a span of time.
1589  message TaskStateBreakdown {
1590    optional int64 running_dur_ns = 1;
1591    optional int64 runnable_dur_ns = 2;
1592    optional int64 uninterruptible_sleep_dur_ns = 3;
1593    optional int64 interruptible_sleep_dur_ns = 4;
1594    optional int64 uninterruptible_io_sleep_dur_ns = 5;
1595    optional int64 uninterruptible_non_io_sleep_dur_ns = 6;
1596  }
1597
1598  message McyclesByCoreType {
1599    optional int64 little = 1;
1600    optional int64 big = 2;
1601    optional int64 bigger = 3;
1602    optional int64 unknown = 4;
1603  }
1604
1605  message Slice {
1606    optional int64 dur_ns = 1;
1607    optional double dur_ms = 2;
1608  }
1609
1610  // Timing information spanning the intent received by the
1611  // activity manager to the first frame drawn.
1612  // Next id: 35.
1613  message ToFirstFrame {
1614    // The duration between the intent received and first frame.
1615    optional int64 dur_ns = 1;
1616    optional double dur_ms = 17;
1617
1618    // Breakdown of time to first frame by task state for the main thread of
1619    // the process starting up.
1620    optional TaskStateBreakdown main_thread_by_task_state = 2;
1621
1622    // The mcycles taken by this startup across all CPUs (broken down by core
1623    // type).
1624    optional McyclesByCoreType mcycles_by_core_type = 26;
1625
1626    // In this timespan, how many processes (apart from the main activity) were
1627    // spawned.
1628    optional uint32 other_processes_spawned_count = 3;
1629
1630    // Total time spent in activity manager between the initial intent
1631    // and the end of the activity starter.
1632    optional Slice time_activity_manager = 4;
1633
1634    // The following slices follow the typical steps post-fork.
1635    optional Slice time_activity_thread_main = 5;
1636    optional Slice time_bind_application = 6;
1637    optional Slice time_activity_start = 7;
1638    optional Slice time_activity_resume = 8;
1639    optional Slice time_activity_restart = 21;
1640    optional Slice time_choreographer = 9;
1641    optional Slice time_inflate = 22;
1642    optional Slice time_get_resources = 23;
1643
1644    // If we are starting a new process, record the duration from the
1645    // intent being received to the time we call the zygote.
1646    optional Slice time_before_start_process = 10;
1647
1648    // The actual duration of the process start (based on the zygote slice).
1649    optional Slice time_during_start_process = 11;
1650
1651    optional Slice to_post_fork = 18;
1652    optional Slice to_activity_thread_main = 19;
1653    optional Slice to_bind_application = 20;
1654
1655    optional Slice time_post_fork = 16;
1656
1657    // The total time spent on opening dex files.
1658    optional Slice time_dex_open = 24;
1659    // Total time spent verifying classes during app startup.
1660    optional Slice time_verify_class = 25;
1661
1662    // Number of methods that were compiled by JIT during app startup.
1663    optional uint32 jit_compiled_methods = 27;
1664
1665    // Time spent running CPU on jit thread pool.
1666    optional Slice time_jit_thread_pool_on_cpu = 28;
1667
1668    // Time spent on garbage collection.
1669    optional Slice time_gc_total = 29;
1670    optional Slice time_gc_on_cpu = 30;
1671
1672    // Time spent in lock contention on the main thread of the process being
1673    // started up. This includes *all* types of lock contention not just monitor
1674    // contention.
1675    optional Slice time_lock_contention_thread_main = 31;
1676
1677    // Time spent in monitor lock contention on the main thread of the
1678    // process being started up. This will be a subset of the time counted by
1679    // |time_lock_contention_thread_main|.
1680    optional Slice time_monitor_contention_thread_main = 32;
1681
1682    // Time spent in opening dex files on the main thread of the process
1683    // being started up.
1684    optional Slice time_dex_open_thread_main = 33;
1685
1686    // Time spent in dlopening .so files on the main thread of the process
1687    // being started up.
1688    optional Slice time_dlopen_thread_main = 34;
1689
1690    // Removed: was other_process_to_activity_cpu_ratio.
1691    reserved 12;
1692
1693    // Removed: was uint32 versions of to_post_fork, to_activity_thread_main and
1694    // to_bind_application.
1695    reserved 13, 14, 15;
1696  }
1697
1698  // Metrics about startup which were developed by looking at experiments using
1699  // high-speed cameras (HSC).
1700  message HscMetrics {
1701    // The duration of the full "startup" as defined by HSC tests.
1702    optional Slice full_startup = 1;
1703  }
1704
1705  message Activity {
1706    optional string name = 1;
1707    optional string method = 2;
1708    optional int64 ts_method_start = 4;
1709
1710    // Field 3 contained Slice with a sum of durations for matching slices.
1711    reserved 3;
1712  }
1713
1714  message BinderTransaction {
1715    optional Slice duration = 1;
1716    optional string thread = 2;
1717    optional string destination_thread = 3;
1718    optional string destination_process = 4;
1719    // From
1720    // https://cs.android.com/android/platform/superproject/+/master:external/perfetto/protos/perfetto/trace/ftrace/binder.proto;l=15;drc=7b6a788162a30802f4c9d8d7a30a54e25edd30f1
1721    optional string flags = 5;
1722    // From
1723    // https://cs.android.com/android/platform/superproject/+/master:external/perfetto/protos/perfetto/trace/ftrace/binder.proto;l=14;drc=7b6a788162a30802f4c9d8d7a30a54e25edd30f1
1724    optional string code = 6;
1725    // From
1726    // https://cs.android.com/android/platform/superproject/+/master:external/perfetto/protos/perfetto/trace/ftrace/binder.proto;l=37;drc=7b6a788162a30802f4c9d8d7a30a54e25edd30f1
1727    optional int64 data_size = 7;
1728  }
1729
1730  // Metrics with information about the status of odex files and the outcome
1731  // of the loading process.
1732  // Multiple files might be loaded for a single startup. Platform might also
1733  // decide to discard an odex file and instead load a fallback, for example
1734  // in case the OS or apk were updated.
1735  message OptimizationStatus {
1736    optional string odex_status = 1;
1737    optional string compilation_filter = 2;
1738    optional string compilation_reason = 3;
1739    optional string location = 4;
1740  }
1741
1742  // Contains the name and duration of class verification occurred during
1743  // the startup.
1744  message VerifyClass {
1745    optional string name = 1;
1746    optional int64 dur_ns = 2;
1747  }
1748
1749  // Contains timestamps of important events which occurred during the
1750  // startup.
1751  message EventTimestamps {
1752    optional int64 intent_received = 1;
1753    optional int64 first_frame = 2;
1754  }
1755
1756  // Contains information about the state of a system during the app startup.
1757  // Useful to put the startup in context.
1758  message SystemState {
1759    // Whether the dex2oat64 process was running concurrent to the startup.
1760    // Deprecated as of 10/2022.
1761    optional bool dex2oat_running = 1 [deprecated=true];
1762
1763    // Whether the installd process was running concurrent to the startup.
1764    // Deprecated as of 10/2022.
1765    optional bool installd_running = 2 [deprecated=true];
1766
1767    // The number of broadcasts dispatched by the system during the app
1768    // launch.
1769    optional int64 broadcast_dispatched_count = 3;
1770
1771    // The number of broadcasts received by an app or the system during the
1772    // app launch. Note that multiple packages can be subscribed to the same
1773    // broadcast so a single dsipatch can cause multiple packages to receive
1774    // and process a broadcast.
1775    optional int64 broadcast_received_count = 4;
1776
1777    // The most active (i.e. consuming the most mcycles) processes during the
1778    // app launch excluding the process(es) being launched.
1779    // Note: the exact number of returned is an implementation detail and
1780    // will likely change over time.
1781    repeated string most_active_non_launch_processes = 5;
1782
1783    // Duration the installd process was running concurrent to the startup.
1784    optional int64 installd_dur_ns = 6;
1785    // Duration the dex2oat64 process was running concurrent to the startup.
1786    optional int64 dex2oat_dur_ns = 7;
1787  }
1788
1789  // Next id: 21
1790  message Startup {
1791    // Random id uniquely identifying an app startup in this trace.
1792    optional uint32 startup_id = 1;
1793
1794    // Startup type (cold / warm / hot)
1795    optional string startup_type = 16;
1796
1797    // Name of the package launched
1798    optional string package_name = 2;
1799
1800    // Name of the process launched
1801    optional string process_name = 3;
1802
1803    // Details about the activities launched
1804    repeated Activity activities = 11;
1805
1806    // Details about slow binder transactions during the startup. The definition
1807    // of a slow transaction is an implementation detail.
1808    repeated BinderTransaction long_binder_transactions = 14;
1809
1810    // Did we ask the zygote for a new process
1811    optional bool zygote_new_process = 4;
1812
1813    // Number of processes hosting the activity involved in the launch.
1814    // This will usually be 1. If it is 0, it is indicative of a data / process
1815    // error. If > 1, the process died during startup and the system respawned
1816    // it.
1817    optional uint32 activity_hosting_process_count = 6;
1818
1819    // Contains timestamps of important events which happened during
1820    // the startup.
1821    optional EventTimestamps event_timestamps = 13;
1822
1823    // Timing information spanning the intent received by the
1824    // activity manager to the first frame drawn.
1825    optional ToFirstFrame to_first_frame = 5;
1826
1827    // Details about the process (uid, version, etc)
1828    optional AndroidProcessMetadata process = 7;
1829
1830    // Metrics about startup which were developed by looking at experiments
1831    // using high-speed cameras (HSC).
1832    optional HscMetrics hsc = 8;
1833
1834    // The time taken in the startup from intent received to the start time
1835    // of the reportFullyDrawn slice. This should be longer than the time to
1836    // first frame as the application decides this after it starts rendering.
1837    optional Slice report_fully_drawn = 9;
1838
1839    // Contains information about the status of odex files.
1840    repeated OptimizationStatus optimization_status = 12;
1841
1842    // Contains information about the class verification.
1843    repeated VerifyClass verify_class = 19;
1844
1845    // Contains the dlopen file names.
1846    repeated string dlopen_file = 20;
1847
1848    // Package name of startups running concurrent to the launch.
1849    repeated string startup_concurrent_to_launch = 18;
1850
1851    // Contains information about the state of the rest of the system during the
1852    // startup. This is useful for getting context about why a startup might
1853    // be slow beyond just what the app is doing.
1854    optional SystemState system_state = 15;
1855
1856    // A list of identified potential causes for slow startup.
1857    // Optional.
1858    repeated string slow_start_reason = 17;
1859
1860    reserved 10;
1861  }
1862
1863  repeated Startup startup = 1;
1864}
1865
1866// End of protos/perfetto/metrics/android/startup_metric.proto
1867
1868// Begin of protos/perfetto/metrics/android/surfaceflinger.proto
1869
1870message AndroidSurfaceflingerMetric {
1871  // Counts the number of missed frames in the trace.
1872  optional uint32 missed_frames = 1;
1873
1874  // Counts the number of missed HWC frames in the trace.
1875  optional uint32 missed_hwc_frames = 2;
1876
1877  // Counts the number of missed GPU frames in the trace.
1878  optional uint32 missed_gpu_frames = 3;
1879
1880  // Calculate the number of missed frames divided by
1881  // total frames
1882  optional double missed_frame_rate = 4;
1883
1884  // Calculate the number of missed HWC frames divided by
1885  // total HWC frames
1886  optional double missed_hwc_frame_rate = 5;
1887
1888  // Calculate the number of missed GPU frames divided by
1889  // total GPU frames
1890  optional double missed_gpu_frame_rate = 6;
1891
1892  // Count the number of times SurfaceFlinger needs to invoke GPU
1893  // for rendering some layers
1894  optional uint32 gpu_invocations = 7;
1895
1896  // Calculate the average duration of GPU request by SurfaceFlinger
1897  // since it enters the FenceMonitor's queue until it gets completed
1898  optional double avg_gpu_waiting_dur_ms = 8;
1899
1900  // Calculate the total duration when there is at least one GPU request
1901  // by SurfaceFlinger that is still waiting for GPU to complete the
1902  // request.
1903  // This also equals to the total duration of
1904  // "waiting for GPU completion <fence_num>" in SurfaceFlinger.
1905  optional double total_non_empty_gpu_waiting_dur_ms = 9;
1906
1907  message MetricsPerDisplay {
1908    // Display ID in SF
1909    optional string display_id = 1;
1910
1911    // Counts the number of missed frames in the trace.
1912    optional uint32 missed_frames = 2;
1913
1914    // Counts the number of missed HWC frames in the trace.
1915    optional uint32 missed_hwc_frames = 3;
1916
1917    // Counts the number of missed GPU frames in the trace.
1918    optional uint32 missed_gpu_frames = 4;
1919
1920    // Calculate the number of missed frames divided by
1921    // total frames
1922    optional double missed_frame_rate = 5;
1923
1924    // Calculate the number of missed HWC frames divided by
1925    // total HWC frames
1926    optional double missed_hwc_frame_rate = 6;
1927
1928    // Calculate the number of missed GPU frames divided by
1929    // total GPU frames
1930    optional double missed_gpu_frame_rate = 7;
1931  }
1932
1933  repeated MetricsPerDisplay metrics_per_display = 10;
1934}
1935
1936// End of protos/perfetto/metrics/android/surfaceflinger.proto
1937
1938// Begin of protos/perfetto/metrics/android/task_names.proto
1939
1940message AndroidTaskNames {
1941  message Process {
1942    optional int64 pid = 1;
1943
1944    // Process name.
1945    optional string process_name = 2;
1946
1947    // Names of all threads for this process.
1948    repeated string thread_name = 3;
1949
1950    // User id under which this process runs.
1951    optional int64 uid = 4;
1952
1953    // Packages matching the process uid.
1954    repeated string uid_package_name = 5;
1955  }
1956
1957  repeated Process process = 1;
1958}
1959
1960// End of protos/perfetto/metrics/android/task_names.proto
1961
1962// Begin of protos/perfetto/metrics/android/trace_quality.proto
1963
1964// Metric which checks the data in the trace processor tables is "reasonble"
1965// (i.e. we would expect to see it from a real device).
1966//
1967// This is useful to reject traces which may be valid (so no stat would be
1968// recorded) but a human would find the trace nonsensical.
1969message AndroidTraceQualityMetric {
1970  message Failure {
1971    // The name of the failed check.
1972    optional string name = 1;
1973  }
1974  repeated Failure failures = 1;
1975}
1976// End of protos/perfetto/metrics/android/trace_quality.proto
1977
1978// Begin of protos/perfetto/metrics/android/unsymbolized_frames.proto
1979
1980message UnsymbolizedFrames {
1981  message Frame {
1982    optional string module = 1;
1983    optional string build_id = 2;
1984    optional int64 address = 3;
1985
1986    // In some cases (Chrome/Webview) the ID that should be used to query
1987    // symbols in Google's internal tera-scale symbolization service is !=
1988    // `build_id` and requires some mangling.
1989    // This field is == 'build_id` for non-chromium cases, and is the breakpad
1990    // module ID (with lowercase hex digics) for chromium cases.
1991    optional string google_lookup_id = 4;
1992  }
1993
1994  repeated Frame frames = 1;
1995}
1996
1997// End of protos/perfetto/metrics/android/unsymbolized_frames.proto
1998
1999// Begin of protos/perfetto/metrics/metrics.proto
2000
2001// Trace processor metadata
2002message TraceMetadata {
2003  reserved 1;
2004  optional int64 trace_duration_ns = 2;
2005  optional string trace_uuid = 3;
2006  optional string android_build_fingerprint = 4;
2007  optional int64 statsd_triggering_subscription_id = 5;
2008  optional int64 trace_size_bytes = 6;
2009  repeated string trace_trigger = 7;
2010  optional string unique_session_name = 8;
2011  optional string trace_config_pbtxt = 9;
2012  optional int64 sched_duration_ns = 10;
2013}
2014
2015// Stats counters for the trace.
2016// Defined in src/trace_processor/storage/stats.h
2017message TraceAnalysisStats {
2018  enum Severity {
2019    SEVERITY_UNKNOWN = 0;
2020    SEVERITY_INFO = 1;
2021    SEVERITY_DATA_LOSS = 2;
2022    SEVERITY_ERROR = 3;
2023  }
2024
2025  enum Source {
2026    SOURCE_UNKNOWN = 0;
2027    SOURCE_TRACE = 1;
2028    SOURCE_ANALYSIS = 2;
2029  }
2030
2031  message Stat {
2032    optional string name = 1;
2033    optional uint32 idx = 2;
2034    optional Severity severity = 3;
2035    optional Source source = 4;
2036
2037    optional int64 count = 5;
2038  }
2039
2040  repeated Stat stat = 1;
2041}
2042
2043// Root message for all Perfetto-based metrics.
2044//
2045// Next id: 50
2046message TraceMetrics {
2047  reserved 4, 10, 13, 14, 16, 19;
2048
2049  // Battery counters metric on Android.
2050  optional AndroidBatteryMetric android_batt = 5;
2051
2052  // CPU usage per trace, process and thread.
2053  optional AndroidCpuMetric android_cpu = 6;
2054
2055  // Memory metrics on Android (owned by the Android Telemetry team).
2056  optional AndroidMemoryMetric android_mem = 1;
2057
2058  // Memory metrics on Android in unaggregated form. (owned by the Android
2059  // Telemetry team).
2060  // Note: this generates a lot of data so should not be requested unless it
2061  // is clear that this data is necessary.
2062  optional AndroidMemoryUnaggregatedMetric android_mem_unagg = 11;
2063
2064  // Package list.
2065  optional AndroidPackageList android_package_list = 12;
2066
2067  // ion buffer memory metrics.
2068  optional AndroidIonMetric android_ion = 9;
2069
2070  // fastrpc subsystem memory metrics.
2071  optional AndroidFastrpcMetric android_fastrpc = 31;
2072
2073  // Statistics about low memory kills.
2074  optional AndroidLmkMetric android_lmk = 8;
2075
2076  // Power Rails metrics on Android.
2077  optional AndroidPowerRails android_powrails = 7;
2078
2079  // Startup metrics on Android (owned by the Android Telemetry team).
2080  optional AndroidStartupMetric android_startup = 2;
2081
2082  // Trace metadata (applicable to all traces).
2083  optional TraceMetadata trace_metadata = 3;
2084
2085  // Trace stats (applicable to all traces).
2086  optional TraceAnalysisStats trace_stats = 33;
2087
2088  // Returns stack frames missing symbols.
2089  optional UnsymbolizedFrames unsymbolized_frames = 15;
2090
2091  // If the trace contains a heap graph, output allocation statistics.
2092  optional JavaHeapStats java_heap_stats = 17;
2093
2094  // If the trace contains a heap graph, output histogram.
2095  optional JavaHeapHistogram java_heap_histogram = 21;
2096
2097  // Metrics used to find potential culprits of low-memory kills.
2098  optional AndroidLmkReasonMetric android_lmk_reason = 18;
2099
2100  optional AndroidHwuiMetric android_hwui_metric = 20;
2101
2102  optional AndroidDisplayMetrics display_metrics = 22;
2103
2104  optional AndroidTaskNames android_task_names = 23;
2105
2106  // Deprecated was AndroidThreadTimeInStateMetric
2107  reserved 24;
2108
2109  // Metric associated with surfaceflinger.
2110  optional AndroidSurfaceflingerMetric android_surfaceflinger = 25;
2111
2112  // GPU metrics on Android.
2113  optional AndroidGpuMetric android_gpu = 26;
2114
2115  // Deprecated AndroidSysUiCujMetrics.
2116  reserved 27;
2117
2118  // Interaction and frame timings for CUJs (important UI transitions).
2119  optional AndroidJankCujMetric android_jank_cuj = 48;
2120
2121  // Metric associated with hwcomposer.
2122  optional AndroidHwcomposerMetrics android_hwcomposer = 28;
2123
2124  // Deprecated was AndroidJankMetrics;
2125  reserved 29;
2126
2127  // G2D metrics.
2128  optional G2dMetrics g2d = 30;
2129
2130  // Dmabuf heap metrics.
2131  optional AndroidDmaHeapMetric android_dma_heap = 32;
2132
2133  // Metric to verify the quality of the trace.
2134  optional AndroidTraceQualityMetric android_trace_quality = 34;
2135
2136  // Profiler smaps
2137  optional ProfilerSmaps profiler_smaps = 35;
2138
2139  // Multiuser - metrics for switching users.
2140  optional AndroidMultiuserMetric android_multiuser = 36;
2141
2142  // Metrics related to simpleperf tool
2143  optional AndroidSimpleperfMetric android_simpleperf = 37;
2144
2145  // Metrics for the Camera team.
2146  optional AndroidCameraMetric android_camera = 38;
2147
2148  // Metrics for dynamic voltage and frequency scaling.
2149  optional AndroidDvfsMetric android_dvfs = 39;
2150
2151  // Metrics for network performance.
2152  optional AndroidNetworkMetric android_netperf = 40;
2153
2154  // Metrics for the Camera team.
2155  // Note: this generates a lot of data so should not be requested unless it
2156  // is clear that this data is necessary.
2157  optional AndroidCameraUnaggregatedMetric android_camera_unagg = 41;
2158
2159  // Metrics for RT runtime.
2160  optional AndroidRtRuntimeMetric android_rt_runtime = 42;
2161
2162  // Metrics for IRQ runtime.
2163  optional AndroidIrqRuntimeMetric android_irq_runtime = 43;
2164
2165  // Metrics for the Trusty team.
2166  optional AndroidTrustyWorkqueues android_trusty_workqueues = 44;
2167
2168  // Summary of other concurrent trace recording.
2169  optional AndroidOtherTracesMetric android_other_traces = 45;
2170
2171  // Per-process Binder transaction metrics.
2172  optional AndroidBinderMetric android_binder = 46;
2173
2174  // Metrics for app deadline missed.
2175  optional AndroidFrameTimelineMetric android_frame_timeline_metric = 47;
2176
2177  // Blocking calls (e.g. binder calls) for CUJs (important UI transitions).
2178  optional AndroidBlockingCallsCujMetric android_blocking_calls_cuj_metric = 49;
2179
2180  optional AndroidMonitorContentionMetric android_monitor_contention = 50;
2181
2182  // Demo extensions.
2183  extensions 450 to 499;
2184
2185  // Vendor extensions.
2186  extensions 500 to 1000;
2187
2188  // Chrome metrics.
2189  extensions 1001 to 2000;
2190
2191  // WebView metrics.
2192  extensions 2001 to 2500;
2193}
2194
2195// End of protos/perfetto/metrics/metrics.proto
2196