1/* 2 * Copyright (C) 2017 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"; 18option optimize_for = LITE_RUNTIME; 19 20import "frameworks/native/services/surfaceflinger/layerproto/layers.proto"; 21 22package android.surfaceflinger; 23 24/* represents a file full of surface flinger trace entries. 25 Encoded, it should start with 0x4c 0x59 0x52 0x54 0x52 0x41 0x43 0x45 (.LYRTRACE), such 26 that they can be easily identified. */ 27message LayersTraceFileProto { 28 29 /* constant; MAGIC_NUMBER = (long) MAGIC_NUMBER_H << 32 | MagicNumber.MAGIC_NUMBER_L 30 (this is needed because enums have to be 32 bits and there's no nice way to put 64bit 31 constants into .proto files. */ 32 enum MagicNumber { 33 INVALID = 0; 34 MAGIC_NUMBER_L = 0x5452594c; /* LYRT (little-endian ASCII) */ 35 MAGIC_NUMBER_H = 0x45434152; /* RACE (little-endian ASCII) */ 36 } 37 38 optional fixed64 magic_number = 1; /* Must be the first field, set to value in MagicNumber */ 39 repeated LayersTraceProto entry = 2; 40} 41 42/* one window manager trace entry. */ 43message LayersTraceProto { 44 /* required: elapsed realtime in nanos since boot of when this entry was logged */ 45 optional sfixed64 elapsed_realtime_nanos = 1; 46 47 /* where the trace originated */ 48 optional string where = 2; 49 50 optional LayersProto layers = 3; 51 52 // Blob for the current HWC information for all layers, reported by dumpsys. 53 optional string hwc_blob = 4; 54 55 /* Includes state sent during composition like visible region and composition type. */ 56 optional bool excludes_composition_state = 5; 57 58 /* Number of missed entries since the last entry was recorded. */ 59 optional uint32 missed_entries = 6; 60} 61