| // AUTOGENERATED - DO NOT EDIT |
| // --------------------------- |
| // This file has been generated by |
| // AOSP://external/perfetto/tools/gen_merged_protos |
| // merging the perfetto config protos. |
| // This fused proto is intended to be copied in: |
| // - Android tree, for statsd. |
| // - Google internal repos. |
| |
| syntax = "proto2"; |
| |
| package perfetto.protos; |
| |
| // Begin of protos/perfetto/metrics/android/batt_metric.proto |
| |
| message AndroidBatteryMetric { |
| message BatteryCounters { |
| // Timestamp measured from boot time [ns]. |
| optional int64 timestamp_ns = 1; |
| // Fields 2-5 are the same as in BatteryCounters proto in TracePacket. |
| optional double charge_counter_uah = 2; |
| optional float capacity_percent = 3; |
| optional double current_ua = 4; |
| optional double current_avg_ua = 5; |
| } |
| |
| message BatteryAggregates { |
| // Field numbers for these 3 == the int values from Android |
| optional int64 total_screen_off_ns = 1; |
| optional int64 total_screen_on_ns = 2; |
| optional int64 total_screen_doze_ns = 3; |
| // Total time a wakelock was held |
| optional int64 total_wakelock_ns = 4; |
| // Amount of time the device was suspended. Depends on the ftrace source |
| // "power/suspend_resume". |
| optional int64 sleep_ns = 5; |
| optional int64 sleep_screen_off_ns = 6; |
| optional int64 sleep_screen_on_ns = 7; |
| optional int64 sleep_screen_doze_ns = 8; |
| } |
| |
| // Period of time during the trace that the device went to sleep completely. |
| message SuspendPeriod { |
| optional int64 timestamp_ns = 1; |
| optional int64 duration_ns = 2; |
| } |
| |
| // Battery counters info for each ts of the trace. This should only be |
| // extracted for short traces. |
| repeated BatteryCounters battery_counters = 1; |
| |
| optional BatteryAggregates battery_aggregates = 2; |
| |
| repeated SuspendPeriod suspend_period = 3; |
| } |
| |
| // End of protos/perfetto/metrics/android/batt_metric.proto |
| |
| // Begin of protos/perfetto/metrics/android/cpu_metric.proto |
| |
| message AndroidCpuMetric { |
| // Next id: 6 |
| message Metrics { |
| // CPU megacycles (i.e. cycles divided by 1e6). |
| optional int64 mcycles = 1; |
| |
| // Total time the thread was running for this breakdown in |
| // nanoseconds. |
| optional int64 runtime_ns = 2; |
| |
| // Min/max/average CPU frequency weighted by the time the CPU was |
| // running at each frequency in this breakdown. |
| optional int64 min_freq_khz = 3; |
| optional int64 max_freq_khz = 4; |
| optional int64 avg_freq_khz = 5; |
| } |
| |
| // Next id: 7 |
| message CoreData { |
| optional uint32 id = 1; |
| optional Metrics metrics = 6; |
| |
| reserved 2 to 5; |
| } |
| |
| // Next id: 3 |
| message CoreTypeData { |
| optional string type = 1; |
| optional Metrics metrics = 2; |
| } |
| |
| // Next id: 7 |
| message Thread { |
| optional string name = 1; |
| optional Metrics metrics = 4; |
| |
| // Breakdowns of above metrics. |
| repeated CoreData core = 2; |
| repeated CoreTypeData core_type = 5; |
| |
| reserved 3; |
| } |
| |
| // Next id: 8 |
| message Process { |
| optional string name = 1; |
| optional Metrics metrics = 4; |
| |
| // Breakdowns of above metrics. |
| repeated Thread threads = 6; |
| repeated CoreData core = 7; |
| repeated CoreTypeData core_type = 5; |
| |
| reserved 3; |
| } |
| |
| repeated Process process_info = 1; |
| } |
| |
| // End of protos/perfetto/metrics/android/cpu_metric.proto |
| |
| // Begin of protos/perfetto/metrics/android/display_metrics.proto |
| |
| message AndroidDisplayMetrics { |
| // Stat that reports the number of duplicate frames submitted |
| // to the display for rendering. That is frames that have the same |
| // pixels values but where still submitted. It is tracked based on |
| // comparing the MISR of the current frame vs previous frame. |
| optional uint32 total_duplicate_frames = 1; |
| |
| // Stat reports whether there is any duplicate_frames tracked |
| optional uint32 duplicate_frames_logged = 2; |
| |
| // Stat that reports the number of dpu underrrun occurs count. |
| optional uint32 total_dpu_underrun_count = 3; |
| |
| |
| message RefreshRateStat { |
| // The refresh rate value (the number of frames per second) |
| optional uint32 refresh_rate_fps = 1; |
| |
| // Calculate the number of refresh rate switches to this fps |
| optional uint32 count = 2; |
| |
| // Calculate the total duration of refresh rate stays at this fps |
| optional double total_dur_ms = 3; |
| |
| // Calculate the average duration of refresh rate stays at this fps |
| optional double avg_dur_ms = 4; |
| } |
| |
| // Calculate the total number of refresh rate changes |
| optional uint32 refresh_rate_switches = 4; |
| |
| // The statistics for each refresh rate value |
| repeated RefreshRateStat refresh_rate_stats = 5; |
| } |
| |
| // End of protos/perfetto/metrics/android/display_metrics.proto |
| |
| // Begin of protos/perfetto/metrics/android/dma_heap_metric.proto |
| |
| // dma-buf heap memory stats on Android. |
| message AndroidDmaHeapMetric { |
| optional double avg_size_bytes = 1; |
| optional double min_size_bytes = 2; |
| optional double max_size_bytes = 3; |
| |
| // Total allocation size. |
| // Essentially the sum of positive allocs. |
| optional double total_alloc_size_bytes = 4; |
| } |
| |
| // End of protos/perfetto/metrics/android/dma_heap_metric.proto |
| |
| // Begin of protos/perfetto/metrics/android/fastrpc_metric.proto |
| |
| // fastrpc memory stats on Android. |
| message AndroidFastrpcMetric { |
| message Subsystem { |
| optional string name = 1; |
| optional double avg_size_bytes = 2; |
| optional double min_size_bytes = 3; |
| optional double max_size_bytes = 4; |
| |
| // Total allocation size. |
| // Essentially the sum of positive allocs. |
| optional double total_alloc_size_bytes = 5; |
| } |
| |
| repeated Subsystem subsystem = 1; |
| } |
| |
| // End of protos/perfetto/metrics/android/fastrpc_metric.proto |
| |
| // Begin of protos/perfetto/metrics/android/g2d_metric.proto |
| |
| message G2dMetrics { |
| message G2dInstance { |
| // G2d name. |
| optional string name = 1; |
| |
| optional int64 max_dur_ns = 2; |
| optional int64 min_dur_ns = 3; |
| optional int64 avg_dur_ns = 4; |
| optional uint32 frame_count = 5; |
| optional uint32 error_count = 6; |
| } |
| message G2dMetric { |
| // G2D Metric for each G2D Instance. |
| repeated G2dInstance instances = 1; |
| |
| // max/min/avg G2d frame durations for all instances. |
| optional int64 max_dur_ns = 2; |
| optional int64 min_dur_ns = 3; |
| optional int64 avg_dur_ns = 4; |
| |
| // the number of frames processed by G2D |
| optional uint32 frame_count = 5; |
| // the number of error events |
| optional uint32 error_count = 6; |
| } |
| |
| optional G2dMetric g2d_hw = 1; |
| optional G2dMetric g2d_sw = 2; |
| } |
| |
| // End of protos/perfetto/metrics/android/g2d_metric.proto |
| |
| // Begin of protos/perfetto/metrics/android/gpu_metric.proto |
| |
| message AndroidGpuMetric { |
| message Process { |
| // Process name. |
| optional string name = 1; |
| |
| // max/min/avg GPU memory used by this process. |
| optional int64 mem_max = 2; |
| optional int64 mem_min = 3; |
| optional int64 mem_avg = 4; |
| } |
| |
| // GPU metric for processes using GPU. |
| repeated Process processes = 1; |
| |
| // max/min/avg GPU memory used by the entire system. |
| optional int64 mem_max = 2; |
| optional int64 mem_min = 3; |
| optional int64 mem_avg = 4; |
| } |
| |
| // End of protos/perfetto/metrics/android/gpu_metric.proto |
| |
| // Begin of protos/perfetto/metrics/android/hwcomposer.proto |
| |
| message AndroidHwcomposerMetrics { |
| // Counts the number of composition total layers in the trace. (non-weighted average) |
| optional double composition_total_layers = 1; |
| |
| // Counts the number of composition dpu layers in the trace. (non-weighted average) |
| optional double composition_dpu_layers = 2; |
| |
| // Counts the number of composition gpu layers in the trace. (non-weighted average) |
| optional double composition_gpu_layers = 3; |
| |
| // Counts the number of composition dpu cached layers in the trace. (non-weighted average) |
| optional double composition_dpu_cached_layers = 4; |
| |
| // Counts the number of composition surfaceflinger cached layers in the trace. |
| // (non-weighted average) |
| optional double composition_sf_cached_layers = 5; |
| |
| // Counts how many times validateDisplay is skipped. |
| optional int32 skipped_validation_count = 6; |
| |
| // Counts how many times validateDisplay cannot be skipped. |
| optional int32 unskipped_validation_count = 7; |
| |
| // Counts how many times validateDisplay is already separated from presentDisplay |
| // since the beginning. |
| optional int32 separated_validation_count = 8; |
| |
| // Counts how many unhandled validation cases which might be caused by errors. |
| optional int32 unknown_validation_count = 9; |
| |
| // the average of overall hwcomposer execution time. |
| optional double avg_all_execution_time_ms = 10; |
| |
| // the average of hwcomposer execution time for skipped validation cases. |
| optional double avg_skipped_execution_time_ms = 11; |
| |
| // the average of hwcomposer execution time for unskipped validation cases. |
| optional double avg_unskipped_execution_time_ms = 12; |
| |
| // the average of hwcomposer execution time for separated validation cases. |
| optional double avg_separated_execution_time_ms = 13; |
| } |
| |
| // End of protos/perfetto/metrics/android/hwcomposer.proto |
| |
| // Begin of protos/perfetto/metrics/android/hwui_metric.proto |
| |
| // Android HWUI graphics performance and graphics memory usage metrics. |
| message ProcessRenderInfo { |
| // Name of the package launched |
| optional string process_name = 1; |
| |
| // CPU time spent on RenderThread in milliseconds. |
| optional int64 rt_cpu_time_ms = 2; |
| |
| // Number of frames drawn on RenderThread, followed by max/min/avg CPU time to draw a frame |
| // in nanoseconds. |
| optional uint32 draw_frame_count = 3; |
| optional int64 draw_frame_max = 4; |
| optional int64 draw_frame_min = 5; |
| optional double draw_frame_avg = 6; |
| |
| // Number of GPU commands flushes and max/min/avg time per flush in nanoseconds. |
| optional uint32 flush_count = 7; |
| optional int64 flush_max = 8; |
| optional int64 flush_min = 9; |
| optional double flush_avg = 10; |
| |
| // Number of View tree preparation counts and max/min/avg time to traverse the tree in |
| // nanoseconds. |
| optional uint32 prepare_tree_count = 11; |
| optional int64 prepare_tree_max = 12; |
| optional int64 prepare_tree_min = 13; |
| optional double prepare_tree_avg = 14; |
| |
| // Number of times the GPU rendered a frame and max/min/avg time for GPU to finish rendering in |
| // in nanoseconds. |
| optional uint32 gpu_completion_count = 15; |
| optional int64 gpu_completion_max = 16; |
| optional int64 gpu_completion_min = 17; |
| optional double gpu_completion_avg = 18; |
| |
| // Number of times a frame was recorded/serialized in a display list on the UI thread with |
| // max/min/avg time in nanoseconds. |
| optional uint32 ui_record_count = 19; |
| optional int64 ui_record_max = 20; |
| optional int64 ui_record_min = 21; |
| optional double ui_record_avg = 22; |
| |
| // number of unique shader programs that were used to render frames, followed by total and average |
| // times to prepare a shader in nanoseconds. |
| optional uint32 shader_compile_count = 23; |
| optional int64 shader_compile_time = 24; |
| optional double shader_compile_avg = 25; |
| // number of shader programs loaded from the disk cache, followed by total time and average time |
| // to prepare a shader in nanoseconds. |
| optional uint32 cache_hit_count = 26; |
| optional int64 cache_hit_time = 27; |
| optional double cache_hit_avg = 28; |
| // number of shader programs compiled/linked, followed by total time and average time to prepare |
| // a shader in nanoseconds. |
| optional uint32 cache_miss_count = 29; |
| optional int64 cache_miss_time = 30; |
| optional double cache_miss_avg = 31; |
| |
| // max/min/avg CPU memory used for graphics by HWUI at the end of a frame. |
| optional int64 graphics_cpu_mem_max = 32; |
| optional int64 graphics_cpu_mem_min = 33; |
| optional double graphics_cpu_mem_avg = 34; |
| |
| // max/min/avg GPU memory used by HWUI at the end of a frame excluding textures. |
| optional int64 graphics_gpu_mem_max = 35; |
| optional int64 graphics_gpu_mem_min = 36; |
| optional double graphics_gpu_mem_avg = 37; |
| |
| // max/min/avg memory used for GPU textures by HWUI at the end of a frame. |
| optional int64 texture_mem_max = 38; |
| optional int64 texture_mem_min = 39; |
| optional double texture_mem_avg = 40; |
| |
| // max/min/avg memory used by HWUI at the end of a frame. This is a sum of previous 3 categories. |
| optional int64 all_mem_max = 41; |
| optional int64 all_mem_min = 42; |
| optional double all_mem_avg = 43; |
| } |
| |
| message AndroidHwuiMetric { |
| // HWUI metrics for processes that have a RenderThread. |
| repeated ProcessRenderInfo process_info = 1; |
| } |
| |
| // End of protos/perfetto/metrics/android/hwui_metric.proto |
| |
| // Begin of protos/perfetto/metrics/android/ion_metric.proto |
| |
| // ion memory stats on Android. |
| message AndroidIonMetric { |
| message Buffer { |
| optional string name = 1; |
| optional double avg_size_bytes = 2; |
| optional double min_size_bytes = 3; |
| optional double max_size_bytes = 4; |
| |
| // Total allocation size. |
| // Essentially the sum of positive allocs (-> new buffers). |
| optional double total_alloc_size_bytes = 5; |
| } |
| |
| repeated Buffer buffer = 1; |
| } |
| |
| // End of protos/perfetto/metrics/android/ion_metric.proto |
| |
| // Begin of protos/perfetto/metrics/android/jank_metric.proto |
| |
| message AndroidJankMetrics { |
| repeated Warning warnings = 1; |
| |
| message Warning { |
| optional int64 ts = 1; |
| optional int64 dur = 2; |
| |
| optional string process_name = 3; |
| optional string warning_text = 4; |
| } |
| } |
| // End of protos/perfetto/metrics/android/jank_metric.proto |
| |
| // Begin of protos/perfetto/metrics/android/process_metadata.proto |
| |
| message AndroidProcessMetadata { |
| // Process name. Usually, cmdline or <package_name>(:<custom_name>)?. |
| optional string name = 1; |
| |
| // User id under which this process runs. |
| optional int64 uid = 2; |
| |
| // Package metadata from Android package list. |
| message Package { |
| optional string package_name = 1; |
| optional int64 apk_version_code = 2; |
| optional bool debuggable = 3; |
| } |
| |
| // Package that this process belongs to. |
| // |
| // If this process shares its uid (see `packages_for_uid` field), the package |
| // is determined based on the process name and package name. If there is no |
| // match this field is empty. |
| optional Package package = 7; |
| |
| // All packages using this uid. |
| // |
| // Shared uid documentation: |
| // https://developer.android.com/guide/topics/manifest/manifest-element#uid |
| repeated Package packages_for_uid = 8; |
| |
| reserved 3, 4, 5, 6; |
| } |
| |
| // End of protos/perfetto/metrics/android/process_metadata.proto |
| |
| // Begin of protos/perfetto/metrics/android/java_heap_histogram.proto |
| |
| message JavaHeapHistogram { |
| // Next id: 5 |
| message TypeCount { |
| optional string type_name = 1; |
| optional string category = 4; |
| |
| optional uint32 obj_count = 2; |
| optional uint32 reachable_obj_count = 3; |
| } |
| |
| message Sample { |
| optional int64 ts = 1; |
| repeated TypeCount type_count = 2; |
| } |
| |
| // Heap stats per process. One sample per dump (with continuous dump you can |
| // have more samples differentiated by ts). |
| message InstanceStats { |
| optional uint32 upid = 1; |
| optional AndroidProcessMetadata process = 2; |
| repeated Sample samples = 3; |
| } |
| |
| repeated InstanceStats instance_stats = 1; |
| } |
| |
| // End of protos/perfetto/metrics/android/java_heap_histogram.proto |
| |
| // Begin of protos/perfetto/metrics/android/java_heap_stats.proto |
| |
| message JavaHeapStats { |
| message HeapRoots { |
| optional string root_type = 1; |
| optional string type_name = 2; |
| optional int64 obj_count = 3; |
| } |
| |
| // Next id: 7 |
| message Sample { |
| optional int64 ts = 1; |
| // Size of the Java heap in bytes |
| optional int64 heap_size = 2; |
| optional int64 obj_count = 4; |
| // Size of the reachable objects in bytes. |
| optional int64 reachable_heap_size = 3; |
| optional int64 reachable_obj_count = 5; |
| // Sum of anonymous RSS + swap pages in bytes. |
| optional int64 anon_rss_and_swap_size = 6; |
| |
| // ART root objects |
| repeated HeapRoots roots = 7; |
| } |
| |
| // Heap stats per process. One sample per dump (can be > 1 if continuous |
| // dump is enabled). |
| message InstanceStats { |
| optional uint32 upid = 1; |
| optional AndroidProcessMetadata process = 2; |
| repeated Sample samples = 3; |
| } |
| |
| repeated InstanceStats instance_stats = 1; |
| } |
| |
| // End of protos/perfetto/metrics/android/java_heap_stats.proto |
| |
| // Begin of protos/perfetto/metrics/android/lmk_metric.proto |
| |
| // LMK stats on Android. |
| message AndroidLmkMetric { |
| message ByOomScore { |
| optional int32 oom_score_adj = 1; |
| optional int32 count = 2; |
| } |
| |
| // Total count of LMK events observed in the trace. |
| optional int32 total_count = 1; |
| repeated ByOomScore by_oom_score = 2; |
| |
| // OOM reaper kills. Enabled via the oom/mark_victim point. Should never |
| // happen. |
| optional int32 oom_victim_count = 3; |
| } |
| |
| // End of protos/perfetto/metrics/android/lmk_metric.proto |
| |
| // Begin of protos/perfetto/metrics/android/lmk_reason_metric.proto |
| |
| // Global process state at LMK time, used to identify potential culprits. |
| // TODO: rename to AndroidLmkProcessState |
| message AndroidLmkReasonMetric { |
| message Process { |
| optional AndroidProcessMetadata process = 1; |
| |
| // OOM score adj of the process. |
| optional int32 oom_score_adj = 2; |
| |
| // RSS + swap. |
| optional int64 size = 3; |
| |
| optional int64 file_rss_bytes = 4; |
| optional int64 anon_rss_bytes = 5; |
| optional int64 shmem_rss_bytes = 6; |
| optional int64 swap_bytes = 7; |
| } |
| message Lmk { |
| // OOM score adj of the LMK'ed process. |
| optional int32 oom_score_adj = 1; |
| |
| // Total size of the ION heap in bytes during this LMK. |
| optional int64 ion_heaps_bytes = 4; |
| // Deprecated. Prefer ion_heaps_bytes. |
| optional int64 system_ion_heap_size = 2; |
| |
| // Processes present during this LMK. |
| repeated Process processes = 3; |
| } |
| |
| // LMKs present in the trace, ordered on their timestamp. |
| repeated Lmk lmks = 1; |
| } |
| |
| // End of protos/perfetto/metrics/android/lmk_reason_metric.proto |
| |
| // Begin of protos/perfetto/metrics/android/mem_metric.proto |
| |
| // Memory metrics on Android. |
| message AndroidMemoryMetric { |
| message ProcessMetrics { |
| optional string process_name = 1; |
| optional ProcessMemoryCounters total_counters = 2; |
| repeated PriorityBreakdown priority_breakdown = 3; |
| } |
| |
| message PriorityBreakdown { |
| optional string priority = 1; |
| optional ProcessMemoryCounters counters = 2; |
| } |
| |
| message ProcessMemoryCounters { |
| optional Counter anon_rss = 1; |
| optional Counter file_rss = 2; |
| optional Counter swap = 3; |
| optional Counter anon_and_swap = 4; |
| |
| // Available when ART trace events are available. |
| optional Counter java_heap = 5; |
| } |
| |
| message Counter { |
| optional double min = 1; |
| optional double max = 2; |
| optional double avg = 3; |
| } |
| |
| // Process metrics, grouped by process name |
| repeated ProcessMetrics process_metrics = 1; |
| } |
| |
| // End of protos/perfetto/metrics/android/mem_metric.proto |
| |
| // Begin of protos/perfetto/metrics/android/mem_unagg_metric.proto |
| |
| // Unaggregated memory metrics on Android. |
| message AndroidMemoryUnaggregatedMetric { |
| message ProcessValues { |
| optional string process_name = 1; |
| optional ProcessMemoryValues mem_values = 2; |
| } |
| |
| message ProcessMemoryValues { |
| repeated Value anon_rss = 1; |
| repeated Value file_rss = 2; |
| repeated Value swap = 3; |
| repeated Value anon_and_swap = 4; |
| } |
| |
| message Value { |
| optional int64 ts = 1; |
| optional int32 oom_score = 2; |
| optional double value = 3; |
| } |
| |
| // Process metrics for every process instance in trace. |
| repeated ProcessValues process_values = 1; |
| } |
| |
| // End of protos/perfetto/metrics/android/mem_unagg_metric.proto |
| |
| // Begin of protos/perfetto/metrics/android/package_list.proto |
| |
| message AndroidPackageList { |
| message Package { |
| optional string package_name = 1; |
| optional int64 uid = 2; |
| optional int64 version_code = 3; |
| } |
| |
| repeated Package packages = 1; |
| } |
| |
| // End of protos/perfetto/metrics/android/package_list.proto |
| |
| // Begin of protos/perfetto/metrics/android/powrails_metric.proto |
| |
| message AndroidPowerRails { |
| // Energy data per Power Rail at given ts. |
| message EnergyData { |
| // Time since device boot(CLOCK_BOTTOMTIME) in milli-seconds. |
| optional int64 timestamp_ms = 1; |
| // Accumulated energy since device boot in microwatt-seconds(uws). |
| optional double energy_uws = 2; |
| } |
| |
| message PowerRails { |
| // Name of the rail. |
| optional string name = 1; |
| // Energy data for given rail and for all samples in the trace. |
| repeated EnergyData energy_data = 2; |
| } |
| |
| // Energy data per Power Rail. |
| repeated PowerRails power_rails = 1; |
| } |
| // End of protos/perfetto/metrics/android/powrails_metric.proto |
| |
| // Begin of protos/perfetto/metrics/android/startup_metric.proto |
| |
| // Android app startup metrics. |
| message AndroidStartupMetric { |
| // A simplified view of the task state durations for a thread |
| // and a span of time. |
| message TaskStateBreakdown { |
| optional int64 running_dur_ns = 1; |
| optional int64 runnable_dur_ns = 2; |
| optional int64 uninterruptible_sleep_dur_ns = 3; |
| optional int64 interruptible_sleep_dur_ns = 4; |
| } |
| |
| message McyclesByCoreType { |
| optional int64 little = 1; |
| optional int64 big = 2; |
| optional int64 bigger = 3; |
| optional int64 unknown = 4; |
| } |
| |
| message Slice { |
| optional int64 dur_ns = 1; |
| optional double dur_ms = 2; |
| } |
| |
| // Timing information spanning the intent received by the |
| // activity manager to the first frame drawn. |
| // Next id: 31. |
| message ToFirstFrame { |
| // The duration between the intent received and first frame. |
| optional int64 dur_ns = 1; |
| optional double dur_ms = 17; |
| |
| // Breakdown of time to first frame by task state for the main thread of |
| // the process starting up. |
| optional TaskStateBreakdown main_thread_by_task_state = 2; |
| |
| // The mcycles taken by this startup across all CPUs (broken down by core |
| // type). |
| optional McyclesByCoreType mcycles_by_core_type = 26; |
| |
| // In this timespan, how many processes (apart from the main activity) were |
| // spawned. |
| optional uint32 other_processes_spawned_count = 3; |
| |
| // Total time spent in activity manager between the initial intent |
| // and the end of the activity starter. |
| optional Slice time_activity_manager = 4; |
| |
| // The following slices follow the typical steps post-fork. |
| optional Slice time_activity_thread_main = 5; |
| optional Slice time_bind_application = 6; |
| optional Slice time_activity_start = 7; |
| optional Slice time_activity_resume = 8; |
| optional Slice time_activity_restart = 21; |
| optional Slice time_choreographer = 9; |
| optional Slice time_inflate = 22; |
| optional Slice time_get_resources = 23; |
| |
| // If we are starting a new process, record the duration from the |
| // intent being received to the time we call the zygote. |
| optional Slice time_before_start_process = 10; |
| |
| // The actual duration of the process start (based on the zygote slice). |
| optional Slice time_during_start_process = 11; |
| |
| optional Slice to_post_fork = 18; |
| optional Slice to_activity_thread_main = 19; |
| optional Slice to_bind_application = 20; |
| |
| optional Slice time_post_fork = 16; |
| |
| // The total time spent on opening dex files. |
| optional Slice time_dex_open = 24; |
| // Total time spent verifying classes during app startup. |
| optional Slice time_verify_class = 25; |
| |
| // Number of methods that were compiled by JIT during app startup. |
| optional uint32 jit_compiled_methods = 27; |
| |
| // Time spent running CPU on jit thread pool. |
| optional Slice time_jit_thread_pool_on_cpu = 28; |
| |
| // Time spent on garbage collection. |
| optional Slice time_gc_total = 29; |
| optional Slice time_gc_on_cpu = 30; |
| // Deprecated was other_process_to_activity_cpu_ratio |
| reserved 12; |
| |
| // Removed: was uint32 versions of to_post_fork, to_activity_thread_main and |
| // to_bind_application. |
| reserved 13, 14, 15; |
| } |
| |
| // Metrics about startup which were developed by looking at experiments using |
| // high-speed cameras (HSC). |
| message HscMetrics { |
| // The duration of the full "startup" as defined by HSC tests. |
| optional Slice full_startup = 1; |
| } |
| |
| message Activity { |
| optional string name = 1; |
| optional string method = 2; |
| optional int64 ts_method_start = 4; |
| |
| // Field 3 contained Slice with a sum of durations for matching slices. |
| reserved 3; |
| } |
| |
| message BinderTransaction { |
| optional Slice duration = 1; |
| optional string thread = 2; |
| } |
| |
| // Metrics with information about the status of odex files and the outcome |
| // of the loading process. |
| // Multiple files might be loaded for a single startup. Platform might also |
| // decide to discard an odex file and instead load a fallback, for example |
| // in case the OS or apk were updated. |
| message OptimizationStatus { |
| optional string odex_status = 1; |
| optional string compilation_filter = 2; |
| optional string compilation_reason = 3; |
| optional string location = 4; |
| } |
| |
| // Contains timestamps of important events which occurred during the |
| // startup. |
| message EventTimestamps { |
| optional int64 intent_received = 1; |
| optional int64 first_frame = 2; |
| } |
| |
| // Next id: 15 |
| message Startup { |
| // Random id uniquely identifying an app startup in this trace. |
| optional uint32 startup_id = 1; |
| |
| // Name of the package launched |
| optional string package_name = 2; |
| |
| // Name of the process launched |
| optional string process_name = 3; |
| |
| // Details about the activities launched |
| repeated Activity activities = 11; |
| |
| // Details about slow binder transactions during the startup. The definition |
| // of a slow transaction is an implementation detail. |
| repeated BinderTransaction long_binder_transactions = 14; |
| |
| // Did we ask the zygote for a new process |
| optional bool zygote_new_process = 4; |
| |
| // Number of processes hosting the activity involved in the launch. |
| // This will usually be 1. If it is 0, it is indicative of a data / process |
| // error. If > 1, the process died during startup and the system respawned |
| // it. |
| optional uint32 activity_hosting_process_count = 6; |
| |
| // Contains timestamps of important events which happened during |
| // the startup. |
| optional EventTimestamps event_timestamps = 13; |
| |
| // Timing information spanning the intent received by the |
| // activity manager to the first frame drawn. |
| optional ToFirstFrame to_first_frame = 5; |
| |
| // Details about the process (uid, version, etc) |
| optional AndroidProcessMetadata process = 7; |
| |
| // Metrics about startup which were developed by looking at experiments |
| // using high-speed cameras (HSC). |
| optional HscMetrics hsc = 8; |
| |
| // The time taken in the startup from intent recieved to the start time |
| // of the reportFullyDrawn slice. This should be longer than the time to |
| // first frame as the application decides this after it starts rendering. |
| optional Slice report_fully_drawn = 9; |
| |
| // Conntains information about the status of odex files. |
| repeated OptimizationStatus optimization_status = 12; |
| |
| reserved 10; |
| } |
| |
| repeated Startup startup = 1; |
| } |
| |
| // End of protos/perfetto/metrics/android/startup_metric.proto |
| |
| // Begin of protos/perfetto/metrics/android/surfaceflinger.proto |
| |
| message AndroidSurfaceflingerMetric { |
| // Counts the number of missed frames in the trace. |
| optional uint32 missed_frames = 1; |
| |
| // Counts the number of missed HWC frames in the trace. |
| optional uint32 missed_hwc_frames = 2; |
| |
| // Counts the number of missed GPU frames in the trace. |
| optional uint32 missed_gpu_frames = 3; |
| |
| // Calculate the number of missed frames divided by |
| // total frames |
| optional double missed_frame_rate = 4; |
| |
| // Calculate the number of missed HWC frames divided by |
| // total HWC frames |
| optional double missed_hwc_frame_rate = 5; |
| |
| // Calculate the number of missed GPU frames divided by |
| // total GPU frames |
| optional double missed_gpu_frame_rate = 6; |
| } |
| |
| // End of protos/perfetto/metrics/android/surfaceflinger.proto |
| |
| // Begin of protos/perfetto/metrics/android/sysui_cuj_metrics.proto |
| |
| // Metric that stores frame information and potential jank root causes |
| // for a single Android system UI interaction/user journey. |
| message AndroidSysUiCujMetrics { |
| // A list of all frames within the SysUi user journey. |
| repeated Frame frames = 1; |
| |
| optional string cuj_name = 2; |
| optional int64 cuj_start = 3; |
| optional int64 cuj_dur = 4; |
| |
| // Details about the process (uid, version, etc) |
| optional AndroidProcessMetadata process = 5; |
| |
| message Frame { |
| // Index of the frame within the single user journey. |
| optional int64 number = 1; |
| optional int64 vsync = 5; |
| optional int64 ts = 2; |
| optional int64 dur = 3; |
| |
| // A list of identified potential causes for jank. |
| // Optional. |
| repeated string jank_cause = 4; |
| } |
| } |
| |
| // End of protos/perfetto/metrics/android/sysui_cuj_metrics.proto |
| |
| // Begin of protos/perfetto/metrics/android/task_names.proto |
| |
| message AndroidTaskNames { |
| message Process { |
| optional int64 pid = 1; |
| |
| // Process name. |
| optional string process_name = 2; |
| |
| // Names of all threads for this process. |
| repeated string thread_name = 3; |
| |
| // User id under which this process runs. |
| optional int64 uid = 4; |
| |
| // Packages matching the process uid. |
| repeated string uid_package_name = 5; |
| } |
| |
| repeated Process process = 1; |
| } |
| |
| // End of protos/perfetto/metrics/android/task_names.proto |
| |
| // Begin of protos/perfetto/metrics/android/thread_time_in_state_metric.proto |
| |
| message AndroidThreadTimeInStateMetric { |
| message MetricsByCoreType { |
| optional int32 time_in_state_cpu = 5; |
| optional string core_type = 1; |
| |
| optional int64 runtime_ms = 2; |
| // CPU megacycles (i.e. cycles divided by 1e6). |
| optional int64 mcycles = 3; |
| // Power cost as predicted by the power profile. |
| optional double power_profile_mah = 4; |
| } |
| |
| message Thread { |
| optional string name = 1; |
| optional bool main_thread = 3; |
| repeated MetricsByCoreType metrics_by_core_type = 2; |
| } |
| |
| message Process { |
| optional AndroidProcessMetadata metadata = 1; |
| repeated MetricsByCoreType metrics_by_core_type = 2; |
| repeated Thread threads = 3; |
| } |
| |
| repeated Process processes = 1; |
| } |
| |
| // End of protos/perfetto/metrics/android/thread_time_in_state_metric.proto |
| |
| // Begin of protos/perfetto/metrics/android/unsymbolized_frames.proto |
| |
| message UnsymbolizedFrames { |
| message Frame { |
| optional string module = 1; |
| optional string build_id = 2; |
| optional int64 address = 3; |
| } |
| |
| repeated Frame frames = 1; |
| } |
| |
| // End of protos/perfetto/metrics/android/unsymbolized_frames.proto |
| |
| // Begin of protos/perfetto/metrics/metrics.proto |
| |
| // Trace processor metadata |
| message TraceMetadata { |
| reserved 1; |
| optional int64 trace_duration_ns = 2; |
| optional string trace_uuid = 3; |
| optional string android_build_fingerprint = 4; |
| optional int64 statsd_triggering_subscription_id = 5; |
| optional int64 trace_size_bytes = 6; |
| repeated string trace_trigger = 7; |
| optional string unique_session_name = 8; |
| optional string trace_config_pbtxt = 9; |
| optional int64 sched_duration_ns = 10; |
| } |
| |
| // Stats counters for the trace. |
| // Defined in src/trace_processor/storage/stats.h |
| message TraceAnalysisStats { |
| enum Severity { |
| SEVERITY_UNKNOWN = 0; |
| SEVERITY_INFO = 1; |
| SEVERITY_DATA_LOSS = 2; |
| SEVERITY_ERROR = 3; |
| } |
| |
| enum Source { |
| SOURCE_UNKNOWN = 0; |
| SOURCE_TRACE = 1; |
| SOURCE_ANALYSIS = 2; |
| } |
| |
| message Stat { |
| optional string name = 1; |
| optional uint32 idx = 2; |
| optional Severity severity = 3; |
| optional Source source = 4; |
| |
| optional int64 count = 5; |
| } |
| |
| repeated Stat stat = 1; |
| } |
| |
| // Root message for all Perfetto-based metrics. |
| // |
| // Next id: 34 |
| message TraceMetrics { |
| reserved 4, 10, 13, 14, 16, 19; |
| |
| // Battery counters metric on Android. |
| optional AndroidBatteryMetric android_batt = 5; |
| |
| // CPU usage per trace, process and thread. |
| optional AndroidCpuMetric android_cpu = 6; |
| |
| // Memory metrics on Android (owned by the Android Telemetry team). |
| optional AndroidMemoryMetric android_mem = 1; |
| |
| // Memory metrics on Android in unaggregated form. (owned by the Android |
| // Telemetry team). |
| // Note: this generates a lot of data so should not be requested unless it |
| // is clear that this data is necessary. |
| optional AndroidMemoryUnaggregatedMetric android_mem_unagg = 11; |
| |
| // Package list. |
| optional AndroidPackageList android_package_list = 12; |
| |
| // ion buffer memory metrics. |
| optional AndroidIonMetric android_ion = 9; |
| |
| // fastrpc subsystem memory metrics. |
| optional AndroidFastrpcMetric android_fastrpc = 31; |
| |
| // Statistics about low memory kills. |
| optional AndroidLmkMetric android_lmk = 8; |
| |
| // Power Rails metrics on Android. |
| optional AndroidPowerRails android_powrails = 7; |
| |
| // Startup metrics on Android (owned by the Android Telemetry team). |
| optional AndroidStartupMetric android_startup = 2; |
| |
| // Trace metadata (applicable to all traces). |
| optional TraceMetadata trace_metadata = 3; |
| |
| // Trace stats (applicable to all traces). |
| optional TraceAnalysisStats trace_stats = 33; |
| |
| // Returns stack frames missing symbols. |
| optional UnsymbolizedFrames unsymbolized_frames = 15; |
| |
| // If the trace contains a heap graph, output allocation statistics. |
| optional JavaHeapStats java_heap_stats = 17; |
| |
| // If the trace contains a heap graph, output histogram. |
| optional JavaHeapHistogram java_heap_histogram = 21; |
| |
| // Metrics used to find potential culprits of low-memory kills. |
| optional AndroidLmkReasonMetric android_lmk_reason = 18; |
| |
| optional AndroidHwuiMetric android_hwui_metric = 20; |
| |
| optional AndroidDisplayMetrics display_metrics = 22; |
| |
| optional AndroidTaskNames android_task_names = 23; |
| |
| optional AndroidThreadTimeInStateMetric android_thread_time_in_state = 24; |
| |
| // Metric associated with surfaceflinger. |
| optional AndroidSurfaceflingerMetric android_surfaceflinger = 25; |
| |
| // GPU metrics on Android. |
| optional AndroidGpuMetric android_gpu = 26; |
| |
| // Frame timing and jank root causes for system UI interactions. |
| optional AndroidSysUiCujMetrics android_sysui_cuj = 27; |
| |
| // Metric associated with hwcomposer. |
| optional AndroidHwcomposerMetrics android_hwcomposer = 28; |
| |
| // Detects common bad patterns that might lead to jank. |
| optional AndroidJankMetrics android_jank = 29; |
| |
| // G2D metrics. |
| optional G2dMetrics g2d = 30; |
| |
| // Dmabuf heap metrics. |
| optional AndroidDmaHeapMetric android_dma_heap = 32; |
| |
| // Demo extensions. |
| extensions 450 to 499; |
| |
| // Vendor extensions. |
| extensions 500 to 1000; |
| |
| // Chrome metrics. |
| extensions 1001 to 2000; |
| } |
| |
| // End of protos/perfetto/metrics/metrics.proto |