1/* 2 * Copyright (C) 2020 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17syntax = "proto2"; 18 19package perfetto.protos; 20 21// Android HWUI graphics performance and graphics memory usage metrics. 22message ProcessRenderInfo { 23 // Name of the package launched 24 optional string process_name = 1; 25 26 // CPU time spent on RenderThread in milliseconds. 27 optional int64 rt_cpu_time_ms = 2; 28 29 // Number of frames drawn on RenderThread, followed by max/min/avg CPU time to draw a frame 30 // in nanoseconds. 31 optional uint32 draw_frame_count = 3; 32 optional int64 draw_frame_max = 4; 33 optional int64 draw_frame_min = 5; 34 optional double draw_frame_avg = 6; 35 36 // Number of GPU commands flushes and max/min/avg time per flush in nanoseconds. 37 optional uint32 flush_count = 7; 38 optional int64 flush_max = 8; 39 optional int64 flush_min = 9; 40 optional double flush_avg = 10; 41 42 // Number of View tree preparation counts and max/min/avg time to traverse the tree in 43 // nanoseconds. 44 optional uint32 prepare_tree_count = 11; 45 optional int64 prepare_tree_max = 12; 46 optional int64 prepare_tree_min = 13; 47 optional double prepare_tree_avg = 14; 48 49 // Number of times the GPU rendered a frame and max/min/avg time for GPU to finish rendering in 50 // in nanoseconds. 51 optional uint32 gpu_completion_count = 15; 52 optional int64 gpu_completion_max = 16; 53 optional int64 gpu_completion_min = 17; 54 optional double gpu_completion_avg = 18; 55 56 // Number of times a frame was recorded/serialized in a display list on the UI thread with 57 // max/min/avg time in nanoseconds. 58 optional uint32 ui_record_count = 19; 59 optional int64 ui_record_max = 20; 60 optional int64 ui_record_min = 21; 61 optional double ui_record_avg = 22; 62 63 // number of unique shader programs that were used to render frames, followed by total and average 64 // times to prepare a shader in nanoseconds. 65 optional uint32 shader_compile_count = 23; 66 optional int64 shader_compile_time = 24; 67 optional double shader_compile_avg = 25; 68 // number of shader programs loaded from the disk cache, followed by total time and average time 69 // to prepare a shader in nanoseconds. 70 optional uint32 cache_hit_count = 26; 71 optional int64 cache_hit_time = 27; 72 optional double cache_hit_avg = 28; 73 // number of shader programs compiled/linked, followed by total time and average time to prepare 74 // a shader in nanoseconds. 75 optional uint32 cache_miss_count = 29; 76 optional int64 cache_miss_time = 30; 77 optional double cache_miss_avg = 31; 78 79 // max/min/avg CPU memory used for graphics by HWUI at the end of a frame. 80 optional int64 graphics_cpu_mem_max = 32; 81 optional int64 graphics_cpu_mem_min = 33; 82 optional double graphics_cpu_mem_avg = 34; 83 84 // max/min/avg GPU memory used by HWUI at the end of a frame excluding textures. 85 optional int64 graphics_gpu_mem_max = 35; 86 optional int64 graphics_gpu_mem_min = 36; 87 optional double graphics_gpu_mem_avg = 37; 88 89 // max/min/avg memory used for GPU textures by HWUI at the end of a frame. 90 optional int64 texture_mem_max = 38; 91 optional int64 texture_mem_min = 39; 92 optional double texture_mem_avg = 40; 93 94 // max/min/avg memory used by HWUI at the end of a frame. This is a sum of previous 3 categories. 95 optional int64 all_mem_max = 41; 96 optional int64 all_mem_min = 42; 97 optional double all_mem_avg = 43; 98} 99 100message AndroidHwuiMetric { 101 // HWUI metrics for processes that have a RenderThread. 102 repeated ProcessRenderInfo process_info = 1; 103} 104