1// The file format generated by report_sample.proto is as below: 2// LittleEndian32(record_size_0) 3// message Record(record_0) (having record_size_0 bytes) 4// LittleEndian32(record_size_1) 5// message Record(record_1) (having record_size_1 bytes) 6// ... 7// LittleEndian32(record_size_N) 8// message Record(record_N) (having record_size_N bytes) 9// LittleEndian32(0) 10 11syntax = "proto2"; 12option optimize_for = LITE_RUNTIME; 13package simpleperf_report_proto; 14option java_package = "com.android.tools.profiler.proto"; 15option java_outer_classname = "SimpleperfReport"; 16 17message Sample { 18 optional uint64 time = 1; 19 optional int32 thread_id = 2; 20 21 message CallChainEntry { 22 // virtual address of the instruction in elf file 23 optional uint64 vaddr_in_file = 1; 24 25 // index of the elf file containing the instruction 26 optional uint32 file_id = 2; 27 28 // symbol_id refers to the name of the function containing the instruction. 29 // If the function name is found, it is a valid index in the symbol table 30 // of File with 'id' field being file_id, otherwise it is -1. 31 optional int32 symbol_id = 3; 32 } 33 34 repeated CallChainEntry callchain = 3; 35} 36 37message LostSituation { 38 optional uint64 sample_count = 1; 39 optional uint64 lost_count = 2; 40} 41 42message File { 43 // unique id for each file, starting from 0, and add 1 each time. 44 optional uint32 id = 1; 45 46 // file path, like /system/lib/libc.so. 47 optional string path = 2; 48 49 // symbol table of the file. 50 repeated string symbol = 3; 51} 52 53message Record { 54 oneof record_data { 55 Sample sample = 1; 56 LostSituation lost = 2; 57 File file = 3; 58 } 59}